Hi!!<br><br> I load balancing between 2 asterisk,the load_balancer it s done correctly but the calls hangs up after 10 second approximately. My setup is (just with 1 asterisk):<br> <br> Cisco GW ----(NAT)----> Opensips --------> Asterisk <br>
<br>My problem is that opensips never receive the ACK from Cisco GW even if this last one sent it.<br><br>CISCO logs:<br>ACK sip:911126667@<b>public ip of asterisk</b> :5060 SIP/2.0 <br>Route: <sip:<b>internal ip of opensips</b>;lr=on;ftag=F40B44FC-18A6;did=1cd.369d0f26><br>
<br>I think cisco reply ACK to Asterisk through the internal ip of opensips cause opensips did not provide Cisco with his public IP (NAT).<br><br>Can somebody help me with this??<br><br>I heard about fix_nated_contact() but i don't know how and where in my script¿Somebody send me examples ?<br>
<br><br>Thank you very much!!<br><br>my opensips.cfg:<br>route{<br><br> if (!mf_process_maxfwd_header("10")) {<br> sl_send_reply("483","looping");<br> exit;<br>
}<br> if ($rU==NULL) { <br> # request with no Username in RURI <br> sl_send_reply("484","Address Incomplete"); <br> exit; <br> }<br> if (!has_totag()) {<br>
# initial request<br> record_route();<br> } else {<br> # sequential request -> obey Route indication<br> loose_route();<br> t_relay();<br>
exit;<br> }<br> <br> if ( is_method("CANCEL") ) {<br> if ( t_check_trans() )<br> t_relay();<br> exit;<br> }<br><br><br>
# from now on we have only the initial requests<br> if (!is_method("INVITE")) {<br> send_reply("405","Method Not Allowed");<br> exit;<br> }<br>
<br> # detect resources and do balancing<br> if (method=="INVITE") {<br> load_balance("1","calls"); <br> }<br><br> # LB function returns negative if no suitable destination (for requested resources) is found,<br>
# or if all destinations are full<br> if ($retcode<0) {<br> sl_send_reply("500","Service full");<br> exit;<br> }<br><br> xlog("Selected destination is: $du\n");<br>
<br> # send it out<br> if (!t_relay()) {<br> sl_reply_error();<br> }<br>}<br><br><br><br><br clear="all"><br><span style="font-size: 13px; font-family: arial,sans-serif; border-collapse: collapse;"><div>
<table style="border-width: 0px; padding: 0px;"><tbody><tr><td style="border-width: 0px; padding: 0px 15px 0px 0px; margin: 0px; font-family: arial,sans-serif;"><br></td><td style="border-width: 0px; padding: 0px; margin: 0px; vertical-align: top; font-family: arial,sans-serif;">
<br></td></tr></tbody></table>
<hr>
<p style="margin-top: 10px; font-size: 10px; color: rgb(163, 162, 167); font-family: Arial;">Aviso
legal: Este mensaje electrónico está dirigido únicamente a la(s)
dirección(es) indicadas anteriormente; el carácter confidencial,
personal e intransferible del mismo está protegido legalmente. Cualquier
revelación, uso o reenvío no autorizado, completo o en parte, está
prohibido. Si ha recibido este mensaje por equivocación, notifíquelo
inmediatamente a la persona que lo ha enviado y borre el mensaje
original junto con sus ficheros anexos sin leerlo ni grabarlo, total o
parcialmente.</p></div></span><br>