[SR-Users] Forward reply in onreply_route

Emmanuel BUU emmanuel.buu at ives.fr
Tue Jun 28 17:24:47 CEST 2022


Le 28/06/2022 à 15:54, Carsten Bock a écrit :
> Hi,
>
> Question:
> Is there a way to forward a reply from the reply route and do other 
> stuff afterward? We are currently doing operations on a 183 reply and 
> it would be useful if we could forward the reply before continuing to 
> process other stuff.
>
> High-Level example:
>
> /route {
>   t_on_reply("REPLY");
>   t_relay();
> }
>
> onreply_route[REPLY] {
>   // Forward the reply to the Caller
>   t_relay(); // Does not work, as t_relay is only allowed in request 
> and failure-routes
>
>   // Do other fancy stuff, e.g. a DB Update or anything else
> }/
>
> Any ideas?
>
I would use *http_async_query()* in the onreply route, delegate some of 
the DB update an other stuff to an HTTP server. And if there is a need 
to further interact with K, there is a way to specify an HTTP reply 
route that will be called asynchronously.

See : HTTP_ASYNC_CLIENT Module (kamailio.org) 
<https://www.kamailio.org/docs/modules/stable/modules/http_async_client.html>

> Thanks,
> Carsten
>
>
>
>
> --
> Carsten Bock I CTO & Founder
>
> ng-voice GmbH
>
> Trostbrücke 1 I 20457 Hamburg I Germany
> T +49 179 2021244 I www.ng-voice.com <http://www.ng-voice.com/>
>
> Registry Office at Local Court Hamburg, HRB 120189
> Managing Directors: Dr. David Bachmann, Carsten Bock
>
>
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
>    *sr-users at lists.kamailio.org
> Important: keep the mailing list in the recipients, do not reply only to the sender!
> Edit mailing list options or unsubscribe:
>    *https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220628/332bac74/attachment.htm>


More information about the sr-users mailing list