Here is a problem I am sure is not new (1.5.x):
modparam("acc", "db_extra", "gateway_id=$avp(s:gateway_id)")
route {
...
$avp(s:gateway_id) = 13;
$ru = "some.gw1";
t_on_failure("1");
if(!t_relay()) sl_reply_error(); }
# Serial forking rollover route
failure_route[1] {
if(t_was_cancelled()) exit;
$avp(s:gateway_id) = 14; $rd = "some.gw2";
append_branch();
t_relay();
}
The problem is, when serial forking happens, the CDR rows in 'acc' still show a value of 13 for 'gateway_id'. This is obviously because the value is sampled at the time of the initial stateful relay processing and is not updated afterward.
Any easy/elegant fix? I can think of several fixes that don't involve using 'acc', obviously, but I'd rather avoid that...