On Mon, Jan 26, 2009 at 11:53 PM, Benny Prijono <bennylp at teluu.com> wrote: > On Mon, Jan 26, 2009 at 5:54 PM, Alexei Kuznetsov <eofster at gmail.com> wrote: >> >> > Hi, this would have been taken care of automatically if you use the ICE >> > media transport. With the default UDP media transport, STUN discovery is >> > only done once during startup, and public IP change detection is left to >> > application to detect and handle. >> >> So if I configure media with enable_ice = PJ_TRUE and configure STUN >> server, that will do the trick? >> > > Yes. That didn't work for me. I've tested pjsua from the 1.0 branch running with arguments --stun-srv=stun.sipgate.net:10000 --use-ice. I registered an account and made a successfull call. Then changed external NAT IP address (with DSL modem reconnect). pjsua noticed the change. 14:37:36.731 stuntp0x216ca0 STUN mapped address found/changed: 91.78.83.150:53705 14:37:36.732 stuntp0x216ba0 STUN mapped address found/changed: 91.78.83.150:53704 14:37:36.813 stuntp0x216da0 STUN mapped address found/changed: 91.78.83.150:53706 14:37:36.819 stuntp0x216ea0 STUN mapped address found/changed: 91.78.83.150:53707 14:37:36.924 stuntp0x216fa0 STUN mapped address found/changed: 91.78.83.150:53708 14:37:36.926 stuntp0x2170a0 STUN mapped address found/changed: 91.78.83.150:53709 14:37:37.013 stuntp0x2171a0 STUN mapped address found/changed: 91.78.83.150:53710 14:37:37.015 stuntp0x2172a0 STUN mapped address found/changed: 91.78.83.150:53711 Then I re-registered an account. 14:38:08.905 pjsua_acc.c IP address change detected for account 2 (91.77.38.3:5060 --> 91.78.83.150:5060). Updating registration.. Then I tried to make a call. INVITE sip:612 at fwd.pulver.com SIP/2.0 Via: SIP/2.0/UDP 91.78.83.150:5060;rport;branch=z9hG4bKPjqGtF76H6KHTHyXHXHQmzWw3IsN6FBkZ9 Max-Forwards: 70 From: sip:902984@xxxxxxxxxxxxxx;tag=nulHw0zLPId9Lmda.GfWDIY-z85vetb- To: sip:612 at fwd.pulver.com Contact: <sip:902984 at 91.78.83.150:5060;transport=UDP> Call-ID: Orvyt0DCa48yjjlVMvO24KxYTU.AOwxM CSeq: 30193 INVITE Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Supported: replaces, 100rel, norefersub User-Agent: PJSUA v1.0.1/i386-apple-darwin9.6.0 Content-Type: application/sdp Content-Length: 601 v=0 o=- 3442131714 3442131714 IN IP4 91.77.38.3 s=pjmedia c=IN IP4 91.77.38.3 t=0 0 a=X-nat:8 m=audio 53706 RTP/AVP 103 102 104 117 3 0 8 9 101 a=rtcp:53707 IN IP4 91.77.38.3 a=rtpmap:103 speex/16000 a=rtpmap:102 speex/8000 a=rtpmap:104 speex/32000 a=rtpmap:117 iLBC/8000 a=fmtp:117 mode=30 a=rtpmap:3 GSM/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=rtpmap:9 G722/8000 a=sendrecv a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=ice-ufrag:2147b80b a=ice-pwd:6b83eb3e a=candidate:H 1 UDP 23 192.168.1.10 53706 typ host a=candidate:H 2 UDP 22 192.168.1.10 53707 typ host --end msg-- The media didn't succeed here and there was an old IP address 91.77.38.3 in SDP. Is there anything I've missed? Alexei > > >> >> Can using ICE cause problems with user agents or proxies that don't >> know anything about it? >> > > It shouldn't. At worst, ICE will be disabled if one endpoint doesn't support > it, but on your side you still have the capability to adapt to the IP > changes. > > cheers > Benny > > > >> >> Alexei >>