<div dir="ltr">mmm smart... trying...<div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 10, 2021 at 7:50 PM Alex Balashov <<a href="mailto:abalashov@evaristesys.com">abalashov@evaristesys.com</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">Have you tried drop()ping the end-to-end `487 Request Terminated` reply <br>
from upstream in a failure_route, and then send_reply() in its place?<br>
<br>
-- Alex<br>
<br>
On 2/10/21 2:43 PM, David Villasmil wrote:<br>
<br>
> Actually I already implemented that timeout, I haven’t asked about that, <br>
> because I didn’t have any problems with that one.<br>
> <br>
> I am being asked for that “if a 180 comes within 0.8 seconds, cancel the <br>
> call and send a 480 to the origination.<br>
> <br>
> The cancel I got it working thanks to your help. Sending back a 480 to <br>
> the origination is what’s proving more difficult, I just can’t figure <br>
> that one out.<br>
> <br>
> On Wed, 10 Feb 2021 at 19:29, Alex Balashov <<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a> <br>
> <mailto:<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>>> wrote:<br>
> <br>
> Wouldn’t it make more sense to just have an aggressive timeout for<br>
> the “keeping it there” aspect?<br>
> <br>
> That is, if, upon receipt of a non-100 1xx message, a final<br>
> dispositive reply does not follow within X seconds, route-advance to<br>
> the next provider? This can be accomplished with the<br>
> t_set_fr/t_reset_fr() technique previously discussed.<br>
> <br>
> It sounds like you might be making this unnecessarily complicated.<br>
> :-) Don’t worry about how quickly they send you the<br>
> progress/alerting messages; instead, worry about how slowly they<br>
> send you anything else afterward.<br>
> <br>
> The only wrinkle I can see that in that is the caller experience...<br>
> <br>
> —<br>
> Sent from mobile, with due apologies for brevity and errors.<br>
> <br>
>> On Feb 10, 2021, at 2:13 PM, David Villasmil<br>
>> <<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a><br>
>> <mailto:<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>>> wrote:<br>
>><br>
>> <br>
>> Some providers have other providers which many times just answer<br>
>> the call and try to keep it there. It’s a known strategy some<br>
>> scammers use. Getting a 180/3 in say; 500ms (to a real-life hard<br>
>> line, is probably one such call.<br>
>><br>
>><br>
>> On Wed, 10 Feb 2021 at 18:52, Raúl Alexis Betancor Santana<br>
>> <<a href="mailto:rbetancor@serlink.es" target="_blank">rbetancor@serlink.es</a> <mailto:<a href="mailto:rbetancor@serlink.es" target="_blank">rbetancor@serlink.es</a>>> wrote:<br>
>><br>
>> What is the point of refusing a call that answer with a<br>
>> 100/183 "too quickly" ? ... I don't get the point on that.<br>
>><br>
>> Saludos<br>
>> --<br>
>> *Raúl Alexis Betancor Santana*<br>
>> Serlink Telecom S.R.L.U.<br>
>><br>
>> ------------------------------------------------------------------------<br>
>> *De: *"David Villasmil" <<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a><br>
>> <mailto:<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>>><br>
>> *Para: *"Kamailio (SER) - Users Mailing List"<br>
>> <<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a> <mailto:<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>>><br>
>> *Enviados: *Miércoles, 10 de Febrero 2021 9:57:35<br>
>> *Asunto: *Re: [SR-Users] Time elapsed since previous message.<br>
>><br>
>> Hello Alex,<br>
>> Again thanks.<br>
>><br>
>> I'm using that calculation to, when receiving a 180/3, if it<br>
>> comes in too quickly (i.e. 100ms) i cancel that call, and send<br>
>> a 480 the the A leg.<br>
>> I haven't found way of doing this, is this possible at all? I<br>
>> trired setting a very low t_set_fr(10,10) (0 means set the<br>
>> default), but that's not working...<br>
>><br>
>> Is there a way of doing this?<br>
>><br>
>> Thanks!<br>
>> Regards,<br>
>><br>
>> David Villasmil<br>
>> email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a><br>
>> <mailto:<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>><br>
>> phone: +34669448337<br>
>><br>
>><br>
>> On Tue, Feb 9, 2021 at 3:31 PM David Villasmil<br>
>> <<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a><br>
>> <mailto:<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>>> wrote:<br>
>><br>
>> Thanks Alex,<br>
>><br>
>> Exactly what I was thinking. Just wondering whether there<br>
>> was a better way.<br>
>><br>
>> Again THANKS!<br>
>><br>
>> David<br>
>><br>
>> On Tue, 9 Feb 2021 at 14:56, Alex Balashov<br>
>> <<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a><br>
>> <mailto:<a href="mailto:abalashov@evaristesys.com" target="_blank">abalashov@evaristesys.com</a>>> wrote:<br>
>><br>
>> Hi,<br>
>> You can store the timestamp of the last message of<br>
>> interest in a transaction-persistent variable - that<br>
>> is, an AVP or XAVP - using $TV():<br>
>><br>
>> <a href="https://www.kamailio.org/wiki/cookbooks/5.4.x/pseudovariables#tv_name" rel="noreferrer" target="_blank">https://www.kamailio.org/wiki/cookbooks/5.4.x/pseudovariables#tv_name</a><br>
>> <<a href="https://www.kamailio.org/wiki/cookbooks/5.4.x/pseudovariables#tv_name" rel="noreferrer" target="_blank">https://www.kamailio.org/wiki/cookbooks/5.4.x/pseudovariables#tv_name</a>><br>
>><br>
>> Then, you can do some arithmetic like this to turn the<br>
>> difference between two timestamps into milliseconds.<br>
>> This is stolen straight from CSRP so adapt to your<br>
>> needs. :-)<br>
>><br>
>> # Log request processing time.<br>
>><br>
>> $var(cur_time) = $TV(Sn);<br>
>><br>
>> $var(proc_diff) = (<br>
>> (((<br>
>> $(var(cur_time){s.select,0,.}{<a href="http://s.int" rel="noreferrer" target="_blank">s.int</a> <<a href="http://s.int" rel="noreferrer" target="_blank">http://s.int</a>>}) -<br>
>> $(avp(proc_start){s.select,0,.}{<a href="http://s.int" rel="noreferrer" target="_blank">s.int</a> <<a href="http://s.int" rel="noreferrer" target="_blank">http://s.int</a>>})<br>
>> ) * 1000000)<br>
>> +<br>
>> (<br>
>> $(var(cur_time){s.select,1,.}{<a href="http://s.int" rel="noreferrer" target="_blank">s.int</a> <<a href="http://s.int" rel="noreferrer" target="_blank">http://s.int</a>>}) -<br>
>> $(avp(proc_start){s.select,1,.}{<a href="http://s.int" rel="noreferrer" target="_blank">s.int</a> <<a href="http://s.int" rel="noreferrer" target="_blank">http://s.int</a>>})<br>
>> ) / 1000) mod 1000<br>
>> );<br>
>><br>
>><br>
>> — Alex<br>
>><br>
>> —<br>
>> Sent from my iPad<br>
>><br>
>> On Feb 9, 2021, at 9:40 AM, David Villasmil<br>
>> <<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a><br>
>> <mailto:<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>>> wrote:<br>
>><br>
>> Hello all,<br>
>><br>
>><br>
>> Is it possible to know the elapsed time since the<br>
>> previously received message?<br>
>><br>
>> On outgoing calls, I.e: when i get a 180, how long<br>
>> did the 100 arrived? Or the INVITE...<br>
>><br>
>> Thanks<br>
>><br>
>> David<br>
>> -- <br>
>> Regards,<br>
>><br>
>> David Villasmil<br>
>> email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a><br>
>> <mailto:<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>><br>
>> phone: +34669448337<br>
>><br>
>> _______________________________________________<br>
>> Kamailio (SER) - Users Mailing List<br>
>> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
>> <mailto:<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
>> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>> <<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>><br>
>><br>
>> _______________________________________________<br>
>> Kamailio (SER) - Users Mailing List<br>
>> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
>> <mailto:<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
>> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>> <<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>><br>
>><br>
>> -- <br>
>> Regards,<br>
>><br>
>> David Villasmil<br>
>> email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a><br>
>> <mailto:<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>><br>
>> phone: +34669448337<br>
>><br>
>><br>
>> _______________________________________________<br>
>> Kamailio (SER) - Users Mailing List<br>
>> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a> <mailto:<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
>> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>> <<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>><br>
>> _______________________________________________<br>
>> Kamailio (SER) - Users Mailing List<br>
>> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a> <mailto:<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
>> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>> <<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>><br>
>><br>
>> -- <br>
>> Regards,<br>
>><br>
>> David Villasmil<br>
>> email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a><br>
>> <mailto:<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>><br>
>> phone: +34669448337<br>
>> _______________________________________________<br>
>> Kamailio (SER) - Users Mailing List<br>
>> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a> <mailto:<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
>> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
>> <<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>><br>
> _______________________________________________<br>
> Kamailio (SER) - Users Mailing List<br>
> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a> <mailto:<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a>><br>
> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
> <<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>><br>
> <br>
> -- <br>
> Regards,<br>
> <br>
> David Villasmil<br>
> email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a> <br>
> <mailto:<a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a>><br>
> phone: +34669448337<br>
> <br>
> _______________________________________________<br>
> Kamailio (SER) - Users Mailing List<br>
> <a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
> <a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
> <br>
<br>
-- <br>
Alex Balashov | Principal | Evariste Systems LLC<br>
<br>
Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)<br>
Web: <a href="http://www.evaristesys.com/" rel="noreferrer" target="_blank">http://www.evaristesys.com/</a>, <a href="http://www.csrpswitch.com/" rel="noreferrer" target="_blank">http://www.csrpswitch.com/</a><br>
<br>
_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div>