[Kamailio-Users] Normalising

Brian Chamberlain brian at asterisk.ie
Fri Mar 6 15:14:27 CET 2009


Hi Daniel,

Thanks for the response!

If I make       $avp(translated_uri) = $ru; I get

Mar  6 14:03:40 [19224] ERROR:core:pv_parse_avp_name: bad avp name  
[translated_uri]
Mar  6 14:03:40 [19224] ERROR:core:pv_parse_spec: pvar "avp" has an  
invalid name param [translated_uri]
Mar  6 14:03:40 [19224] ERROR:core:pv_parse_spec: wrong char [)/41] in  
[$avp(translated_uri)] at [19 (5)]
Mar  6 14:03:40 [19224] CRITICAL:core:yyerror: parse error in config  
file, line 527, column 8-28: unknown script variable
Mar  6 14:03:40 [19224] ERROR:core:main: bad config file (1 errors)


Do I need to define this avp somewhere? Sorry I haven't done much with  
AVP's before..

Thanks,
Brian

On 6 Mar 2009, at 13:48, Daniel-Constantin Mierla wrote:

> Hello,
>
> $var(...) is private variable per process. The accounting event  
> happens during 200ok and may be a different process than the one  
> processing the initial INVITE.
>
> use $avp(...) instead of $var(...) for this purpose.
>
> Cheers,
> Daniel
>
>
> On 03/06/2009 01:45 PM, Brian Chamberlain wrote:
>> Hi List!,
>>
>> I am trying to write a normalised uri into the radius record for  
>> accounting reasons.
>>
>> I have a route[5] that does the transformation for me
>>
>>
>> I translate the uri and store it in a variable.
>>
>>       $var(translated_uri) = $ru;
>>       $ru = $var(ruri_store);
>>
>> In the accounting module parameters I store Sip-Translated-Request- 
>> URI= $var(translated_uri) = $ru;
>>
>> I added the following debug in my route[5] to check the variables  
>> are being transformed and they are as I want.
>>
>>       xlog("L_INFO", "[TEMP1] Accounting translation: $ru\n");
>>       xlog("L_INFO", "[TEMP2] Accounting translation:  
>> $var(translated_uri)\n");
>>
>>
>> The Sip-Translated-Request-URI is equal to 0 on the radius record..
>> What am I missing here?
>>
>> I hope I have explained myself well
>>
>> Thanks,
>> Brian
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Kamailio (OpenSER) - Users mailing list
>> Users at lists.kamailio.org
>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>
> -- 
> Daniel-Constantin Mierla
> http://www.asipto.com
>
>











More information about the Users mailing list