Hi, I am using pjsua to connect from a NAT-ed network to a my sip proxy (openser) which is doing everything i need to have sip-over-nat without the need to tun the client. (it will keep the open SIP connection by pinging it and use mediaproxy from ag-projects to handle the RTP that could be coming from another port that announced in the SDP). It work very well with SNOM, AASTRA, etc, but for some reason pjsua will refuse re-registering. I suppose it's because it can see in the REGISTER's reponse that his IP in contact field has changed. But i don't understand why. Since we are already handling everything NAT need at the server- side, pjsua shouldn't refuse to register again. Here is the SIP trace of my pjsua, as you can see at the end, it show ("expire=-1") which is the problem. If someone could tell me why pjsua has this behaviour, and, how to tun it for it to ignore this. Would be great. Thanks, Nicolas p.s. : as you can see i am on LAN with ip 172.16.2.14 and contacting a WAN ip, here masked as being "registrar.org". user at linux pjsua $ ./pjsua --id sip:account at registrar.org -- registrar sip:registrar.org --realm "*" --username account -- password password --null-audio --reg-timeout=42 ... 18:33:05.056 pjsua_core.c 1 SIP worker threads created 18:33:05.056 pjsua_core.c pjsua version 0.8.0 for i686-pc-linux- gnu initialized 18:33:05.084 pjsua_core.c SIP UDP socket reachable at 172.16.2.14:5060 18:33:05.084 udp0x81b41e4 SIP UDP transport started, published address is 172.16.2.14:5060 18:33:05.084 pjsua_acc.c Account <sip:172.16.2.14:5060;transport=UDP> added with id 0 18:33:05.085 tcplis:5060 SIP TCP listener ready for incoming connections at 172.16.2.14:5060 18:33:05.085 pjsua_acc.c Account <sip:172.16.2.14:5060;transport=TCP> added with id 1 18:33:05.085 pjsua_acc.c Account sip:account at registrar.org added with id 2 18:33:05.085 pjsua_core.c TX 424 bytes Request msg REGISTER/cseq=64678 (tdta0x81b7db8) to UDP registrar.org:5060: REGISTER sip:registrar.org SIP/2.0 Via: SIP/2.0/UDP 172.16.2.14:5060;rport;branch=z9hG4bKPj5dab0000000367458b6b Max-Forwards: 70 From: <sip:account@xxxxxxxxxxxxx>;tag=5dab0000000267458b6b To: <sip:account at registrar.org> Call-ID: 5dab0000000167458b6b CSeq: 64678 REGISTER User-Agent: PJSUA v0.8.0/i686-pc-linux-gnu Contact: <sip:account at 172.16.2.14:5060;transport=UDP> Expires: 42 Content-Length: 0 --end msg-- 18:33:05.085 pjsua_acc.c Registration sent 18:33:05.085 pjsua_media.c RTP socket reachable at 172.16.2.14:4000 18:33:05.085 pjsua_media.c RTCP socket reachable at 172.16.2.14:4001 18:33:05.086 pjsua_media.c RTP socket reachable at 172.16.2.14:4002 18:33:05.086 pjsua_media.c RTCP socket reachable at 172.16.2.14:4003 18:33:05.086 pjsua_media.c RTP socket reachable at 172.16.2.14:4004 18:33:05.086 pjsua_media.c RTCP socket reachable at 172.16.2.14:4005 18:33:05.086 pjsua_media.c RTP socket reachable at 172.16.2.14:4006 18:33:05.086 pjsua_media.c RTCP socket reachable at 172.16.2.14:4007 18:33:05.086 pjsua_media.c Opening null sound device.. >>>> Account list: [ 0] <sip:172.16.2.14:5060;transport=UDP>: does not register Online status: Online [ 1] <sip:172.16.2.14:5060;transport=TCP>: does not register Online status: Online *[ 2] sip:account at registrar.org: 100/In Progress (expires=0) Online status: Online >>> 18:33:05.356 pjsua_core.c RX 494 bytes Response msg 401/REGISTER/cseq=64678 (rdata0x81b45f4) from UDP registrar.org:5060: SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 172.16.2.14:5060;rport=5060;branch=z9hG4bKPj5dab0000000367458b6b;rec eived=87.252.42.123 From: <sip:account@xxxxxxxxxxxxx>;tag=5dab0000000267458b6b To: <sip:account at registrar.org>;tag=cf3ef64d81565890e5a13f630beea4f9.8f5 3 Call-ID: 5dab0000000167458b6b CSeq: 64678 REGISTER WWW-Authenticate: Digest realm="realm.registrar.org", nonce="4b9a7bc3b9e481e319b417c57dd8caaaf0986cd9" Server: OpenSER (1.3.4-notls (i386/linux)) Content-Length: 0 --end msg-- 18:33:05.356 pjsua_core.c TX 616 bytes Request msg REGISTER/cseq=64679 (tdta0x81b7db8) to UDP registrar.org:5060: REGISTER sip:registrar.org SIP/2.0 Via: SIP/2.0/UDP 172.16.2.14:5060;rport;branch=z9hG4bKPj5dab0000000467458b6b Max-Forwards: 70 From: <sip:account@xxxxxxxxxxxxx>;tag=5dab0000000267458b6b To: <sip:account at registrar.org> Call-ID: 5dab0000000167458b6b CSeq: 64679 REGISTER User-Agent: PJSUA v0.8.0/i686-pc-linux-gnu Contact: <sip:account at 172.16.2.14:5060;transport=UDP> Expires: 42 Authorization: Digest username="account", realm="realm.registrar.org", nonce="4b9a7bc3b9e481e319b417c57dd8caaaf0986cd9", uri="sip:registrar.org", response="184879a2444fce121625aa470d5dec12" Content-Length: 0 --end msg-- 18:33:05.636 pjsua_core.c RX 490 bytes Response msg 200/REGISTER/cseq=64679 (rdata0x81b45f4) from UDP registrar.org:5060: SIP/2.0 200 OK Via: SIP/2.0/UDP 172.16.2.14:5060;rport=5060;branch=z9hG4bKPj5dab0000000467458b6b;rec eived=87.252.42.123 From: <sip:account@xxxxxxxxxxxxx>;tag=5dab0000000267458b6b To: <sip:account at registrar.org>;tag=cf3ef64d81565890e5a13f630beea4f9.a1c d Call-ID: 5dab0000000167458b6b CSeq: 64679 REGISTER Contact: <sip:account at 87.252.42.123:5060;transport=UDP>;expires=60;received=" sip:87.252.42.123:5060" Server: OpenSER (1.3.4-notls (i386/linux)) Content-Length: 0 --end msg-- 18:33:05.636 pjsua_acc.c sip:account at registrar.org: unregistration success >>>> Account list: [ 0] <sip:172.16.2.14:5060;transport=UDP>: does not register Online status: Online [ 1] <sip:172.16.2.14:5060;transport=TCP>: does not register Online status: Online *[ 2] sip:account at registrar.org: 200/OK (expires=-1) ####### XXX ERROR ###### Online status: Online