[sr-dev] ACC events missing to-tag when doing t_reply

Julien Chavanton jchavanton at gmail.com
Fri Jul 31 09:30:26 CEST 2020


I can see TM API is exposing

tmb.t_get_reply_totag(msg, &to_tag);

looking at what can be done from acc_logic.c

on_missed

/* set env variables */
env_set_to( get_rpl_to(t,reply) );
env_set_code_status( code, reply);
...

On Thu, Jul 30, 2020 at 11:51 PM Julien Chavanton <jchavanton at gmail.com>
wrote:

> Hi, considering this example :
>
>
> modparam("acc_json", "acc_missed_flag", 6)
>
> failure_route[test] {
>     setflag(6); // MISSED_ACC, the failure will be recorded by ACC
>     t_flush_flags(); // This will set the flags in the newly created transaction
>     t_reply("500", "Service Unavailable");
> }
>
> This does generate an ACC event, however the to-tag is not populated, my guess this is because the TM callback is done before the to-tag is generated.
>
> I wonder if there is a way to populate the to-tag immediately ?
>
> I will dig it further, but maybe there is a trick I am missing
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20200731/073e25af/attachment-0001.htm>


More information about the sr-dev mailing list