[Kamailio-Users] Logging of db_extra parameters + serial forking

Alex Balashov abalashov at evaristesys.com
Wed Feb 24 17:19:34 CET 2010


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...

-- 
Alex Balashov - Principal
Evariste Systems LLC

Tel    : +1 678-954-0670
Direct : +1 678-954-0671
Web    : http://www.evaristesys.com/




More information about the sr-users mailing list