A bit of background first. We have a client-server voip solution. We use PJSIP on the client side. For various historically reasons we have a custom STUN solution. I was able to figure out how to use the client's "public" IP in the INVITE message - via pjsua_transport_config.public_addr. But now we have a problem with the ACK. You can see the problem below as PJ's response to the 200 OK (via an ACK) is sent to 172.22.0.67 (the server's internal IP). If I understand SIP correctly this is caused by the "m" header, m: <sip:8800 at 172.22.0.67:5064;transport=TCP>. Before we launch into fixing the server (as this behavior is support by our other clients) I wanted to know if there is a simple way to get PJ to ignore the IP in the contact header and use the IP that is already in use. Thanks in advanced Darald My NAT's IP: 71.83.58.195 My iPhone's internal IP: 192.168.30.75 Server's NAT's IP: 71.232.174.224 Server's internal IP: 172.22.0.67 to tcp 71.232.174.224:5064: INVITE sip:8800 at 71.232.174.224:5064;transport=tcp SIP/2.0 Via: SIP/2.0/TCP 192.168.30.75:50109;rport;branch=z9hG4bKPjFRl9GWyRUklHjfugyot2VfsOQAD2dg7W Max-Forwards: 70 From: sip:josh2@71.232.174.224;tag=2Hx1n7dx-zNWT5IAAiThPVmtDHlEyP21 To: sip:8800 at 71.232.174.224 Contact: <sip:josh2 at 71.83.58.195:17077> Call-ID: uE63KGT-KZKHz8GYFMsmIjmrVNftu7Ah CSeq: 8059 INVITE Allow: PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS Supported: replaces, 100rel, timer, norefersub Session-Expires: 1800 Min-SE: 90 User-Agent: DV iPhone App v1.0 Content-Type: application/sdp Content-Length: 424 v=0 o=- 3493393500 3493393500 IN IP4 71.83.58.195 s=pjmedia c=IN IP4 71.83.58.195 t=0 0 m=audio 8000 RTP/AVP 103 102 104 109 3 0 8 101 a=rtcp:8001 IN IP4 71.83.58.195 a=rtpmap:103 speex/16000 a=rtpmap:102 speex/8000 a=rtpmap:104 speex/32000 a=rtpmap:109 iLBC/8000 a=fmtp:109 mode=20 a=rtpmap:3 GSM/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 a=sendrecv a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 from tcp 71.232.174.224:5064: SIP/2.0 100 Trying v: SIP/2.0/TCP 192.168.30.75:50109;rport;branch=z9hG4bKPjFRl9GWyRUklHjfugyot2VfsOQAD2dg7W f: <sip:josh2 at 71.232.174.224>;tag=2Hx1n7dx-zNWT5IAAiThPVmtDHlEyP21 t: <sip:8800 at 71.232.174.224>;tag=7ead9716 i: uE63KGT-KZKHz8GYFMsmIjmrVNftu7Ah CSeq: 8059 INVITE l: 0 << here is the problem >> from tcp 71.232.174.224:5064: SIP/2.0 200 OK v: SIP/2.0/TCP 192.168.30.75:50109;rport;branch=z9hG4bKPjFRl9GWyRUklHjfugyot2VfsOQAD2dg7W f: <sip:josh2 at 71.232.174.224>;tag=2Hx1n7dx-zNWT5IAAiThPVmtDHlEyP21 t: <sip:8800 at 71.232.174.224>;tag=7ead9716 i: uE63KGT-KZKHz8GYFMsmIjmrVNftu7Ah CSeq: 8059 INVITE m: <sip:8800 at 172.22.0.67:5064;transport=TCP> c: application/sdp l: 209 v=0 o=8800 1042875255 1042875255 IN IP4 172.22.0.67 s=session c=IN IP4 172.22.0.67 t=0 0 m=audio 57350 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv << here is the problem >> to tcp 172.22.0.67:5064: ACK sip:8800 at 172.22.0.67:5064;transport=TCP SIP/2.0 Via: SIP/2.0/TCP 192.168.30.75:50112;rport;branch=z9hG4bKPjpAaSIIgi0Gao3-XDbPyXCRc3Y8D1aGnh Max-Forwards: 70 From: sip:josh2@71.232.174.224;tag=2Hx1n7dx-zNWT5IAAiThPVmtDHlEyP21 To: sip:8800 at 71.232.174.224;tag=7ead9716 Call-ID: uE63KGT-KZKHz8GYFMsmIjmrVNftu7Ah CSeq: 8059 ACK Content-Length: 0 from tcp 71.232.174.224:5064: SIP/2.0 200 OK v: SIP/2.0/TCP 192.168.30.75:50109;rport;branch=z9hG4bKPjFRl9GWyRUklHjfugyot2VfsOQAD2dg7W f: <sip:josh2 at 71.232.174.224>;tag=2Hx1n7dx-zNWT5IAAiThPVmtDHlEyP21 t: <sip:8800 at 71.232.174.224>;tag=7ead9716 i: uE63KGT-KZKHz8GYFMsmIjmrVNftu7Ah CSeq: 8059 INVITE m: <sip:8800 at 172.22.0.67:5064;transport=TCP> c: application/sdp l: 209 v=0 o=8800 1042875255 1042875255 IN IP4 172.22.0.67 s=session c=IN IP4 172.22.0.67 t=0 0 m=audio 57350 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv to tcp 172.22.0.67:5064: ACK sip:8800 at 172.22.0.67:5064;transport=TCP SIP/2.0 Via: SIP/2.0/TCP 192.168.30.75:50112;rport;branch=z9hG4bKPjkeH7W6Fezro6.nuJ8DsNJQffrYc2nirm Max-Forwards: 70 From: sip:josh2@71.232.174.224;tag=2Hx1n7dx-zNWT5IAAiThPVmtDHlEyP21 To: sip:8800 at 71.232.174.224;tag=7ead9716 Call-ID: uE63KGT-KZKHz8GYFMsmIjmrVNftu7Ah CSeq: 8059 ACK Content-Length: 0 from tcp 71.232.174.224:5064: SIP/2.0 200 OK v: SIP/2.0/TCP 192.168.30.75:50109;rport;branch=z9hG4bKPjFRl9GWyRUklHjfugyot2VfsOQAD2dg7W f: <sip:josh2 at 71.232.174.224>;tag=2Hx1n7dx-zNWT5IAAiThPVmtDHlEyP21 t: <sip:8800 at 71.232.174.224>;tag=7ead9716 i: uE63KGT-KZKHz8GYFMsmIjmrVNftu7Ah CSeq: 8059 INVITE m: <sip:8800 at 172.22.0.67:5064;transport=TCP> c: application/sdp l: 209 v=0 o=8800 1042875255 1042875255 IN IP4 172.22.0.67 s=session c=IN IP4 172.22.0.67 t=0 0 m=audio 57350 RTP/AVP 0 101 a=rtpmap:0 PCMU/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=sendrecv to tcp 172.22.0.67:5064: ACK sip:8800 at 172.22.0.67:5064;transport=TCP SIP/2.0 Via: SIP/2.0/TCP 192.168.30.75:50112;rport;branch=z9hG4bKPjXW6r3PkjwJOEccs0s3qqnfYl5hyygHbq Max-Forwards: 70 From: sip:josh2@71.232.174.224;tag=2Hx1n7dx-zNWT5IAAiThPVmtDHlEyP21 To: sip:8800 at 71.232.174.224;tag=7ead9716 Call-ID: uE63KGT-KZKHz8GYFMsmIjmrVNftu7Ah CSeq: 8059 ACK Content-Length: 0 The 200 ok, ACK sequence continues to repeats until PJ gives up. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20100913/22c93c15/attachment.html>