[OpenSIPS-Users] Generate CANCEL on 180

Calvin Ellison calvin.ellison at voxox.com
Tue Apr 20 20:58:19 EST 2021


Once you receive 200 it is too late to CANCEL. You will need to ACK the 200
and then BYE the call.


Regards,

*Calvin Ellison*
Systems Architect
calvin.ellison at voxox.com
+1 (213) 285-0555

-----------------------------------------------
*voxox.com <http://www.voxox.com/> *
5825 Oberlin Drive, Suite 5
San Diego, CA 92121
[image: Voxox]


On Tue, Apr 20, 2021 at 1:14 PM Antonis Psaras <apsaras at microbase.gr> 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-bounces at lists.opensips.org> On Behalf Of Kingsley Tart
> Sent: Τρίτη, 20 Απριλίου 2021 20:10
> To: OpenSIPS users mailling list <users at 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 at lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20210420/c358f984/attachment.html>


More information about the Users mailing list