Hello,

In 3.1, create_dialog [1] supports passing it the 'E' flag which will lead to the call termination if a dialog race condition occurs.

The dialog will be ended after race_condition_timeout [2] seconds.

Some of the most frequent race conditions are documented in RFC 5407 [3], and the dialog module currently supports terminating the call in case races 3.1.2 and 3.1.3 from the RFC occur.

[1] https://opensips.org/html/docs/modules/3.1.x/dialog.html#func_create_dialog <https://opensips.org/html/docs/modules/3.1.x/dialog.html#func_create_dialog>

[2] https://opensips.org/html/docs/modules/3.1.x/dialog.html#race_condition_timeout <https://opensips.org/html/docs/modules/3.1.x/dialog.html#race_condition_timeout>

[3] https://tools.ietf.org/html/rfc5407 <https://tools.ietf.org/html/rfc5407>

On 21.04.2021 15:52, Antonis Psaras wrote:
Hello Vlad

I am using 2.4 so race_condition_timeout is not available but I can upgrade if 
required.

Actually is not very clear to me what that parameter does. Can you explain a 
bit more?

Regards


Antonis Psaras / Managing Director
-----Original Message-----
From: Users <users-boun...@lists.opensips.org> On Behalf Of Vlad Paiu
Sent: Τετάρτη, 21 Απριλίου 2021 15:45
To: users@lists.opensips.org
Subject: Re: [OpenSIPS-Users] Generate CANCEL on 180

Hello,

Try using the race_condition_timeout dialog param along with the 'E'
flag when creating the dialog.

https://opensips.org/html/docs/modules/3.1.x/dialog.html#race_condition_timeout
<https://opensips.org/html/docs/modules/3.1.x/dialog.html#race_condition_timeout>

Best Regards,
Vlad
On 21.04.2021 12:46, Antonis Psaras wrote:
Hello Bogdan

The flow is the following

INVITE
Trying (instantly)
(after 2sec)
183
(after 3sec)
180
(here I do the process but during that I receive)
200 (instantly)
(here the CANCEL is sent)
CANCEL

And the call is keep going, hence the CANCEL was ignored by the carrier by the 
carrier because the call was answered.

Regards


Antonis Psaras

-----Original Message-----
From: Bogdan-Andrei Iancu <bog...@opensips.org>
Sent: Τετάρτη, 21 Απριλίου 2021 12:32
To: apsa...@microbase.gr; OpenSIPS users mailling list
<users@lists.opensips.org>
Subject: Re: [OpenSIPS-Users] Generate CANCEL on 180

Hi Antonis,

What exactly does not work ? sending the CANCEL out? or the callee "refuses" to 
cancel and sends a 200 OK ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
     https://www.opensips-solutions.com
OpenSIPS Bootcamp 2021 online
     https://opensips.org/training/OpenSIPS_eBootcamp_2021/

On 4/20/21 11:13 PM, Antonis Psaras wrote:
I did the following

if (t_check_status("180"))
{
        t_cancel_branch();
                  drop;
}

But there is an issue.

When 180 is followed by 200 instantly, the CANCEL is not working as expected.

When I add a delay on Answer ie 1sec then CANCEL works.

Any suggestion?

Antonis Psaras

-----Original Message-----
From: Users <users-boun...@lists.opensips.org> On Behalf Of Kingsley
Tart
Sent: Τρίτη, 20 Απριλίου 2021 20:10
To: OpenSIPS users mailling list <users@lists.opensips.org>
Subject: Re: [OpenSIPS-Users] Generate CANCEL on 180

Firstly, I'm new to OpenSIPS so treat my comments accordingly.

But, can you do something in an onreply route?

eg, in a test setup I have, when I get an INVITE I do this:

        create_dialog("pPB");
        t_on_reply("doodle");

(I can't remember whether the dialog is needed for this)

and then I have this:

onreply_route[doodle] {
        # expect $T_reply_code to likely first be 100
        # then 180 or 183 for a progressing call
        # 200 when call is answered
        # or failure code (eg 4xx) or whatever
        if (t_check_status("^1[0-9][0-9]$")) {
                switch ($T_reply_code) {
                        case 180: $acc_extra(t_ringing) = $Ts; break;
                        case 183: $acc_extra(t_progress) = $Ts; break;
                }
        } else if (t_check_status("^2[0-9][0-9]$")) {
                $acc_extra(t_answer) = $Ts;
        } else {
                xlog("Something else\n");
        }
}

so when a 180 is received, it calls the above route function. Could you send a 
CANCEL from there?

Cheers,
Kingsley.

On Tue, 2021-04-20 at 16:55 +0300, Antonis Psaras wrote:
Dear all

I am trying to create a service which will generate missed calls. In
order to be more accurate, I want to CANCEL the request when 180 is
received.

The scenario is the following

Asterisk Invite -> OpenSIPs -> Carrier

Carrier 183 -> OpenSIPs -> Asterisk

Carrier 180 -> OpenSIPs

OpenSIPs Cancel -> Carrier

Is that possible to be done from script without external app? Regards _______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to