<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    <div class="moz-cite-prefix">On 3/21/13 2:18 PM, Ali Jawad wrote:<br>
    </div>
    <blockquote
cite="mid:CAG2QdgbUmxOsgksbShzsET2n0nm6OqjN2g2Rw5tvvAuwz-CkqA@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div dir="ltr">
          <div>
            <div><font><font style="background-color:rgb(255,255,255)">Hi</font></font></div>
          </div>
          <div><font><font style="background-color:rgb(255,255,255)">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 ?&nbsp;</font></font></div>
          <div><font><font style="background-color:rgb(255,255,255)"><br>
              </font></font></div>
          <div><font><font style="background-color:rgb(255,255,255)"><br>
              </font></font></div>
          <div><font><font style="background-color:rgb(255,255,255)">
                <div>
                  modparam("acc", "log_extra",</div>
                <div>&nbsp; &nbsp; &nbsp; &nbsp;
"src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;CountryCode=$gip(src=&gt;cc)")</div>
              </font></font></div>
        </div>
      </div>
    </blockquote>
    <br>
    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.<br>
    <br>
    If you want to be safe, just store the $gip(...) value in an avp
    when you want to set it:<br>
    <br>
    <div><font><font style="background-color:rgb(255,255,255)">
          <div>
            modparam("acc", "log_extra",</div>
          <div>&nbsp; &nbsp; &nbsp; &nbsp;
"src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd;CountryCode=$avp(gipcc)")<br>
            ...<br>
            <font><font style="background-color:rgb(255,255,255)">$avp(gipcc)
                = </font></font><font><font
                style="background-color:rgb(255,255,255)">$gip(src=&gt;cc);</font></font></div>
        </font></font></div>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a>
Kamailio World Conference, April 16-17, 2013, Berlin
 - <a class="moz-txt-link-freetext" href="http://conference.kamailio.com">http://conference.kamailio.com</a> -</pre>
  </body>
</html>