////////////////////////////////////////////////////////////////////////////////
// Server: answers a call with a reliable 180 Ringing (RFC 3262)
//
// Counterpart of PRACK_client.
//
// It sends the 180 Ringing with Require: 100rel and an RSeq, waits for the
// PRACK, answers it, and only then sends the final 200 OK for the INVITE. The
// CSeq and Via of the INVITE are saved first, because the PRACK has its own.
//
// 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
//  ---> 100 Trying
//  ---> 180 Ringing (Require: 100rel, RSeq)
//  <--- PRACK ;retrans
//  ---> 200 OK (for the PRACK)
//  ---> 200 OK ;retrans (for the INVITE, SDP)
//  <--- ACK
//  ---- play test.pcap
//  <--- BYE ;retrans
//  ---> 200 OK
////////////////////////////////////////////////////////////////////////////////

<----------;retrans
INVITE

----------
set_Variable=var1 "CSeq:" "*"

----------
set_Variable=var2 "Via:" "*"

---------->
SIP/2.0 100 Trying
[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


---------->
SIP/2.0 180 Ringing
[last_Via:]
[last_From:]
[last_To:];tag=[call_number]
[last_Call-ID:]
[last_CSeq:]
Require: 100rel
RSeq: 1234
User-Agent: SIPInspector_v_[ver]
Contact: <sip:[local_ip]:[local_port];transport=[transport]>
Content-Length: 0


<----------;retrans
PRACK

---------->
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
SIP/2.0 200 OK
Via:[$var2]
[last_From:]
[last_To:]
[last_Call-ID:]
CSeq: [$var1]
Contact: <sip:[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

<----------
ACK

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

<----------;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

