////////////////////////////////////////////////////////////////////////////////
// Client: call with binary (QSIG) bodies written in hexadecimal
//
// Counterpart of HexBody_server.
//
// Text between [hex] and [/hex] is hexadecimal; it is turned into the bytes it
// describes when the message is sent. The first INVITE has a multipart body
// (SDP plus an application/qsig part), a re-INVITE follows, and then INFO
// messages with QSIG bodies are exchanged in both directions. The server
// ends the call.
//
// Messages with ;retrans are sent again over UDP until they are answered, and a copy
// of one that comes again is answered as before (RFC 3261; -t1, -t2).
//
// SIP Messages
//  ---> INVITE ;retrans (multipart: SDP + QSIG)
//  <--- 200 OK ;retrans
//  ---> ACK
//  ---> INVITE ;retrans (re-INVITE, SDP)
//  <--- 200 OK ;retrans
//  ---> ACK
//  <--- INFO ... ---> 200 ... ---> INFO ... <--- 200 (several, QSIG bodies)
//  <--- BYE ;retrans
//  ---> 200 OK
////////////////////////////////////////////////////////////////////////////////

---------->;retrans
INVITE sip:[toUsername]@[remote_ip]:[remote_port];transport=[transport] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]ab
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
Contact: <sip:[fromUsername]@[local_ip]:[local_port];transport=[transport]>
User-Agent: SIPInspector_v_[ver]
Authorization: [authentication username=[authUsername]; password=[authPassword];]
Content-Type: multipart/mixed;boundary=level-0
Content-Length: [len]

--level-0
Content-Type: application/sdp

v=0
o=MxSIP 131077 501465461 IN [IP_ver] [local_ip_sdp]
s=SIP Call
c=IN [IP_ver] [local_ip_sdp]
t=0 0
m=audio [media_port] RTP/AVP 8 18 98 99
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:98 telephone-event/8000
a=rtpmap:99 red/8000
a=silenceSupp:off - - - -
a=fmtp:18 annexb=no
a=fmtp:98 0-15
a=fmtp:99 98
a=sendrecv

--level-0
Content-Disposition: signal; handling=required
Content-Type: application/qsig;version=iso
Content-Length: 669

[hex]080200010504038090a31803a9839e1c5e9faa068001
008201008b0102a15002023b3d06082b0c02885302015c304
0303e30243010020200db300a8002012c8101018201013010
020200dc300a8002012c810101820101a0060404c0a873640
10101010100020200ff0201008101021c239faa0680010082
01008b0100a11502023b4c06082b0c0288530201060305001
10000001c7f9faa068001018201018b0100a17102023b5b06
082b0c0288530201073061a25f305d810100820101a318a00
a800531333532320a0103300a8002033f810101820101a412
80042a2a3033300a8002012c810101820101a513800531333
53232300a8002033f810101820101a612800436313431300a
8002034d8101018201011c249faa068001008201008b0100a
11602023b6a06082b0c02885302014c300680042a2a30331c
4a9faa068001018201018b0100a13c02023b7906082b0c028
853020104302c80042a2a3033020200db80042a2a30330202
00dca00a8002012c810101820101a10a8002012c810101820
1011c2c9faa068001008201008b0100a11e02023b8806082b
0c028853020164300e300ca00a0404c0a86fae020213c41c1
d9faa068001008201008b0100a10f02023b97020155300682
04064008401c179faa068001008201008b0100a10902023ba
602010084001c289faa068001018201018b0100a11a02023b
b506082b0c028853020101300a8002033f8101018201011c2
89faa068001018201018b0100a11a02023bc406082b0c0288
53020111300a8002034d8101018201011c459faa068001008
201018b0100a13702023bd306082b0c028853020100302782
25031c0200040d000000220000000400c00e3800810480c50
00004040088804f021f005001306c07008331333532327002
80317d02918194310180[/hex]
--level-0--[no_\r\n]

<----------;retrans
200 OK

---------->
ACK sip:[toUsername]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]bc
From: <sip:[fromUsername]@[local_ip]:[local_port]>;tag=[call_number]
To: <sip:[toUsername]@[remote_ip]:[remote_port]>;[peer_tag_param]
Call-ID: [call_number].[run_tag]@[local_ip]
CSeq: [cseq] ACK
Max-Forwards: 70
Contact: <sip:[fromUsername]@[local_ip]:[local_port];transport=[transport]>
User-Agent: SIPInspector_v_[ver]
Content-Length: 0


---------->;retrans
INVITE sip:[toUsername]@[remote_ip]:[remote_port];transport=[transport] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]ab
From: <sip:[fromUsername]@[local_ip]:[local_port]>;tag=[call_number]
To: <sip:[toUsername]@[remote_ip]:[remote_port]>;[peer_tag_param]
Call-ID: [call_number].[run_tag]@[local_ip]
CSeq: [cseq+1] INVITE
Max-Forwards: 70
Contact: <sip:[fromUsername]@[local_ip]:[local_port];transport=[transport]>
User-Agent: SIPInspector_v_[ver]
Authorization: [authentication username=[authUsername]; password=[authPassword];]
Content-Type: application/sdp
Content-Length: [len]

v=0
o=MxSIP 131077 501465461 IN [IP_ver] [local_ip_sdp]
s=SIP Call
c=IN [IP_ver] [local_ip_sdp]
t=0 0
m=audio [media_port] RTP/AVP 8 18 98 99
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=rtpmap:98 telephone-event/8000
a=rtpmap:99 red/8000
a=silenceSupp:off - - - -
a=fmtp:18 annexb=no
a=fmtp:98 0-15
a=fmtp:99 98
a=sendrecv

