<div dir="ltr">Hello,<div><br></div><div>I have a problem with the following configuration.</div><div><br></div><div>I want to make calls from Asterisk to a browser using RTPEngine as relay.</div><div><br></div><div>Everything works fine, if Kamailio is not natted (See kamailio_without_nat.log).</div><div><br></div><div>If it's address is translated, then 200 OK responses from the browser don't seem to be received by kamailio.</div><div><br></div><div>I have configured Kamailio (4.2) and RTPEngine (3.3) both with advertisement of the public IP. <br></div><div><br></div><div>Asterisk has public IP: <span style="font-family:Roboto,sans-serif;font-size:13px;line-height:20px">146.148.113.245</span></div><div>Kamilio has public IP: <span style="font-family:Roboto,sans-serif;font-size:13px;line-height:20px">104.155.11.255</span><span style="font-family:Roboto,sans-serif;font-size:13px;line-height:20px"><br></span></div><div><span style="font-family:Roboto,sans-serif;font-size:13px;line-height:20px">Browser has public IP: </span>79.241.195.106</div><div><br></div><div>The INVITE after SDP Rewrite looks like this:</div><div><br></div><div><div>INVITE <a href="mailto:sip%3AeIh66yyxjlWNvNcuKWskH@whtest3.24dial.com" target="_blank">sip:eIh66yyxjlWNvNcuKWskH@whtest3.24dial.com</a> SIP/2.0</div><div>Record-Route: <sip:104.155.11.255;lr=on;nat=yes></div><div>Via: SIP/2.0/UDP 104.155.11.255:5060;branch=z9hG4bK683.5e75aa8b7f88561a91033a9b611fc0aa.0</div><div>Via: SIP/2.0/UDP 10.240.215.73:5060;rport=5060;received=146.148.113.245;branch=z9hG4bK5a79a7cf</div><div>Max-Forwards: 69</div><div>From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as53a7de72</div><div>To: <<a href="mailto:sip%3AeIh66yyxjlWNvNcuKWskH@whtest3.24dial.com" target="_blank">sip:eIh66yyxjlWNvNcuKWskH@whtest3.24dial.com</a>></div><div>Contact: <sip:anonymous@10.240.215.73:5060;alias=146.148.113.245~5060~1></div><div>Call-ID: <a href="http://523c5fda707c565c51b78c586247818e@10.240.215.73:5060" target="_blank">523c5fda707c565c51b78c586247818e@10.240.215.73:5060</a></div><div>CSeq: 102 INVITE</div><div>User-Agent: Asterisk PBX 12.5.0</div><div>Date: Thu, 23 Oct 2014 15:29:17 GMT</div><div>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE</div><div>Supported: replaces, timer</div><div>Content-Type: application/sdp</div><div>Content-Length: 738</div><div>P-hint: outbound</div><div><br></div><div>v=0</div><div>o=root 985629145 985629145 IN IP4 104.155.11.255</div><div>s=Asterisk PBX 12.5.0</div><div>c=IN IP4 104.155.11.255</div><div>t=0 0</div><div>a=ice-lite</div><div>m=audio 31630 RTP/SAVPF 3 0 8 101</div><div>a=rtpmap:3 GSM/8000</div><div>a=rtpmap:0 PCMU/8000</div><div>a=rtpmap:8 PCMA/8000</div><div>a=rtpmap:101 telephone-event/8000</div><div>a=fmtp:101 0-16</div><div>a=ptime:20</div><div>a=maxptime:150</div><div>a=sendrecv</div><div>a=rtcp:31631</div><div>a=rtcp-mux</div><div>a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:H9uLHKvstgjd58cZKa0LeRaxvf5XNJhaHgxDut7L</div><div>a=setup:actpass</div><div>a=fingerprint:sha-1 D9:26:45:E1:D6:E7:01:A4:04:90:F2:15:AF:A3:AD:01:3C:39:9B:7D</div><div>a=ice-ufrag:YoTvWbLM</div><div>a=ice-pwd:eifInSr3Oh8ZvMXjlE89mh8kF1OC</div><div>a=tDndidate:krhMgLYHbAxWidfK 1 UDP 2130706431 104.155.11.255 31630 typ host</div><div>a=candidate:krhMgLYHbAxWidfK 2 UDP 2130706430 104.155.11.255 31631 typ host</div></div><div><br></div><div><br></div><div>The 200 OK like this:<br></div><div><br></div><div><div>SIP/2.0 200 OK</div><div>Via: SIP/2.0/UDP 104.155.11.255:5060;branch=z9hG4bK683.5e75aa8b7f88561a91033a9b611fc0aa.0;rport=5060;received=104.155.11.255</div><div> , SIP/2.0/UDP 10.240.215.73:5060;rport=5060;received=146.148.113.245;branch=z9hG4bK5a79a7cf</div><div>From: "Anonymous" <sip:anonymous@anonymous.invalid>;tag=as53a7de72</div><div>To:  <<a href="mailto:sip%3AeIh66yyxjlWNvNcuKWskH@whtest3.24dial.com" target="_blank">sip:eIh66yyxjlWNvNcuKWskH@whtest3.24dial.com</a>>;tag=6QTSN6N2SBW2FW49TMGJQJYZMGHQZ7LCUMQT</div><div>Contact:  <<a href="mailto:sip%3AeIh66yyxjlWNvNcuKWskH@whtest3.24dial.com" target="_blank">sip:eIh66yyxjlWNvNcuKWskH@whtest3.24dial.com</a>>;tag=6QTSN6N2SBW2FW49TMGJQJYZMGHQZ7LCUMQT</div><div>Call-ID: <a href="http://523c5fda707c565c51b78c586247818e@10.240.215.73:5060" target="_blank">523c5fda707c565c51b78c586247818e@10.240.215.73:5060</a></div><div>CSeq: 102 INVITE</div><div>Content-Type: application/sdp</div><div>Content-Length: 938</div><div><br></div><div>v=0</div><div>o=- 1907956949290984340 2 IN IP4 127.0.0.1</div><div>s=-</div><div>t=0 0</div><div>m=audio 43590 UDP/TLS/RTP/SAVPF 0 8 101</div><div>c=IN IP4 79.241.195.106</div><div>a=rtcp:1 IN IP4 0.0.0.0</div><div>a=candidate:290309024 1 udp <a href="tel:2122260223" value="+12122260223" target="_blank">2122260223</a> 192.168.35.78 43590 typ host generation 0</div><div>a=candidate:2416297236 1 udp 1686052607 79.241.195.106 43590 typ srflx raddr 192.168.35.78 rport 43590 generation 0</div><div>a=candidate:1607352144 1 tcp 1518280447 192.168.35.78 0 typ host tcptype active generation 0</div><div>a=candidate:2416297236 1 udp 1686052607 79.241.195.106 43590 typ srflx raddr 192.168.35.78 rport 43590 generation 0</div><div>a=ice-ufrag:ZtbtZieUG9l22iCb</div><div>a=ice-pwd:kRkmd0XuFdj+CKXVpInmK3yV</div><div>a=fingerprint:sha-256 ED:DB:B8:D5:4D:38:1F:81:DC:94:9F:EB:6D:07:56:75:57:45:F4:F7:57:4D:C6:89:70:CC:13:6D:35:C0:8B:45</div><div>a=setup:active</div><div>a=mid:audio</div><div>a=sendrecv</div><div>a=rtcp-mux</div><div>a=rtpmap:0 PCMU/8000</div><div>a=rtpmap:8 PCMA/8000</div><div>a=rtpmap:101 telephone-event/8000</div><div>a=msid-semantic: WMS mPbtogqqqsv8DygpyOmxrTkjgW9aGzkbP3Vk</div></div><div><br></div><div><br></div><div>Unfortunately Kamailio log does not tell me, that the response get's processed. (See kamailio_behind_nat.log). I traced with TShark and can see that the SIP/200 OK arrive at kamailio host.</div><div><br></div><div>Any Idea, what might be missing in my routing script?</div><div><br></div><div>I would be very grateful for any help.<br></div><div><br></div><div>Regards,</div><div>Marko</div></div>