ACK/BYE delivery

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

ACK/BYE delivery

M.Khaled W Chehab
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@opensips IP address>;tag=9302846936345048301
Contact: <sip:966508993881@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
                    

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ACK/BYE delivery

shaheryarkh
Remove all workarounds and set OpenSIPS as your outbound proxy in your VOIPSwitch. This should do the trick.

Thank you.


On Fri, Feb 22, 2013 at 11:20 PM, M.Khaled W Chehab <[hidden email]> wrote:
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@opensips IP address>;tag=9302846936345048301
Contact: <sip:966508993881@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
                    

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ACK/BYE delivery

M.Khaled W Chehab


Hi,
That cant  be done on voipswitch as i cant ask every client to do that on its switch. Checking if i can have a complete solution.

Regards

Sent from

android device.



-----Original Message-----
From: Muhammad Shahzad <[hidden email]>
To: OpenSIPS users mailling list <[hidden email]>
Sent: Sat, 23 Feb 2013 6:34 PM
Subject: Re: [OpenSIPS-Users] ACK/BYE delivery

Remove all workarounds and set OpenSIPS as your outbound proxy in your VOIPSwitch. This should do the trick.

Thank you.


On Fri, Feb 22, 2013 at 11:20 PM, M.Khaled W Chehab <[hidden email]> wrote:
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@opensips IP address>;tag=9302846936345048301
Contact: <sip:966508993881@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
                    

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: ACK/BYE delivery

Bogdan-Andrei Iancu-2
Hi,

The Contact must reflect the IP of the other device in the dialog - if you are changing it, you are braking the in-dialog routing - you cannot simply change headers and still expect to work.

So, why do you want to change the in the 200 OK Contact the received IP with the IP of OpenSIPS ??

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 02/23/2013 08:41 PM, M. KHaled W. Chehab wrote:


Hi,
That cant  be done on voipswitch as i cant ask every client to do that on its switch. Checking if i can have a complete solution.

Regards

Sent from

android device.



-----Original Message-----
From: Muhammad Shahzad [hidden email]
To: OpenSIPS users mailling list [hidden email]
Sent: Sat, 23 Feb 2013 6:34 PM
Subject: Re: [OpenSIPS-Users] ACK/BYE delivery

Remove all workarounds and set OpenSIPS as your outbound proxy in your VOIPSwitch. This should do the trick.

Thank you.


On Fri, Feb 22, 2013 at 11:20 PM, M.Khaled W Chehab <[hidden email]> wrote:
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 
<a class="moz-txt-link-rfc2396E" href="sip:3450966508993881@opensipsIPaddress"><sip:3450966508993881@opensips IP address>;tag=9302846936345048301
Contact: <<a class="moz-txt-link-freetext" href="sip:966508993881@">sip:966508993881@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('/(<a class="moz-txt-link-freetext" href="sip:.*">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: <<a class="moz-txt-link-freetext" href="sip:(">sip:([0-9]+)@(.*)$/Contact: <a class="moz-txt-link-rfc2396E" href="sip:\1@$Ri:$Rp"><sip:\1@$Ri:$Rp>\r/ig')) {
                                                                                 xlog("L_INFO","-- Contact modified!");
                                                             };
                                         }
 
Please advice
 
Regards
                    

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users




--
Muhammad Shahzad
-----------------------------------
CISCO Rich Media Communication Specialist (CRMCS)
CISCO Certified Network Associate (CCNA)
Cell: +49 176 99 83 10 85
MSN: [hidden email]
Email: [hidden email]
_______________________________________________ Users mailing list [hidden email] http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users