python pjsua and rtp problem

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

 



Dear all,

I have successfully used pjsua python wrapper to build a simple sipphone but I have one trouble.

I'm connecting to Asterisk throw a routed vpn (openvpn) so on my sip client I have two interfaces with differents ips :
one is local LAN : 10.68.4.119
the second for VPN is : 192.168.56.6

The problem is when I 'm connecting to Asterisk on other side of vpn : 
 In sip SDP, sip client send c=IN IP4 10.68.4.119
so Asterisk try to send RTP packets to 10.68.4.119 (and cannot), but it must send to 192.168.56.6

I have tried to set 192.168.56.6 with TransportConfig :
  tpCfg = pj.TransportConfig(0)
  tpCfg.bound_addr = "192.168.56.6"
  tpCfg.public_addr = "192.168.56.6"
  transport = lib.create_transport(pj.TransportType.UDP, tpCfg)

but in SDP, I still have c=IN IP4 10.68.4.119  ...
(seems transport = lib.create_transport(pj.TransportType.UDP, tpCfg) is not acting on rtp transport)

I have found in pjsua console phone we can set ip addr with -i (--ip-addr) and after setting this option to 192.168.56.6, SDP is set correctly to c=IN IP4 192.168.56.6 .

Is there a way to modify this SDP setting in python pjsua ?

Thanks











[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