[SR-Users] t_suspend / t_continue & insert_hf

Fuad Trle trle.fuad at gmail.com
Fri Mar 25 16:08:17 CET 2022


Hello,

I'm inserting some headers after getting value from http_async_query. If a
call is relayed, I see them. But If I t_suspend and t_continue call (before
time out), I do not see added headers. Here is flow:

route(START)
t_newtran();
#.. prep for query
http_async_query("url","HTTP");

route(HTTP)
#.. collect and using data from query
insert_hf("$var(key): $var(value)\r\n");
t_store();

if (registered("location") {
    route(RELAY);
} else {
    t_suspend();
    exit;
}

route(AWAKE)
t_continue();

I see that the branch index ($T_branch_idx) is 0 at start. 1 after http
query, +1 if there is forking or location. +1 after t_suspend. It looks
like t_continue uses a branch with index after t_suspend. I tried with
t_save_lumps() to carry over changes.

Any idea how to do this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220325/cde47a68/attachment.htm>


More information about the sr-users mailing list