gpt4 book ai didi

sip - 使用 sipp 重播 pcap 文件

转载 作者:行者123 更新时间:2023-12-05 05:26:47 28 4
gpt4 key购买 nike

我正在尝试用 sipp 重播捕获的 pcap 文件。我的设置有 2 台电脑和一个代理。接收电脑有 linphone,应该能够接听来自另一台发送带有 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>

和注入(inject)文件:

SEQUENTIAL MM08-T;MM08-O;lab.ibk.tuwien.ac.at;[authentication username=MM08-T password=UHzd7wv0];

问题是我总是收到错误消息:

2014-05-28 16:27:32:278 1401287252.278473: Aborting call on unexpected message for Call-Id '10-12715@192.168.108.105': while expecting '180' (index 8), received 'SIP/2.0 101 Dialog Establishement Via: SIP/2.0/UDP 192.168.108.105:5061;rport=5061;branch=z9hG4bK-12715-10-6 Record-Route: From: ;tag=10 To: ;tag=1157919833 Call-ID: 10-12715@192.168.108.105 CSeq: 20 INVITE Contact: User-Agent: Linphone/3.3.99.6 (eXosip2/3.3.0) Content-Length: 0 P-hint:

'. sipp: There were more errors, enable -trace_err to log them.

在我看来,场景文件有问题,但我就是找不到任何错误。有没有人有任何线索?

最佳答案

根据您在此处发布的错误消息,SIPP xml 脚本不处理来自 Linphone 的“101 对话建立”响应。您可以尝试在您的 XML 文件中添加 101 响应处理(可选),然后重试。

<recv response="101" optional="true">
</recv>

关于sip - 使用 sipp 重播 pcap 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23914766/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com