[Users] Passing predefined string-value to RADIUS accounting server

Bogdan-Andrei Iancu bogdan at voice-system.ro
Fri May 4 19:29:27 CEST 2007


Hi Peter,

use an avp as holder for your string:

modparam("acc", "radius_extra", "User-Name=$fU; Sip-User-Realm=$avp(i:10)")

and

in routing script:

$avp(i:10)= "MYREALM";

regards,
bogdan


Peter Lemenkov wrote:
> Hello All!
> I've encountered some difficulties. I need to pass predefined string
> value ("REALM" actually) to accounting RADIUS server. I want to did it
> in way similar to:
>
>
> modparam("acc", "radius_extra", "User-Name=$fU; Sip-User-Realm=$ar")
>
> But I need to set realm for all radius-accounting requests to some
> value ("MYREALM" for example).
>
> I tried set $ar explicitly before accounting this way
>
> $ar = "MYREALM";
>
> but failed with error "invalid left operand in assignment". Does $ar
> read-only variable?
> Another my try was to pass new realm value in module configuration 
> section:
>
> modparam("acc", "radius_extra", "User-Name=$fU; Sip-User-Realm=MYREALM")
>
> It failed with message "parse failed in <Sip-User-Realm=MYREALM>
> around position ..."
>
> I can't set up custom variable before route{} sections so I can't
> define my $var(realm) into module configuration line.
>
> Are any ways to solve my problem exists?





More information about the Users mailing list