Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong source port used by sipp to send media when using rtp_stream #192

Closed
atsakiridis opened this issue Mar 1, 2016 · 6 comments
Closed
Assignees

Comments

@atsakiridis
Copy link

Even though SDP negotiation is successful and sipp declares port 6000 for media in the SDP offer, for some reason when sending RTP packets it doesn't use as source port 6000, while it does receive them in that port when in the receiving end. That causes a problem to the other end that expects media to be transferred using the port negotiated in SDP.

Using https://github.com/SIPp/sipp/releases/tag/v3.5.0 on OSX 10.11.2

Sorry, forgot to add some more data:

  • sipp command used: sipp -sf ./health-ivr-sipp-client.xml -s +5555 127.0.0.1:5080 -mi 127.0.0.1:5090 -l 1 -m 1 -r 1 -trace_screen -trace_err -recv_timeout 5000 -nr -t u1
  • sipp xml file:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">

<scenario name="UAC with media"> 
<!-- Declare Variables -->
<Global variables="clientId,clientIdString" /> 
<!-- Initialize Variables -->
<init>
   <nop>
      <action>
         <assign assign_to="clientId" value="0" />
      </action>
   </nop>
</init> 
<!-- Increment Counter and Convert to String -->
<nop>
   <action>
      <add assign_to="clientId" value="1" />
      <assignstr assign_to="clientIdString" value="[$clientId]" />
      <ereg regexp="[0-9]+" search_in="var" variable="clientIdString" assign_to="clientIdString" check_it="true" />
   </action>
</nop>

<!-- send INVITE -->
<send retrans="500">
<![CDATA[
INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
To: sut <sip:[service]@[remote_ip]:[remote_port]>
Call-ID: [call_id]
CSeq: 1 INVITE
Contact: sip:sipp@[local_ip]:[local_port]
Max-Forwards: 70
Subject: Performance Test
Content-Type: application/sdp
X-ClientId: [$clientIdString]
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
a=rtpmap:8 PCMA/8000
]]>
</send>

<!-- receive TRYING -->
<recv response="100" optional="true" />

<!-- receive RINGING -->
<recv response="180" optional="true" />

<!-- receive OK -->
<!-- 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" />

<!-- send ACK -->
<send>
<![CDATA[
ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
CSeq: 1 ACK
Contact: sip:sipp@[local_ip]:[local_port]
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0
]]>
</send>

<!-- Wait 5 seconds for the announcements to play -->
<pause milliseconds="5000"/>

<!-- Wait 2 seconds to simulate ringing -->
<pause milliseconds="2000"/>

<!-- Simulate sending RTP traffic for one minute -->
<nop>
<action>
<!--
<exec rtp_stream="../../resources/audio/demo-prompt-one-minute.wav"/>
-->
<exec play_pcap_audio="../../resources/pcap/message.pcap"/>
</action>
</nop>

<pause milliseconds="60000"/>

<!-- Send BYE to terminate the call -->
<send retrans="500">
<![CDATA[
BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]
From: sipp  <sip:sipp@[local_ip]:[local_port]>;tag=[call_number]
To: sut  <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]
Call-ID: [call_id]
Cseq: 2 BYE
Contact: sip:sipp@[local_ip]:[local_port]
Max-Forwards: 70
Subject: Performance Test
Content-Length: 0
]]>
</send>

<recv response="200">
</recv>

<!-- STATISTICS -->
<!-- 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>
@wdoekes
Copy link
Member

wdoekes commented Mar 3, 2016

Thank you for taking the time to report. We'll look into it.

@wdoekes wdoekes self-assigned this Mar 3, 2016
@atsakiridis
Copy link
Author

One important note I forgot to mention is that with play_pcap_audio it works fine, which is why my .xml above is a bit misleading as I copy/pasted after we found this workaround

Please let me know if you need more info

Best regards,
Antonis

@wdoekes
Copy link
Member

wdoekes commented Mar 8, 2016

@atsakiridis: Your best bet is probably to use [rtpstream_audio_port] in place of [media_port] in your SDP. That should work.

@atsakiridis
Copy link
Author

Thanks a lot @wdoekes, I'll check it out

@stadelmannj
Copy link

Hello, using SIPp 3.5.2, I still see the same issue. thoutht this problem is solved with latest 3.5.2 ?

@norouzzadegan
Copy link

Hi i have problem of rtcp port
my pcap file sample is sample.pcap that include rtp and rtcp packet
I want send rtcp packet on other port that equal media_port+1 in a scenario but i cant send rtcp packet on other port.

jeannotlanglois added a commit to jeannotlanglois/sipp that referenced this issue Aug 23, 2020
- rtpstream_get_localport() must default to media port 6000 when none is specified by user
- UAC side of RTPSTREAM must specify mandatory payload_name parameter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants