【发布时间】:2014-05-28 14:43:31
【问题描述】:
我正在尝试使用 sipp 重播捕获的 pcap 文件。 我的设置有 2 台电脑和一个代理。接收 pc 有 linphone 并且应该能够接听来自另一台 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;[认证 用户名=MM08-T 密码=UHzd7wv0];
问题是我总是收到错误消息:
2014-05-28 16:27:32:278 1401287252.278473:意外中止呼叫 Call-Id '10-12715@192.168.108.105' 的消息:同时期待 '180' (索引 8),收到 'SIP/2.0 101 对话建立通过: SIP/2.0/UDP 192.168.108.105:5061;rport=5061;branch=z9hG4bK-12715-10-6 记录路线: 从: ;tag=10 收件人: ;tag=1157919833 呼叫 ID: 10-12715@192.168.108.105 CSeq:20 邀请联系人: 用户代理:Linphone/3.3.99.6 (eXosip2/3.3.0) Content-Length: 0 P-hint:
'。 sipp:还有更多错误,启用 -trace_err 来记录它们。
在我看来,场景文件有一些问题,但我找不到任何问题。 有人知道吗?
【问题讨论】:
标签: sip