[SR-Users] Problem with adding extra field in acc table.

Gary Chen Gary.Chen at lightyear.net
Fri May 4 17:08:47 CEST 2012


I using Mysql DB.
I need to add extra fields in acc table. The field having problem is the last one 'account'

Here is my code in kamailio.cfg:
...
modparam("acc",
"db_extra",
"src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;user_agent=$hdr(User-Agent);account=$var(s:account_number)")
...

route {

....

dp_translate("3", "$fU/$avp(s:dst)")
$v(s:account_number) = $avp(s:dst);

....
}

By
looking at the xlog message, $v(s:account_number) has correct value.
But the value in acc table is not always correct. Sometime account field
populated with 0 and sometime it populated with wrong account number.
It seems that $v(s:account_number) sometime corrupted.

Am I doing something wrong?

Gary

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20120504/0691647a/attachment.htm>


More information about the sr-users mailing list