bound_addr/public_addr won't set RTP address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Jakob,

You can create another transport to be used for media with its own port
(starting port for range), public_addr and bound_addr and set it against an
account in rtp_cfg under pjsua_acc_config.  Calls for this account will
then use this transport for media.

Regards,
Omar



On Tue, Nov 27, 2012 at 3:39 AM, Jakob Hirsch <jh at plonk.de> wrote:

> Hi,
>
> I have a simple application for outgoing calls, using pjsip 2.0.1 and
> its python bindings. The application should run on a multi-home host
> with multiple IP addresses (some internal, one external) and use the
> external IP address. I create my Transport with a TransportConfig and
> the external IP address like that:
>
> transport = lib.create_transport(pj.TransportType.UDP,
> pj.TransportConfig(bound_addr=ext_ip, public_addr=ext_ip))
>
> The Problem now is that the media keeps using the internal address in
> the SDP's connection information and as the source address for the RTP
> packets.
>
> I tried several combinations of bound_addr and public_addr, but that did
> not change anything. A strace reveals that the SIP socket is actually
> bind() to the ext-ip, but the RTP (and RTCP) socket to INADDR_ANY
> (0.0.0.0):
>
> > 9613  socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
> > 9613  bind(5, {sa_family=AF_INET, sin_port=htons(0),
> sin_addr=inet_addr("212.xxx.xx.xxx")}, 16) = 0
> ...
> > 9613  socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 7
> > 9613  bind(7, {sa_family=AF_INET, sin_port=htons(40000),
> sin_addr=inet_addr("0.0.0.0")}, 16) = 0
> > 9613  socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 8
> > 9613  bind(8, {sa_family=AF_INET, sin_port=htons(40001),
> sin_addr=inet_addr("0.0.0.0")}, 16) = 0
>
> I found a posting to the list
> (
> http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2011-June/012978.html
> )
> with the same problem, but with no answer. Is there really no way to get
> this right out of the box? I'm trying to go through the sources, but the
> complexity is a little mind-boggling...
>
>
> TIA & Regards
> Jakob
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20121127/2d1e362e/attachment-0001.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux