sipp icon indicating copy to clipboard operation
sipp copied to clipboard

UDP Multi socket adding 0 for variable local_port

Open hamidrhashmi opened this issue 7 years ago • 1 comments

I am using the default UAS scenario and running my script with the following command line

sipp -sf register.xml -oocsf uas.xml -inf register.inf -r 265 -rp 250 -t un -i 192.168.1.150 -aa 192.168.1.200:2381 -nd -nr -recv_timeout 1000

I took the wireshark traces and find out that SIPp is adding port 0 in contact.

SIP/2.0 180 Ringing
Via: SIP/2.0/UDP 192.168.1.200:2381;branch=z9hG4bK7202.0ab5aacd052d94b23a47f822d3906688.0, SIP/2.0/UDP 192.168.1.193:54292;received=192.168.1.193;rport=54292;branch=z9hG4bK-1769-7104-3
From: <sip:[email protected]>;tag=7104
To: <sip:[email protected]>;tag=59990SIPpTag010
Call-ID: [email protected]
CSeq: 2 INVITE
Contact: <sip:192.168.1.150:0;transport=UDP>
Content-Length: 0

SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.1.200:2381;branch=z9hG4bK7202.0ab5aacd052d94b23a47f822d3906688.0, SIP/2.0/UDP 192.168.1.193:54292;received=192.168.1.193;rport=54292;branch=z9hG4bK-1769-7104-3
From: <sip:[email protected]>;tag=7104
To: <sip:[email protected]>;tag=59990SIPpTag010
Call-ID: [email protected]
CSeq: 2 INVITE
Contact: <sip:192.168.1.150:0;transport=UDP>
Content-Type: application/sdp
Content-Length:   137

v=0
o=user1 53655765 2353687637 IN IP4 192.168.1.150
s=-
c=IN IP4 192.168.1.150
t=0 0
m=audio 6000 RTP/AVP 0
a=rtpmap:0 PCMU/8000

hamidrhashmi avatar Aug 09 '18 08:08 hamidrhashmi

I can't repro this. I don't have your XML and injection files, but I've run the very similar command:

./sipp -sn uac -r 265 -rp 250 -t un -i 127.0.0.1 127.0.0.1:5060 -m 1 -nd -nr -recv_timeout 1000 -max_socket 100

and the UAC scenario does use [local_port]:

$ ./sipp -sd uac | grep -C2 local_port -m 1

      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=[pid]SIPpTag00[call_number]
      To: [service] <sip:[service]@[remote_ip]:[remote_port]>

and the values that come out have a sensible port:

$ nc -u -l 5060 
INVITE sip:[email protected]:5060 SIP/2.0
Via: SIP/2.0/UDP 127.0.0.1:53987;branch=z9hG4bK-26961-1-0
From: sipp <sip:[email protected]:53987>;tag=26961SIPpTag001
To: service <sip:[email protected]:5060>
Call-ID: [email protected]
CSeq: 1 INVITE
Contact: sip:[email protected]:53987
Max-Forwards: 70
Subject: Performance Test
Content-Type: application/sdp
Content-Length:   129

v=0
o=user1 53655765 2353687637 IN IP4 127.0.0.1
s=-
c=IN IP4 127.0.0.1
t=0 0
m=audio 6000 RTP/AVP 0
a=rtpmap:0 PCMU/8000

Do you have more detail on a repro?

rkday avatar Nov 03 '19 23:11 rkday