////////////////////////////////////////////////////////////////////////////////
// Client: call with reliable provisional responses (RFC 3262)
//
// Counterpart of PRACK_server.
//
// The INVITE requires 100rel. The 180 Ringing that comes back is acknowledged
// with a PRACK whose RAck header is built from the RSeq and CSeq of the 180.
//
// 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 (Require: 100rel)
//  <--- 100 Trying (optional)
//  <--- 180 Ringing (RSeq)
//  ---> PRACK ;retrans (RAck)
//  <--- 200 OK (for the PRACK)
//  <--- 200 OK ;retrans (for the INVITE)
//  ---> ACK
//  ---- play test.pcap
//  ---> BYE ;retrans
//  <--- 200 OK
////////////////////////////////////////////////////////////////////////////////

---------->;retrans
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] INVITE
Max-Forwards: 70
Require: 100rel
Contact: <sip:[fromUsername]@[local_ip]:[local_port];transport=[transport]>
User-Agent: SIPInspector_v_[ver]
Content-Type: application/sdp
Content-Length: [len]

v=0
o=111 843670094 843670094 IN [IP_ver] [local_ip_sdp]
s=-
c=IN [IP_ver] [local_ip_sdp]
t=0 0
a=sendrecv
m=audio [media_port] RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-15
a=ptime:20

<----------*
100 Trying

<----------
180 Ringing

---------->;retrans
PRACK sip:[toUsername]@[remote_ip]:[remote_port] 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] PRACK
RAck: [val_last_RSeq:] [val_last_CSeq:]
Max-Forwards: 70
Contact: <sip:[fromUsername]@[local_ip]:[local_port];transport=[transport]>
User-Agent: SIPInspector_v_[ver]
Content-Length: 0


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

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

---------->
ACK sip:[toUsername]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]cd
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] ACK
Max-Forwards: 70
Contact: <sip:[fromUsername]@[local_ip]:[local_port];transport=[transport]>
User-Agent: SIPInspector_v_[ver]
Content-Length: 0


----------
cmd_PlayPcap=./pcap/test.pcap

----------
cmd_Pause=0

---------->;retrans
BYE sip:[toUsername]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]ef
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+2] BYE
Max-Forwards: 70
Contact: <sip:[fromUsername]@[local_ip]:[local_port];transport=[transport]>
User-Agent: SIPInspector_v_[ver]
Content-Length: 0


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