[OpenSIPS-Users] Storing an extra variable using Radius and CDRTool

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Aug 7 16:09:41 CEST 2014


Hi Nick,

You have some inconsistency there - in modparam() you use $avp(x), while 
in onreply_route you have $var(x)  :)....

Change the modparam() to $var() too.

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 07.08.2014 16:19, Nick Cameo wrote:
> Hey Bogdan!
>
> The FreeRadius/CDRTool stuff (ie, dictionary,query,plsql) have been modified
> to reflect the newly created variable. In the script I have the following:
>
> modparam("acc", "aaa_extra", Underline-Carrier=$avp(under_carr)")
>
> onreply_route[1] {
>          xlog("L_INFO","Incoming Reply Route: From=$fu, To=$tu, RU=$ru,
> CI=$ci IP=$si\n");
>
>          #Determine Underline Carrier
>          if ($rs == 200)
>                  if(has_body("application/sdp")) {
>                          $var(under_carr) = $(rb{sdp.line,c,0});
>                          xlog("The first c line in the SDP body is
> $var(under_carr)\n");
>                  }
>          }
>
> }
>
>
> The debug line gets printed with the sought after value on 200 OK
> (ie, The first c line in the SDP body is c=IN IP4 256.256.256.256)
> however, the value is not being picked up by radius or acc?
>
> Please not we are using aaa_extra instead of db_extra. Also, we tried to
> switch between $avp and $var to no avail. There are other variables
> defined that use $avp in the main route that get picked up
> by acc and radius correctly:
>
> if (is_method("INVITE") && !has_totag()) {
>                  setflag(1); # Do accounting ...
>                  setflag(2); # Even for missed calls
>                  setflag(3); # Begin sip trace
>
>                  $avp(billing_party) = $fu;
>                  $avp(sip_proxy_ip) = $Ri;
>                  $avp(can_uri) = $ru;
>
>                  topology_hiding();
> }
>
>
>
> Thanks in Advance,
>
> Nick




More information about the Users mailing list