我正在尝试用sipp重放一个捕获的pcap。我的设置有两个pc和一个代理。接收pc有连接电话,并且应该能够接听来自另一台pc的呼叫,后者用sipp发送一个pcap。我用wireshark录制了媒体,并将其保存为*.pcap。
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<scenario name="UAC with media">
<!-- In client mode (sipp placing calls), the Call-ID MUST be -->
<!-- generated by sipp. To do so, use [call_id] keyword. -->
<send retrans="500">
<![CDATA[
REGISTER sip:[remote_ip] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
From: <sip:[field0]@[field2]>;tag=[call_number]
To: <sip:[field0]@[field2]>
Call-ID: [call_id]
CSeq: [cseq] REGISTER
Contact: <sip:[field0]@[local_ip]:[local_port]>
Max-Forwards: 10
Expires: 120
User-Agent: SIPp/Win32
Content-Length: 0
]]>
</send>
<!-- asterisk -->
<recv response="100" optional="true">
</recv>
<recv response="401" auth="true">
</recv>
<send retrans="500">
<![CDATA[
REGISTER sip:[remote_ip] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: <sip:[field0]@[field2]>;tag=[call_number]
To: <sip:[field0]@[field2]>
Call-ID: [call_id]
CSeq: [cseq] REGISTER
Contact: <sip:[field0]@[local_ip]>
[field3]
Max-Forwards: 10
Expires: 120
User-Agent: SIPp/Win32
Content-Length: 0
]]>
</send>
<!-- asterisk -->
<recv response="100" optional="true">
</recv>
<recv response="200">
</recv>
<send retrans="500">
<![CDATA[
INVITE sip:[field1]@[field2] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
From: <sip:[field0]@[field2]>;tag=[call_number]
To: <sip:[field1]@[field2]>
Call-ID: [call_id]
CSeq: 20 INVITE
Contact: <sip:[field0]@[local_ip]:[local_port]>
Content-Type: application/sdp
Max-Forwards: 70
Subject: Phone Call
Content-Length: [len]
v=0
o=user1 123456 654321 IN IP[media_ip_type] [media_ip]
s=-
c=IN IP[local_ip_type] [local_ip]
t=0 0
m=audio [media_port] RTP/AVP 0 8 101
a=rtpmap:0 PCMU/8000/1
a=rtpmap:8 PCMA/8000/1
a=rtpmap:101 telephone-event/8000/1
a=fmtp:101 0-11
a=sendrecv
m=video [media_port+2] RTP/AVP 99 98 34 100
a=rtpmap:99 MP4V-ES/90000
a=fmtp:99 profile-level-id=3
a=rtpmap:98 H263-1998/90000
a=fmtp:98 CIF=1;QCIF=1
a=rtpmap:34 H263/90000
a=rtpmap:100 x-snow/90000
a=sendrecv
]]>
</send>
<recv response="100" optional="true">
</recv>
<recv response="180" optional="true">
</recv>
<!-- By adding rrs="true" (Record Route Sets), the route sets -->
<!-- are saved and used for following messages sent. Useful to test -->
<!-- against stateful SIP proxies/B2BUAs. -->
<recv response="200" rtd="true" crlf="true">
</recv>
<!-- Packet lost can be simulated in any send/recv message by -->
<!-- by adding the 'lost = "10"'. Value can be [1-100] percent. -->
<send>
<![CDATA[
ACK sip:[field1]@[field2] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];rport;branch=[branch]
Route: <sip:[remote_ip]:[remote_port];lr=on>
From: <sip:[field0]@[field2]>;tag=[call_number]
To: <sip:[field1]@[field2]>
Call-ID: [call_id]
CSeq: 20 ACK
Contact: <sip:[field0]@[local_ip]:[local_port]>
Max-Forwards: 70
Subject: Phone Call
Content-Length: [len]
]]>
</send>
<!-- Play a pre-recorded PCAP file (RTP stream) -->
<nop>
<action>
<exec play_pcap_audio="/home/MM08-T/Desktop/owntest.pcap"/>
</action>
</nop>
<pause milliseconds="10000"/>
<!-- The 'crlf' option inserts a blank line in the statistics report. -->
<send retrans="500">
<![CDATA[
BYE sip:[field1]@[field2] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
Route: <sip:[remote_ip]:[remote_port];lr=on>
From: <sip:[field0]@[field2]>;tag=[call_number]
To: <sip:[field1]@[field2]>
Call-ID: [call_id]
CSeq: 21 BYE
Contact: <sip:[field0]@[local_ip]:[local_port]>
Max-Forwards: 70
Subject: Phone Call
Content-Length: 0
]]>
</send>
<recv response="200" crlf="true">
</recv>
<!-- definition of the response time repartition table (unit is ms) -->
<ResponseTimeRepartition value="10, 20, 30, 40, 50, 100, 150, 200"/>
<!-- definition of the call length repartition table (unit is ms) -->
<CallLengthRepartition value="10, 50, 100, 500, 1000, 5000, 10000"/>
</scenario>注入文件:
顺序MM08-T;MM08-O;lab.ibk.tuwien.ac.at;authentication用户名=MM08 08-T password=UHzd7wv0;
问题是,我总是收到错误消息:
2014-05-28 16:27:32:278 1401287252.278473:对呼叫-Id‘10-12715@192.168.108.105’的意外消息中止呼叫:虽然期望'180‘(索引8),但通过: SIP/2.0/UDP 192.168.108.105:5061;rport=5061;branch=z9hG4bK-12715-10-6记录-路由:从:;tag=10到:;tag=1157919833 Call-ID: 10-12715@192.168.108.105 CSeq: 20邀请联系人:用户-代理: Linphone/3.3.99.6 (eXosip2 2/3.3.0)内容长度:0 P-提示: ‘。sipp:有更多的错误,启用-trace_err来记录它们。
在我看来,场景文件有一些问题,但我只是找不到任何问题。有谁有线索吗?
发布于 2014-05-29 22:55:36
根据您在这里发布的错误消息,SIPP脚本不处理来自Linphone的"101对话机构“响应。您可以尝试在XML文件中添加101响应处理(作为可选),然后再试一次。
<recv response="101" optional="true">
</recv>https://stackoverflow.com/questions/23914766
复制相似问题