thank you Takeshi and Patrick for the suggestions, I also saw that on the
send_packets() function... no bind, which means it is up to the OS to decide
what ip/interface to use but I was not sure 100% that that was the only place.
Date: Wed, 25 Jan 2012 08:29:31 -0200
Subject: Re: [Sipp-users] Media Ip address
From: pwak...@gmail.com
To: mayamatake...@gmail.com
CC: fbo...@hotmail.com; sipp-users@lists.sourceforge.net
I think this problem was already reported sometime ago....Anyway, it is a bug
in SIPp and this is what you have to do:
In function send_packets() from send_packets.c you need the following lines:
if (media_ip_is_ipv6) { sock = socket(PF_INET6, SOCK_RAW, IPPROTO_UDP);
if (sock < 0) { ERROR("Can't create raw socket (need to run as root?)");
} len = sizeof(struct sockaddr_in6); from_port = &(((struct
sockaddr_in6 *)(void *) from )->sin6_port); to_port = &(((struct
sockaddr_in6 *)(void *) to )->sin6_port);
} else { sock = socket(PF_INET, SOCK_RAW, IPPROTO_UDP); if (sock < 0)
{ ERROR("Can't create raw socket (need to run as root?)"); }
len = sizeof(struct sockaddr_in); from_port = &(((struct sockaddr_in
*)(void *) from )->sin_port); to_port = &(((struct sockaddr_in *)(void *) to
)->sin_port);
}
if((ret = bind(sock, ((struct sockaddr *)(void *)from), len))) {
WARNING("Can't bind IP %s", inet_ntoa(((struct sockaddr_in *)(void *) from
)->sin_addr));
}
This patch is not mine, I found it a long time ago in the devel list I think,
it is very simple and only adds a bind to an IP and port used for the RTP
packets (something originally SIPp wasn't doing....)
Compare this with the original code and patch it (I dont remember exactly what
lines have changed....), it is right after the variables declarations.....Good
luck!
Patrick
On Wed, Jan 25, 2012 at 12:17 AM, mayamatakeshi <mayamatake...@gmail.com> wrote:
On Wed, Jan 25, 2012 at 3:52 AM, Fabian Borot <fbo...@hotmail.com> wrote:
Hi
I am using sipp on a machine with these IPs:
eth0 172.31.196.241eth1 10.10.10.1lo 127.0.0.1
when using sipp to send media, the RTP packets are sent from 127.0.0.1 to
127.0.0.1 [local loopback to local loopback]
this is the command I am using:
./sipp
172.31.196.242 -sn uac_pcap -i
172.31.196.241 -mi
172.31.196.241 -d 5000 -l 1 -m 1
the UAS is 172.31.196.242 and the signaling looks fine, however the UAS never
receives the RTP because stays local (127.0.0.1 -> 127.0.0.1)
If I am not mistaken I never used option -mi with uac scenarios using pcap_play.
Also, when I dump the embedded uac_pcap scenario, I see this:
<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=[pid]SIPpTag09[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
Content-Length: [len]
v=0
o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]
s=-
c=IN IP[local_ip_type] [local_ip]
t=0 0
m=audio [auto_media_port] RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-11,16
]]>
</send>
So media_ip is not referenced in the SDP and SIPp would use local_ip.
Have you tried not passing option -mi? Maybe there is a bug that causes it to
use 127.0.0.1 if -mi is passed.
Also, maybe the sipp version you are using is buggy.
After looking for information on similar issues I found a couple of post that
say that the "mi" parameter works only on the UAS side with the rtp echo
feature. Also the documentation says this:
[media_ip] - Depending on the value of -mi parameter, it is the
local IP address for RTP echo.
RTP echoThe "RTP echo" feature allows SIPp to listen to one or two local IP
address and port (specified using -mi and -mp command line parameters) for RTP
media. Everything that is received on this address/port is echoed back to the
sender.
How can I specify what interface/ip to use for sending RTP?
If i needed to use a different IP for SIP and RTP (which is not the problem you
are trying to solve), i would dump the uac_pcap scenario
sipp -sd uac_pcap > uac_pcap.xml
and edit it replacing
c=IN IP[local_ip_type] [local_ip]
with
c=IN IP[media_ip_type] [media_ip]
and see what happens when using it as
sipp -sf uac_pcap.xml -mi my_rtp_ip ... etc ...
regards,
Takeshi
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users