Hello,
On 3/21/13 2:18 PM, Ali Jawad wrote:
Hi
I am storing accounting entries in the db, and I am also inserting
some custom AVP values, however I also need to store the GeoIP value
that I am extracting using gip. I did try the below, but it is not
working, any other ideas how I could achieve this ?
modparam("acc", "log_extra",
"src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;CountryCode=$gip(src=>cc)")
the $gip(...) has to be set when the accounting record is written, that
is 200 OK if you do standard accounting with flags, so you have to set
it in onreply route.
If you want to be safe, just store the $gip(...) value in an avp when
you want to set it:
modparam("acc", "log_extra",
"src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;CountryCode=$avp(gipcc)")
...
$avp(gipcc) = $gip(src=>cc);
Cheers,
Daniel
--
Daniel-Constantin Mierla -
http://www.asipto.com
http://twitter.com/#!/miconda -
http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
-
http://conference.kamailio.com -