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...
I suppose one fix is to just make sure that the most recent reply is retrieved from the 'acc' table when computing this information, as it will contain the right AVP values.
I'm wondering if there's anything easier than that.
On 02/24/2010 11:19 AM, Alex Balashov wrote:
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...