<div dir="ltr"><div><div>Thank you for your answer.<br><br></div>The problem I have is with internet router doing to PAT to SIP port.<br></div>I am already advertising public IP but unfortunately I cant know the public port I am using.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-12-28 18:17 GMT+01:00 Alexandru Covalschi <span dir="ltr"><<a href="mailto:568691@gmail.com" target="_blank">568691@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">AFAIK bye is usually sent to the address stored in record_route. Try setting changing record_route() to record_route_preset("PUBLICIP:5060;nat=yes:)<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2015-12-23 16:28 GMT+02:00 Nelson Migliaro <span dir="ltr"><<a href="mailto:eng.migliaro@gmail.com" target="_blank">eng.migliaro@gmail.com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"> <div><div><div><div><div><div>Hello,<br><br></div>I am running Kamailio behind NAT.<br><br></div>Kanailio has a private IP and I am relaying NAT to internet router.<br><br></div>I am using:<br><br>- #!define WITH_NAT<br>- listen=udp:PRIVATE-IP:5060 advertise PUBLIC-IP:5060<br><br></div>- Patched RTP proxy including the advertise option<br><br></div>And everything goes fine. I can make calls and have two way audio.<br><br></div>The problem begins when the callee ends the call. BYE is not received in Kamailio (caller)<br><div><div><br></div><div>I included the public IP using "add_contact_alias" because "set_contact_alias" was not adding the public IP. I included this in in NATDETECT (pre loaded router)<br></div><div><br>        if(is_first_hop()) {<br>            xlog("L_NOTICE","Metodo: $rm \n");<br>            xlog("L_NOTICE","is first hop\n");<br>            #set_contact_alias();<br>                 if (!add_contact_alias("PUBLIC-IP", "$Rp", "udp")) {<br>                 xlog("L_ERR", "Error in aliasing contact $ct\n");<br>                    send_reply("400", "Bad request");<br>                            exit;<br>                    }<br>        }<br><br></div><div>I think the problem is related to destination that BYE is sent by the vendor. From what I see IP and port is taken from advertised in contact (PUBLIC-IP and 5060). <br>The problem is that internet router changes the source port.<br><br>Contact: <sip:999999999@PRIVATE-IP:5060;alias=PUBLIC-IP~5060~1><br><br></div><div>--- Is it correcto to add_contact_alias("PUBLIC-IP", "$Rp", "udp") in order to received new transactions or should I follow a different procedure???<br><br></div><div>Thank you<br><br><br></div><div><br></div></div></div>
<br></div></div>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div><div dir="ltr">Alexandru Covalschi<br>ABRISS-Solutions<div>VoIP engineer and system administrator<br>phone: <a href="tel:%2B37367398493" value="+37367398493" target="_blank">+37367398493</a><br>web: <a href="http://abs-telecom.com/" target="_blank">http://abs-telecom.com/</a></div></div></div>
</font></span></div>
<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<a href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><br></div>