[OpenSIPS-Users] ACK/BYE delivery

M.Khaled W Chehab kchehab at icucall.com
Fri Feb 22 23:20:42 CET 2013


Hi,
 
I am using Resedential.conf file with permission module
I have a problem that when a call behind nat send  a call to voipswitch and
voipswitch forward the call to opensips -àtrunk,
The 100 trying ,180 ringing and the 200 Ok work fine unless the ACK reply
for the 200 ok will be directly forwarded from voipswitch to trunk ,without
passing by opensips .
As I can see in the capture that when opensips send the 200 OK to Voipswitch
the 
<sip:3450966508993881 at opensips IP address>;tag=9302846936345048301
Contact: <sip:966508993881 at Trunk IP address instead of opensips IP ADDRESS
:5060;user=phone;transport=udp;nat=yes>
 
We try to do some work around as but it didn’t succeed as  the call ends
with forbidden 
 
 
if(!(is_method("INVITE|ACK|CANCEL|BYE|UPDATE|OPTIONS|INFO"))) {
                                         xlog("L_INFO", ">>>>> Rejecting
method '$rm' from '$fu' to '$ru' - User-Agent: $ua <<<<<\n");
                                         sl_send_reply("405","Method Not
Allowed");
                                         exit;
                    } else {
                                         if (is_method("REGISTER")) {
 
fix_nated_register();
                                         } else {
 
fix_nated_contact();
                                         }
                                         setflag(5);
                                         setbflag(6);
                    }
 
route[1] {
 
 
        if (subst_uri('/(sip:.*);nat=yes/\1/')) {
                setbflag(6);
        }
 
        if (isflagset(5)) {
                search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
        }
 
 
onreply_route[2] {
        search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
 
        if (isbflagset(6)) {
                fix_nated_contact();
        };
 
 
                    if (t_check_status("200") ) {
                                         if (is_method("INVITE")) {
                                                             if
(subst('/^Contact: <sip:([0-9]+)@(.*)$/Contact: <sip:\1@$Ri:$Rp>\r/ig')) {
 
xlog("L_INFO","-- Contact modified!");
                                                             };
                                         }
 
Please advice
 
Regards
                    
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130223/c0c59336/attachment.htm>


More information about the Users mailing list