Hello,

replied to the other email on the topic of the last question here, but
for sake of having it in the archive of this thread as well, in case
people end up here by web searching: look at tmx module, it has some
cancel-related functions.

Cheers,
Daniel

On 10.02.21 10:57, David Villasmil wrote:
> Hello Alex,
>
> Again thanks.
>
> I'm using that calculation to, when receiving a 180/3, if it comes in
> too quickly (i.e. 100ms) i cancel that call, and send a 480 the the A leg.
> I haven't found way of doing this, is this possible at all? I trired
> setting a very low t_set_fr(10,10) (0 means set the default), but
> that's not working...
>
> Is there a way of doing this?
>
> Thanks!
> Regards,
>
> David Villasmil
> email: [email protected]
> <mailto:[email protected]>
> phone: +34669448337
>
>
> On Tue, Feb 9, 2021 at 3:31 PM David Villasmil
> <[email protected]
> <mailto:[email protected]>> wrote:
>
>     Thanks Alex, 
>
>     Exactly what I was thinking. Just wondering whether there was a
>     better way.
>
>     Again THANKS!
>
>     David
>
>     On Tue, 9 Feb 2021 at 14:56, Alex Balashov
>     <[email protected] <mailto:[email protected]>> wrote:
>
>         Hi,
>
>         You can store the timestamp of the last message of interest in
>         a transaction-persistent variable - that is, an AVP or XAVP -
>         using $TV():
>
>         https://www.kamailio.org/wiki/cookbooks/5.4.x/pseudovariables#tv_name
>         
> <https://www.kamailio.org/wiki/cookbooks/5.4.x/pseudovariables#tv_name>
>
>         Then, you can do some arithmetic like this to turn the
>         difference between two timestamps into milliseconds. This is
>         stolen straight from CSRP so adapt to your needs. :-)
>
>               # Log request processing time.
>
>               $var(cur_time) = $TV(Sn);
>
>               $var(proc_diff) = (
>                       (((
>                         $(var(cur_time){s.select,0,.}{s.int <http://s.int>}) 
> - 
>                         $(avp(proc_start){s.select,0,.}{s.int <http://s.int>})
>                       ) * 1000000)
>                       + 
>                       (
>                        $(var(cur_time){s.select,1,.}{s.int <http://s.int>}) - 
>                        $(avp(proc_start){s.select,1,.}{s.int <http://s.int>}) 
>                       ) / 1000) mod 1000
>               );
>
>         — Alex
>
>         —
>         Sent from my iPad
>
>>         On Feb 9, 2021, at 9:40 AM, David Villasmil
>>         <[email protected]
>>         <mailto:[email protected]>> wrote:
>>
>>         Hello all,
>>
>>         Is it possible to know the elapsed time since the previously
>>         received message?
>>
>>         On outgoing calls, I.e: when i get a 180, how long did the
>>         100 arrived? Or the INVITE...
>>
>>         Thanks
>>
>>         David 
>>         -- 
>>         Regards,
>>
>>         David Villasmil
>>         email: [email protected]
>>         <mailto:[email protected]>
>>         phone: +34669448337
>>         _______________________________________________
>>         Kamailio (SER) - Users Mailing List
>>         [email protected] <mailto:[email protected]>
>>         https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>         <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
>         _______________________________________________
>         Kamailio (SER) - Users Mailing List
>         [email protected] <mailto:[email protected]>
>         https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>         <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
>
>     -- 
>     Regards,
>
>     David Villasmil
>     email: [email protected]
>     <mailto:[email protected]>
>     phone: +34669448337
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> [email protected]
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla

_______________________________________________
Kamailio (SER) - Users Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to