Manual › Building scenarios

SIP tab

Figure 24 - SIP messages
Figure 24 - SIP messages

The direction of a SIP message can be In or Out. In means that the program receives the message; in the scenario list it has the ‘<---’ symbol. Out means that the message is sent to the remote server or to the remote target and is marked ‘--->’. Sometimes it is not known in advance how the remote side will respond. That is why optional messages exist: they hint to the tool that a message may or may not come in. Optional messages are marked with an asterisk.

For example, this scenario covers both the case of a server that challenges the REGISTER and the case of a server that simply answers 200 OK:

---> REGISTER
<--- 100*          // optional response
<--- 401*          // optional response
---> REGISTER*     // sent only if an optional response was received
<--- 200

Msg type is a drop-down list of the standard requests and responses. It does not limit you: to create your own request or response delete the offered text and type the wanted one.

Retransmission (RFC 3261, UDP) marks the message with ;retrans after its arrow. On a message that is sent, it is sent again until it is answered: an INVITE after T1, 2T1, 4T1 ... until any response comes (timer A); another request the same, but never more than T2 apart, until a final response (timer E); a final response to an INVITE (2xx to 6xx) until the ACK comes (timer G). After 64*T1 without an answer the call ends as timed out. Each copy may be answered again, so an answer that comes more than once (a final response, the ACK of the final response) is dropped, and a final response to the INVITE gets the ACK again; it does not count as unexpected. An ACK, a provisional response and a response to a request other than INVITE are never sent again by themselves. On a message that is received, the other side may send it again: a copy is answered with what answered the first one (the same response, or the ACK again), or dropped when it was not answered yet, and it does not count as unexpected. Mark both sides of a pair: the sender what it sends again, the receiver the same message. T1 and T2 (500 and 4000 ms) are settings of the run: Options > SIP Timers, or -t1 and -t2. Over TCP, TLS and WebSocket the mark does nothing.

---------->;retrans      // INVITE, sent again until a response comes
INVITE sip:...
...
<----------;retrans      // 200 OK, its copies get the ACK again
200 OK

A scenario of an earlier version may have ;ReTxCnt=N instead. It is read as ;retrans (dropped on an ACK or a provisional response, which RFC 3261 never sends again by itself): the GUI says so and marks the scenario changed, and saving it writes the new format. The command line runs such a file as read and says so in SIPInspector.log.

Every SIP message of a scenario is a block of plain text, as it goes on the wire, with keywords where a value changes from call to call:

---------->
INVITE sip:[toUsername]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[fromUsername]@[local_ip]:[local_port]>;tag=[call_number]
To: <sip:[toUsername]@[remote_ip]:[remote_port]>
Call-ID: [call_number].[run_tag]@[local_ip]
CSeq: [cseq+1] INVITE
Max-Forwards: 70
Content-Type: application/sdp
Content-Length: [len]

v=0
...