[OpenSER-Users] How to set a fixed string as acc "extra" field?

Iñaki Baz Castillo ibc at aliax.net
Fri Feb 8 00:26:29 CET 2008


El Viernes, 8 de Febrero de 2008, Jesus Rodriguez escribió:

> > PD: Yes, I know I can do a bit "dirty" trick:
> >  modparam("acc", "radius_extra", "Source-IP=$si; Proxy-IP=$var(proxy-
> > ip)")
> >  ...
> >  $var(proxy-ip) = "88.88.88.88";
> >
> > but I'd prefer not to do it.
>
> Try something like:
>
>
> modparam("acc", "radius_extra", "SrcIP=$avp(srcip); ProxyIP=
> $avp(proxyip)")
> ...
> if is_method("INVITE") { /* or the logic you need */
> 	$avp(srcip) = $si;
> 	$avp(proxyip)= "whatever_string_you_want";
> }


Thanks Jesus, sure it works. But I'd prefer to avoid using an innecesary AVP 
(so using memory during transaction) just to store a fixed string which never 
changes. That's why I tryed to log the fixed string directly 
in "acc" "radius_ extra" parameter.

Is then not possible?

Thanks.


-- 
Iñaki Baz Castillo




More information about the sr-users mailing list