Transport address in multi-nic environments

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

 



  Hi all,


  I came across a problem, that I'd like some help with, as I don't  
seem to be able to find the solution.

  I'm on pjsip 1.14.2-svn (latest svn for ver 1), and the problem I  
have is this: I have a nic in my client with IP 192.168.0.100, and set  
up a vpn connection to workplace where I get a dhcp assigned IP in the  
192.168.4.x subnet.

  Now, if I don't specify the public_addr in the SIP/RTP  
transport_config, SIP/RTP socket is initially reachable at  
192.168.0.100:

pjsua_core.c  SIP UDP socket reachable at 192.168.0.100:5030
udp07C86CB8  SIP UDP transport started, published address is  
192.168.0.100:5030
pjsua_media.c  RTP socket reachable at 192.168.0.100:8770
pjsua_media.c  RTCP socket reachable at 192.168.0.100:8771
pjsua_media.c  RTP socket reachable at 192.168.0.100:8772
pjsua_media.c  RTCP socket reachable at 192.168.0.100:8773

  And after I send the registration, SIP transport correctly adjusts  
itself to the VPN address:

pjsua_acc.c  IP address change detected for account 0  
(192.168.0.100:5030 --> 192.168.4.110:5030). Updating registration  
(using method 2)

  ... while RTP socket is still at 192.168.0.100 which can be seen in SDP

SIP/2.0 200 OK
Via: SIP/2.0/UDP  
192.168.4.199:5060;received=192.168.4.199;branch=z9hG4bK639b71a6
Call-ID: 4660c5d37f2fbe50309f550a2fc07387 at 192.168.4.199:5060
From: "Unknown" <sip:Unknown@192.168.4.199>;tag=as52a4bb8b
To: <sip:700 at 192.168.4.110;ob>;tag=z9hG4bK639b71a6
CSeq: 102 OPTIONS
Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY,  
REFER, MESSAGE, OPTIONS
Accept: application/sdp, application/pidf+xml, application/xpidf+xml,  
application/simple-message-summary, message/sipfrag;version=2.0,  
application/im-iscomposing+xml, text/plain
Supported: replaces, 100rel, timer, norefersub
Allow-Events: presence, message-summary, refer
Content-Type: application/sdp
Content-Length:   442

v=0
o=- 3559047092 3559047092 IN IP4 192.168.0.100
s=pjmedia
c=IN IP4 192.168.0.100
t=0 0
m=audio 8766 RTP/AVP 0 8 98 97 3 99 104 9 96
a=rtcp:8767 IN IP4 192.168.0.100
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:98 speex/16000
a=rtpmap:97 speex/8000
a=rtpmap:3 GSM/8000
a=rtpmap:99 speex/32000
a=rtpmap:104 iLBC/8000
a=fmtp:104 mode=30
a=rtpmap:9 G722/8000
a=sendrecv
a=rtpmap:96 telephone-event/8000
a=fmtp:96 0-15

  ... which basically means, that while I can initiate and hangup the  
call, audio never gets through.


  Now - I'm looking for a way to catch the address change, so I can  
update the RTP transport address. I guess the best way would be to do  
that in 'on_reg_state', once the registration is successful, as at  
that time SIP transport already is updated to the IP of my correct NIC  
(vpn in this case), but somehow I couldn't find a way to get the new  
SIP transport address. Any suggestions?


  Greets, Toni

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.




[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