The request ACK not forwarded when using topology_hiding()

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

The request ACK not forwarded when using topology_hiding()

Александр Пучков
Hi!

When using the functions topology_hiding() and match_dialog() the
request ACK not forwarded (link 2) to the nextscheme:

UAC --(link 1)--> OpenSIPS --(link 2)--> Asterisk

It must be so?

A little piece of config:

http://pastebin.com/39vV4eYT

--
С уважением,
Александр Пучков,
Системный администратор,
Тел.:      +7(496) 569-24-24 доб.тел. 255;
ООО "ПОИГ" (Интернет-провайдер г. Щелково)
Факс:      +7(496) 569-24-24 доб. 103;
Адрес:     141108, М.О., г.Щелково, Пролетарский пр., д.11;
WEB:       http://www.schelkovo-net.ru


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

Re: The request ACK not forwarded when using topology_hiding()

LAVerPNZ
Alexander, you have solved the problem with an ACK message when using
topology_hiding () and match_dialog ()?

02.04.2014 17:04, Александр Пучков пишет:

> Hi!
>
> When using the functions topology_hiding() and match_dialog() the
> request ACK not forwarded (link 2) to the nextscheme:
>
> UAC --(link 1)--> OpenSIPS --(link 2)--> Asterisk
>
> It must be so?
>
> A little piece of config:
>
> http://pastebin.com/39vV4eYT
>
> --
> С уважением,
> Александр Пучков,
> Системный администратор,
> Тел.:      +7(496) 569-24-24 доб.тел. 255;
> ООО "ПОИГ" (Интернет-провайдер г. Щелково)
> Факс:      +7(496) 569-24-24 доб. 103;
> Адрес:     141108, М.О., г.Щелково, Пролетарский пр., д.11;
> WEB:       http://www.schelkovo-net.ru
>
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: The request ACK not forwarded when using topology_hiding()

Bogdan-Andrei Iancu-2
Hi,

Could you post a SIP capture of the call (showing both legs, on the
opensips machine) ?

Regards,

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

On 01.08.2014 21:40, Лытаев Антон Викторович wrote:

> Alexander, you have solved the problem with an ACK message when using
> topology_hiding () and match_dialog ()?
>
> 02.04.2014 17:04, Александр Пучков пишет:
>> Hi!
>>
>> When using the functions topology_hiding() and match_dialog() the
>> request ACK not forwarded (link 2) to the nextscheme:
>>
>> UAC --(link 1)--> OpenSIPS --(link 2)--> Asterisk
>>
>> It must be so?
>>
>> A little piece of config:
>>
>> http://pastebin.com/39vV4eYT
>>
>> --
>> С уважением,
>> Александр Пучков,
>> Системный администратор,
>> Тел.:      +7(496) 569-24-24 доб.тел. 255;
>> ООО "ПОИГ" (Интернет-провайдер г. Щелково)
>> Факс:      +7(496) 569-24-24 доб. 103;
>> Адрес:     141108, М.О., г.Щелково, Пролетарский пр., д.11;
>> WEB:       http://www.schelkovo-net.ru
>>
>>
>> _______________________________________________
>> 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


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

Re: The request ACK not forwarded when using topology_hiding()

LAVerPNZ
if use the topology_hiding() without match_dialog() in has_totag():

    # account only INVITEs
    if (is_method("INVITE")) {
            if (registered("location","$fu")&&!client_nat_test("8"))
                {
                topology_hiding();
                setflag(1); # do accounting
                }
            else {
                sl_send_reply("403","Forbidden auth ID bla");
                exit;
                }
      }
..............................
    if (has_totag()) {
        if (loose_route()) {
            if (is_method("BYE")) {
                setflag(1); # do accounting ...
                setflag(3); # ... even if the transaction fails
            } else if (is_method("INVITE")) {
                record_route();
            }
            route(1);
        } else {
            if ( is_method("ACK") ) {
                if ( t_check_trans() ) {
                    t_relay();
                    exit;
                } else {
                    exit;
                }
            }
        sl_send_reply("404","Not here blabla");
        }
        exit;
    }......................

then capture of the call looks like this:



need to change has_totag (), adding match_dialog (), but how to do it right?

06.08.2014 19:22, Bogdan-Andrei Iancu пишет:
Hi,

Could you post a SIP capture of the call (showing both legs, on the opensips machine) ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer


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

Re: The request ACK not forwarded when using topology_hiding()

Pavel Eremin-3
You may try it in main route:

   if (has_totag()  && (uri == myself)  && is_method("INVITE|ACK|BYE|UPDATE"))

        {
                if(match_dialog())
                        {
                                xlog("in-dialog topology hiding request - $DLG_dir (from $fu to $to uri: $ru\n");
                                route(1);
                                exit;
                        }
        }


