<div dir="ltr"><div>Certain providers do this all the time : they bill faulty numbers<br></div><div><br></div><div>So they give 180 followed by instant 200 and then they play : "the number that you tried to reach ....". <br></div><div><br></div><div>Actually, Antonis, you should try a few of those numbers manually, I bet you that they are all faulty. <br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Op di 20 apr. 2021 om 23:02 schreef Calvin Ellison <<a href="mailto:calvin.ellison@voxox.com">calvin.ellison@voxox.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Once you receive 200 it is too late to CANCEL. You will need to ACK the 200 and then BYE the call.<br clear="all"><div><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br></div><div dir="ltr"><br></div><div dir="ltr">Regards,<div><br></div><div><p style="font-family:helvetica,arial,sans-serif;font-size:12px;margin:0px;padding:0px 0px 20px;color:rgb(0,0,0)"><strong>Calvin Ellison</strong><br>Systems Architect<br><a href="mailto:calvin.ellison@voxox.com" style="text-decoration:none;color:rgb(14,123,174)" target="_blank">calvin.ellison@voxox.com</a><br>+1 (213) 285-0555<br><br>-----------------------------------------------<br><strong><a href="http://www.voxox.com/" style="text-decoration:none;color:rgb(14,123,174)" target="_blank">voxox.com</a> </strong><br>5825 Oberlin Drive, Suite 5<br>San Diego, CA 92121<br></p><img src="http://cdn.voxox.com/img/voxox-logo.png" alt="Voxox" style="color: rgb(0, 0, 0); font-family: "Times New Roman"; font-size: medium;"><br></div></div></div></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 20, 2021 at 1:14 PM Antonis Psaras <<a href="mailto:apsaras@microbase.gr" target="_blank">apsaras@microbase.gr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I did the following<br>
<br>
if (t_check_status("180"))<br>
{<br>
t_cancel_branch();<br>
drop;<br>
}<br>
<br>
But there is an issue.<br>
<br>
When 180 is followed by 200 instantly, the CANCEL is not working as expected.<br>
<br>
When I add a delay on Answer ie 1sec then CANCEL works.<br>
<br>
Any suggestion?<br>
<br>
Antonis Psaras <br>
<br>
-----Original Message-----<br>
From: Users <<a href="mailto:users-bounces@lists.opensips.org" target="_blank">users-bounces@lists.opensips.org</a>> On Behalf Of Kingsley Tart<br>
Sent: Τρίτη, 20 Απριλίου 2021 20:10<br>
To: OpenSIPS users mailling list <<a href="mailto:users@lists.opensips.org" target="_blank">users@lists.opensips.org</a>><br>
Subject: Re: [OpenSIPS-Users] Generate CANCEL on 180<br>
<br>
Firstly, I'm new to OpenSIPS so treat my comments accordingly.<br>
<br>
But, can you do something in an onreply route?<br>
<br>
eg, in a test setup I have, when I get an INVITE I do this:<br>
<br>
create_dialog("pPB");<br>
t_on_reply("doodle");<br>
<br>
(I can't remember whether the dialog is needed for this)<br>
<br>
and then I have this:<br>
<br>
onreply_route[doodle] {<br>
# expect $T_reply_code to likely first be 100<br>
# then 180 or 183 for a progressing call<br>
# 200 when call is answered<br>
# or failure code (eg 4xx) or whatever<br>
if (t_check_status("^1[0-9][0-9]$")) {<br>
switch ($T_reply_code) {<br>
case 180: $acc_extra(t_ringing) = $Ts; break;<br>
case 183: $acc_extra(t_progress) = $Ts; break;<br>
}<br>
} else if (t_check_status("^2[0-9][0-9]$")) {<br>
$acc_extra(t_answer) = $Ts;<br>
} else {<br>
xlog("Something else\n");<br>
}<br>
}<br>
<br>
so when a 180 is received, it calls the above route function. Could you send a CANCEL from there?<br>
<br>
Cheers,<br>
Kingsley.<br>
<br>
On Tue, 2021-04-20 at 16:55 +0300, Antonis Psaras wrote:<br>
> Dear all<br>
> <br>
> I am trying to create a service which will generate missed calls. In <br>
> order to be more accurate, I want to CANCEL the request when 180 is <br>
> received.<br>
> <br>
> The scenario is the following<br>
> <br>
> Asterisk Invite -> OpenSIPs -> Carrier<br>
> <br>
> Carrier 183 -> OpenSIPs -> Asterisk<br>
> <br>
> Carrier 180 -> OpenSIPs<br>
> <br>
> OpenSIPs Cancel -> Carrier<br>
> <br>
> <br>
> Is that possible to be done from script without external app?<br>
> <br>
> Regards<br>
> <br>
> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org" target="_blank">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
</blockquote></div>