[SR-Users] Some clarifications needed on async_task_route

Daniel-Constantin Mierla miconda at gmail.com
Mon Mar 19 18:23:38 CET 2018


Hello,

no actions are executed in the same route block after the line with
async_task_route("NICE_TO_HAVE") -- see the readme of the async module
at the documentation for this function.

If you want to continue executing the actions after pushing a task for
another process, you can try to combine mqueue+rtimer, but in your
example won't work, because the rtimer won't have the current sip
message in order to get the dialog for it.

Cheers,
Daniel


On 19.03.18 16:41, George Diamantopoulos wrote:
> Hello all,
>
> I've been exploring the async module a little, and async_task_route()
> more specifically. I have async_workers set, and the async module loaded.
>
> However, whenever this async function is involved in SIP processing,
> kamailio returns a 500 error to the UAC. I was hoping that someone
> could confirm that this function is suitable for my needs, I'm not
> sure I understand the docs very well on this one.
>
> So the plan is to have some of the processing of the transaction
> performed asynchronously, as it is not required for routing etc.
> Here's an example of what I'm trying to achieve, it's not really
> critical if NICE_TO_HAVE route functions fail etc, I just need
> request_route processing to continue normally without waiting
> for async_task_route("NICE_TO_HAVE") to finish whatever it's going to
> be doing:
>
> request_route() {
>
> ...
>
> SIP_PROCESSING_A
>
> ...
>
> async_task_route("NICE_TO_HAVE")
>
> ...
>
> SIP_PROCESSING_B
>
> t_relay();
>
> }
>
> route(NICE_TO_HAVE) {
>
> dlg_var(sth) = something_derived_from_global_vars();
>
> }
>
> Is this possible, or am I completely out of scope here? Thanks!
>
> BR,
> George
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - April 16-18, 2018, Berlin - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180319/62a0d076/attachment.html>


More information about the sr-users mailing list