if i put in radius_extra "Some-Known-Attribute=$avp(s:bar)" and in onreply_route
if (is_method("INVITE") && t_check_status("200")) { xlog("L_INFO", "Setting <s:bar> to <test>\n"); $avp(s:bar) = "test"; };
i do not get Some-Known-Attribute = "test" to accounting Start request although i do get
Mar 12 07:20:32 rautu /usr/sbin/openser[7440]: Setting <s:bar> to <test>
in syslog.
i didn't find from acc/README information on when the AVPs in radius_extra are evaluated. accounting Start is sent out AFTER final response (200 ok) had been received, because it contains
SIP-Response-Code = 200
why doesn't setting $avp(s:bar) in onreply_route cause Some-Known-Attribute to be included in accounting start record?
-- juha
Hi Juha,
acc module generates the log on TMCB_RESPONSE_OUT TM callback - so,when TM sends out the 200 ok reply, which is after the on-reply route.
The question is - have you enabled the "onreply_avp_mode" TM param? http://www.openser.org/docs/modules/1.3.x/tm.html#AEN304
Regards, Bogdan
Juha Heinanen wrote:
if i put in radius_extra "Some-Known-Attribute=$avp(s:bar)" and in onreply_route
if (is_method("INVITE") && t_check_status("200")) { xlog("L_INFO", "Setting <s:bar> to <test>\n"); $avp(s:bar) = "test"; };
i do not get Some-Known-Attribute = "test" to accounting Start request although i do get
Mar 12 07:20:32 rautu /usr/sbin/openser[7440]: Setting <s:bar> to <test>
in syslog.
i didn't find from acc/README information on when the AVPs in radius_extra are evaluated. accounting Start is sent out AFTER final response (200 ok) had been received, because it contains
SIP-Response-Code = 200
why doesn't setting $avp(s:bar) in onreply_route cause Some-Known-Attribute to be included in accounting start record?
-- juha
Users mailing list Users@lists.openser.org http://lists.openser.org/cgi-bin/mailman/listinfo/users
Bogdan-Andrei Iancu writes:
The question is - have you enabled the "onreply_avp_mode" TM param? http://www.openser.org/docs/modules/1.3.x/tm.html#AEN304
bogdan,
no, i had not realized that, by default, transaction avps are not visible in onrely_route. thanks for the hint.
the reason for "onreply_avp_mode" existence seems to be performance. in this particular example, i would not need to do set onreply_route at all, if there were "success_route" block similar to "failure_route" block, but that gets executed on positive rather than negative final reply. now i need to simulate "success_route" by testing in onreply_route if reply status is 200, which is not efficient, because onreply_route gets executed for vain on all other replies.
what do you think, would it make sense to add feature request on "success_route"?
-- juha