<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<scenario name="iinv-o200-obye.xml -- wjd 2014">
<recv request="INVITE" rrs="true"/>
<send>
<![CDATA[
SIP/2.0 180 Ringing
[last_Via:]
[last_Record-Route:]
[last_From:]
[last_To:];tag=[pid]SIPpTag01[call_number]
[last_Call-ID:]
[last_CSeq:]
Contact: sip:[service]@[local_ip]:[local_port]
Content-Length: 0
]]>
</send>
<send retrans="500">
<![CDATA[
SIP/2.0 200 OK
[last_Via:]
[last_Record-Route:]
[last_From:]
[last_To:];tag=[pid]SIPpTag01[call_number]
[last_Call-ID:]
[last_CSeq:]
Contact: sip:[service]@[local_ip]:[local_port]
Content-Type: application/sdp
Content-Length: [len]
v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[media_ip_type] [media_ip]
t=0 0
m=audio [media_port] RTP/AVP 8 0
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
]]>
</send>
<recv request="ACK" rrs="true">
<action>
<ereg regexp=": *(.*)" search_in="hdr" header="To" assign_to="_,us"/><!-- with tag -->
<ereg regexp=": *(.*)" search_in="hdr" header="From" assign_to="_,them"/>
</action>
</recv>
<Reference variables="_"/>
<!-- Wait for the other side to send some RTP -->
<pause milliseconds="1000"/>
<send start_txn="bye" retrans="500">
<![CDATA[
BYE [next_url] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
[routes]
From: [$us]
To: [$them]
[last_Call-ID:]
CSeq: [cseq] BYE
Contact: sip:[service]@[local_ip]:[local_port]
Content-Length: 0
]]>
</send>
<recv response="200" response_txn="bye"/>
</scenario><!-- vim: set ts=8 sw=2 sts=2 et ai: -->
sipp -sf uas.xml -i 10.0.16.12 -p 6666 -m 10000 -rtp_echo
支持 Kamailio/OpenSIPS
发 bye 时,from tag 和 to tag 要倒过来