[OpenSIPS-Users] radius accounting

Peter Chamula chamula at acs.sk
Mon Feb 9 10:07:41 CET 2009


Hi, thanks for reply

it really helped me
but than i have nothing in this field in radius db
it is same with these fields

Sip-RPid=$avp(s:rpid); \
Source-IP=$avp(s:source_ip); \
Source-Port=$avp(s:source_port); \
SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
Canonical-URI=$avp(s:can_uri); \

Billing-Party=$avp(billing_party); \

only working is canonical-uri, after adition this lines to route login

route {
       ...
       setflag(ACCOUNTING_FLAG);
       $avp(s:can_uri) = $ru;
       ...
}

but i dont know how to define other fields (espacialy billing-party, it
is very important to me)

thanks

Regards
Peter

Gabriel Bermudez  wrote / napísal(a):
> Hi Peter
>
> Peter Chamula escribió:
>   
>> hello
>>
>> i am trying to set up opensips with freeradius accounting, opensips and
>> freeradius are on separate servers
>> freeradius is patched (at least i hope so, becouse there were some problems)
>>
>> in opensips.conf i need to add some field for radius
>> modparam("acc", "radius_extra",       "User-Name=$Au; \
>>                                        Calling-Station-Id=$from; \
>>                                        Called-Station-Id=$to; \
>>                                        Sip-Translated-Request-URI=$ru; \
>>                                        Sip-RPid=$avp(s:rpid); \
>>                                        Source-IP=$avp(s:source_ip); \
>>                                        Source-Port=$avp(s:source_port); \
>>                                        SIP-Proxy-IP=$avp(s:sip_proxy_ip); \
>>                                        Canonical-URI=$avp(s:can_uri); \
>>                                        Billing-Party=$avp(billing_party); \
>>                                       
>> Divert-Reason=$avp(s:divert_reason); \
>>                                        User-Agent=$hdr(user-agent); \
>>                                        Contact=$hdr(contact); \
>>                                        Event=$hdr(event); \
>>                                        ENUM-TLD=$avp(s:enum_tld)")
>>
>> with this i am getting errors
>>
>> if i try something more simple
>> modparam("acc", "radius_extra","User-Name=$Au; Calling-Station-Id=$from;
>> Called-Station-Id=$to; Sip-Translated-Request-URI=$
>> ru;")
>> works only with
>> modparam("acc", "radius_extra","User-Name=$Au; Calling-Station-Id=$from;
>> Called-Station-Id=$to")
>>
>> ERROR:acc:parse_acc_extra: parse failed in <User-Name=$Au;
>> Calling-Station-Id=$from; Called-Station-Id=$to;
>> Sip-Translated-Request-URI=$ru;> around position 95
>>
>> so error must be in Sip-Translated-Request-URI
>> my radius client config is set to modparam("acc", "radius_config",
>> "/usr/local/etc/radiusclient-ng/radiusclient.conf")
>>
>> in this config dictionary points to dictionary     
>> /usr/local/etc/radiusclient-ng/dictionary
>> here i included this
>>
>> $INCLUDE        /usr/local/etc/radiusclient-ng/dictionary.opensips
>> $INCLUDE        /usr/local/etc/radiusclient-ng/dictionary.mediaproxy
>>
>> Sip-Translated-Request-URI is in dictionar.opensips
>>
>> ATTRIBUTE Sip-Translated-Request-URI   107  string     # Proprietary, acc
>>
>> please , can someone help me ?
>>
>>
>>
>>   
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>   
>>     
>
> Something similar happened to me I change from
>
> Billing-Party=$avp(billing_party); \ -> Billing-Party=$avp(s:billing_party); \
>
> Try it out and tell us your experience
>
> Regardas,
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


-------------- next part --------------
A non-text attachment was scrubbed...
Name: chamula.vcf
Type: text/x-vcard
Size: 108 bytes
Desc: not available
Url : http://lists.opensips.org/pipermail/users/attachments/20090209/6784b354/attachment.vcf 


More information about the Users mailing list