Sign-on, Sign-off and Echo
A switch that connects to your Sandbox usually opens one connection and sends a sign-on (a message that says it is ready). While the connection is quiet, it sends echo tests (short messages that check the connection is still alive). Before it closes the connection, it sends a sign-off (a message that says it is leaving). These are ordinary ISO messages, and the Sandbox has no built-in ones. You create them as requests, exactly like Auth_0100_0110, and the Sandbox answers them the same way.
The messages
They are all network messages. Field 0 (the message type) is 0800, and field 70 says which kind of network message it is.
| Field 70 | Meaning | Reply |
|---|---|---|
001 | Sign-on | 0810, field 39 00 |
002 | Sign-off | 0810, field 39 00 |
301 | Echo test | 0810, field 39 00 |
A sign-on request in the Acquiring_Platform_POS collection looks like this:
// Request Body
<isomsg>
<field id="0" value="0800"/>
<field id="7" value="{{$generateDate(MMddHHmmss)}}"/>
<field id="11" value="{{$generateRandomNumber(6)}}"/>
<field id="70" value="001"/>
</isomsg>
// Response Body
<isomsg>
<field id="0" value="0810"/>
<field id="7" value="{{$echo()}}"/>
<field id="11" value="{{$echo()}}"/>
<field id="39" value="00"/>
<field id="70" value="{{$echo()}}"/>
</isomsg>Create an Echo_0800_0810 and a SignOff_0800_0810 in the same way, with 301 and 002 in field 70.
Keep the caller's connection open
By default, the Sandbox closes the connection after every reply. A switch that signs on and then sends business messages on the same connection would lose that connection right after the sign-on. To change this, open the collection's Edit dialog, expand Advanced, and set Idle timeout (s) to -1 (keep the connection open) or to a number of seconds with no traffic. Restart the Sandbox after you change it.
The other rows under Advanced are explained in Create Sandbox.
One-way: the switch talks, the Sandbox answers
This is the default (Connection: unidirectional). The switch connects and sends its sign-on. The Sandbox matches it to your SignOn_0800_0810 request and answers. Business messages and echo tests follow on the same connection. They are matched and answered like any other request.
A sign-on is not required. If the switch never signs on and sends an 0100 (an authorization request) straight away, the Sandbox answers the 0100. To require a sign-on first, use a rule. The example is in Rules.
Two-way: the Sandbox also sends
Some switches expect the other side to sign on. Set Connection to bidirectional, and the Sandbox sends its own messages on the connection that the switch opened:
- On connect: the requests that are sent, in order, right after a connection arrives. Put your sign-on here.
- On disconnect: the requests that are sent, in order, before the Sandbox closes the connection (because the idle timeout was reached, or you pressed Stop). Put your sign-off here.
Pick requests from this collection and put them in order with the arrows. Each one is built from its request body and sent on the switch's connection. Its reply must be the matching 0810. The validation rules on the request are checked against that reply. If a reply does not arrive within the request timeout, the list stops. The Sandbox sends only one of its own messages at a time. If the switch sends a reply that nobody is waiting for, it is logged and ignored.
Two-way mode needs the connection to stay open, so PruTAN refuses to save it while Idle timeout (s) is 0.
Total connections and the IP list
Think of the Sandbox as a shop with a door.
- Total connections is like a "one customer at a time" sign on the door. With
1, a second switch that tries to connect while the first one is inside is refused, until the first one leaves. It limits how many come in, not who comes in. - Access (the IP list) is like the guest list. Only the listed addresses get in, no matter how many are already inside.
Using both together, 1 and one address, is the usual setup for a real switch. Leave Total connections blank for no limit.
Naming the message: Kind
Open a Sandbox request's Overview tab and fill in Kind with your own word for it, for example sign-on or heartbeat. This word is shown on that request's hits in the Sandbox overview and analytics, so a tester sees what happened instead of a request name. If you leave it blank, PruTAN uses the standard word from field 70 (sign-on, sign-off, echo, key exchange) when there is one. You can set the label yourself because some switches use their own private codes.
Every hit also records its direction: it came in from the switch, or the Sandbox sent it on connect or on disconnect.
- Nothing is hidden. The Sandbox never answers a sign-on or an echo with a built-in reply. Every answer comes from a request you saved.
- The Sandbox never resends a message, and it never sends echoes to the switch on its own. To keep a connection alive from the calling side, see Persistent Connections.