HI Daniel,

That would be great if it were possible, unfortunately, the code I attempted doesn't seem to be working. Here's the code snippet I tried:

route[TEST] {
t_set_fr(1000);
t_on_failure("CONTACT_LOOKUP_FAILED");
evapi_async_relay({"field":"value"})
}

failure_route[CONTACT_LOOKUP_FAILED] {
xlogl("L_INFO","Failed Transaction ID [$T(id_index):$T(id_label)]\n");
route(RELAY);
exit;
}

 I'm wondering if there might be something I'm overlooking?

Regards,

On Wed, 29 Nov 2023 at 12:42, Daniel-Constantin Mierla <miconda@gmail.com> wrote:

Hello,

a suspended transaction is kept silently for the duration of the timeout (see t_set_fr()), then it fails and jumps to a failure route (if you set one) -- maybe you can leverage this mechanism somehow.

Cheers,
Daniel

On 29.11.23 12:53, Ilie Soltanici via sr-users wrote:
Hello,

I'm trying to use the evapi_async_relay function from the evapi module, however,I don't want the transaction to be suspended for more than 1 second. 
For instance, if there's no response from the external application within this time frame, I want the script to continue and remove that transaction from memory. 
One potential approach I am considering is to add suspended transactions to a hash table with a timestamp value. Then, using rtimer module, I could periodically parse this table every second and process the results, but I'm not sure how efficient is that. 

Maybe you know other alternative, more efficient solutions (from a performance point of view) that could achieve the same goal?
Any insights or recommendations would be greatly appreciated.
Thank you.

__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to sr-users-leave@lists.kamailio.org
Important: keep the mailing list in the recipients, do not reply only to the sender!
Edit mailing list options or unsubscribe:
-- 
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy and Development Services
Kamailio Advanced Training -- asipto.com