<----------;retrans
200 OK

---------->
ACK sip:[toUsername]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]bc
From: <sip:[fromUsername]@[local_ip]:[local_port]>;tag=[call_number]
To: <sip:[toUsername]@[remote_ip]:[remote_port]>;[peer_tag_param]
Call-ID: [call_number].[run_tag]@[local_ip]
CSeq: [cseq] ACK
Max-Forwards: 70
Contact: <sip:[fromUsername]@[local_ip]:[local_port];transport=[transport]>
User-Agent: SIPInspector_v_[ver]
Content-Length: 0


<----------;retrans
INFO

---------->
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:]
[last_Call-ID:]
[last_CSeq:]
User-Agent: SIPInspector_v_[ver]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: 0


---------->;retrans
INFO sip:[toUsername]@[remote_ip]:[remote_port];transport=[transport] 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]>;[peer_tag_param]
Call-ID: [call_number].[run_tag]@[local_ip]
CSeq: [cseq+1] INFO
Max-Forwards: 70
Contact: <sip:[fromUsername]@[local_ip]:[local_port];transport=[transport]>
User-Agent: SIPInspector_v_[ver]
Content-Type: application/qsig;version=iso
Content-Disposition: signal; handling=required
Content-Length: [len]

[hex]080200017b70028034[/hex][no_\r\n]

<----------
200 OK

---------->;retrans
INFO sip:[toUsername]@[remote_ip]:[remote_port];transport=[transport] 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]>;[peer_tag_param]
Call-ID: [call_number].[run_tag]@[local_ip]
CSeq: [cseq+1] INFO
Max-Forwards: 70
Contact: <sip:[fromUsername]@[local_ip]:[local_port];transport=[transport]>
User-Agent: SIPInspector_v_[ver]
Content-Type: application/qsig;version=iso
Content-Disposition: signal; handling=required
Content-Length: [len]

[hex]080200017b70028035[/hex][no_\r\n]

<----------
200 OK

---------->;retrans
INFO sip:[toUsername]@[remote_ip]:[remote_port];transport=[transport] 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]>;[peer_tag_param]
Call-ID: [call_number].[run_tag]@[local_ip]
CSeq: [cseq+1] INFO
Max-Forwards: 70
Contact: <sip:[fromUsername]@[local_ip]:[local_port];transport=[transport]>
User-Agent: SIPInspector_v_[ver]
Content-Type: application/qsig;version=iso
Content-Disposition: signal; handling=required
Content-Length: [len]

[hex]080200017b70028032[/hex][no_\r\n]

<----------
200 OK

---------->;retrans
INFO sip:[toUsername]@[remote_ip]:[remote_port];transport=[transport] 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]>;[peer_tag_param]
Call-ID: [call_number].[run_tag]@[local_ip]
CSeq: [cseq+1] INFO
Max-Forwards: 70
Contact: <sip:[fromUsername]@[local_ip]:[local_port];transport=[transport]>
User-Agent: SIPInspector_v_[ver]
Content-Type: application/qsig;version=iso
Content-Disposition: signal; handling=required
Content-Length: [len]

[hex]080200017b70028032[/hex][no_\r\n]

<----------
200 OK

<----------;retrans
INFO

---------->
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:]
[last_Call-ID:]
[last_CSeq:]
User-Agent: SIPInspector_v_[ver]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: 0


<----------;retrans
INFO

---------->
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:]
[last_Call-ID:]
[last_CSeq:]
User-Agent: SIPInspector_v_[ver]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: 0


<----------;retrans
INFO

---------->
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:]
[last_Call-ID:]
[last_CSeq:]
User-Agent: SIPInspector_v_[ver]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: 0


---------->;retrans
INFO sip:[toUsername]@[remote_ip]:[remote_port];transport=[transport] 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]>;[peer_tag_param]
Call-ID: [call_number].[run_tag]@[local_ip]
CSeq: [cseq+1] INFO
Max-Forwards: 70
Contact: <sip:[fromUsername]@[local_ip]:[local_port];transport=[transport]>
User-Agent: SIPInspector_v_[ver]
Content-Type: application/qsig;version=iso
Content-Disposition: signal; handling=required
Content-Length: [len]

[hex]080200010f[/hex][no_\r\n]

<----------
200 OK

<----------;retrans
INFO

---------->
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:]
[last_Call-ID:]
[last_CSeq:]
User-Agent: SIPInspector_v_[ver]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: 0


---------->;retrans
INFO sip:[toUsername]@[remote_ip]:[remote_port];transport=[transport] 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]>;[peer_tag_param]
Call-ID: [call_number].[run_tag]@[local_ip]
CSeq: [cseq+1] INFO
Max-Forwards: 70
Contact: <sip:[fromUsername]@[local_ip]:[local_port];transport=[transport]>
User-Agent: SIPInspector_v_[ver]
Content-Type: application/qsig;version=iso
Content-Disposition: signal; handling=required
Content-Length: [len]

[hex]080200014d08028090[/hex][no_\r\n]

<----------
200 OK

<----------;retrans
BYE

---------->
SIP/2.0 200 OK
[last_Via:]
[last_From:]
[last_To:]
[last_Call-ID:]
[last_CSeq:]
User-Agent: SIPInspector_v_[ver]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: 0