2014-08-07 13:18 GMT+06:00 Лытаев Антон Викторович <[hidden email]>:
if use the topology_hiding() without match_dialog() in has_totag():

    # account only INVITEs
    if (is_method("INVITE")) {
            if (registered("location","$fu")&&!client_nat_test("8"))
                {
                topology_hiding();
                setflag(1); # do accounting
                }
            else {
                sl_send_reply("403","Forbidden auth ID bla");
                exit;
                }
      }
..............................
    if (has_totag()) {
        if (loose_route()) {
            if (is_method("BYE")) {
                setflag(1); # do accounting ...
                setflag(3); # ... even if the transaction fails
            } else if (is_method("INVITE")) {
                record_route();
            }
            route(1);
        } else {
            if ( is_method("ACK") ) {
                if ( t_check_trans() ) {
                    t_relay();
                    exit;
                } else {
                    exit;
                }
            }
        sl_send_reply("404","Not here blabla");
        }
        exit;
    }......................

then capture of the call looks like this:



need to change has_totag (), adding match_dialog (), but how to do it right?

06.08.2014 19:22, Bogdan-Andrei Iancu пишет:
Hi,

Could you post a SIP capture of the call (showing both legs, on the opensips machine) ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: The request ACK not forwarded when using topology_hiding()

LAVerPNZ
In reply to this post by Bogdan-Andrei Iancu-2
Bogdan, please help, it is necessary to correctly use a bunch:
topology_hiding () and match_dialog () with loose_route () design
has_totag (). If I completely replace loose_route () function
match_dialog (), then requests 487 and 404 from the upstream server -
there is an invalid SIP-exchange

06.08.2014 19:22, Bogdan-Andrei Iancu пишет:

> Hi,
>
> Could you post a SIP capture of the call (showing both legs, on the
> opensips machine) ?
>
> Regards,
>
> Bogdan-Andrei Iancu
> OpenSIPS Founder and Developer
> http://www.opensips-solutions.com
>
> On 01.08.2014 21:40, Лытаев Антон Викторович wrote:
>> Alexander, you have solved the problem with an ACK message when using
>> topology_hiding () and match_dialog ()?
>>
>> 02.04.2014 17:04, Александр Пучков пишет:
>>> Hi!
>>>
>>> When using the functions topology_hiding() and match_dialog() the
>>> request ACK not forwarded (link 2) to the nextscheme:
>>>
>>> UAC --(link 1)--> OpenSIPS --(link 2)--> Asterisk
>>>
>>> It must be so?
>>>
>>> A little piece of config:
>>>
>>> http://pastebin.com/39vV4eYT
>>>
>>> --
>>> С уважением,
>>> Александр Пучков,
>>> Системный администратор,
>>> Тел.:      +7(496) 569-24-24 доб.тел. 255;
>>> ООО "ПОИГ" (Интернет-провайдер г. Щелково)
>>> Факс:      +7(496) 569-24-24 доб. 103;
>>> Адрес:     141108, М.О., г.Щелково, Пролетарский пр., д.11;
>>> WEB:       http://www.schelkovo-net.ru
>>>
>>>
>>> _______________________________________________
>>> 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
>
>
> _______________________________________________
> 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
Reply | Threaded
Open this post in threaded view
|

Re: The request ACK not forwarded when using topology_hiding()

Bogdan-Andrei Iancu-2
In reply to this post by LAVerPNZ
Hi,

Replace :

    if (has_totag()) {
        if (loose_route()) {


with:

    if (has_totag()) {
        if (loose_route() || match_dialog()) {

Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
On 07.08.2014 10:18, Лытаев Антон Викторович wrote:
if use the topology_hiding() without match_dialog() in has_totag():

    # account only INVITEs
    if (is_method("INVITE")) {
            if (registered("location","$fu")&&!client_nat_test("8"))
                {
                topology_hiding();
                setflag(1); # do accounting
                }
            else {
                sl_send_reply("403","Forbidden auth ID bla");
                exit;
                }
      }
..............................
    if (has_totag()) {
        if (loose_route()) {
            if (is_method("BYE")) {
                setflag(1); # do accounting ...
                setflag(3); # ... even if the transaction fails
            } else if (is_method("INVITE")) {
                record_route();
            }
            route(1);
        } else {
            if ( is_method("ACK") ) {
                if ( t_check_trans() ) {
                    t_relay();
                    exit;
                } else {
                    exit;
                }
            }
        sl_send_reply("404","Not here blabla");
        }
        exit;
    }......................

then capture of the call looks like this:



need to change has_totag (), adding match_dialog (), but how to do it right?

06.08.2014 19:22, Bogdan-Andrei Iancu пишет:
Hi,

Could you post a SIP capture of the call (showing both legs, on the opensips machine) ?

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer



_______________________________________________
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