Hi Brian,<br><br>you should use $avp(<b>s:</b>translated_uri) = $ru;<br><br>You have 2 types of AVPs, by index and by string.<br><br>Rgds,<br>Uriel<br><br><div class="gmail_quote">On Fri, Mar 6, 2009 at 12:14 PM, Brian Chamberlain <span dir="ltr"><<a href="mailto:brian@asterisk.ie">brian@asterisk.ie</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi Daniel,<br>
<br>
Thanks for the response!<br>
<br>
If I make $avp(translated_uri) = $ru; I get<br>
<br>
Mar 6 14:03:40 [19224] ERROR:core:pv_parse_avp_name: bad avp name<br>
[translated_uri]<br>
Mar 6 14:03:40 [19224] ERROR:core:pv_parse_spec: pvar "avp" has an<br>
invalid name param [translated_uri]<br>
Mar 6 14:03:40 [19224] ERROR:core:pv_parse_spec: wrong char [)/41] in<br>
[$avp(translated_uri)] at [19 (5)]<br>
Mar 6 14:03:40 [19224] CRITICAL:core:yyerror: parse error in config<br>
file, line 527, column 8-28: unknown script variable<br>
Mar 6 14:03:40 [19224] ERROR:core:main: bad config file (1 errors)<br>
<br>
<br>
Do I need to define this avp somewhere? Sorry I haven't done much with<br>
AVP's before..<br>
<br>
Thanks,<br>
<font color="#888888">Brian<br>
</font><div><div></div><div class="h5"><br>
On 6 Mar 2009, at 13:48, Daniel-Constantin Mierla wrote:<br>
<br>
> Hello,<br>
><br>
> $var(...) is private variable per process. The accounting event<br>
> happens during 200ok and may be a different process than the one<br>
> processing the initial INVITE.<br>
><br>
> use $avp(...) instead of $var(...) for this purpose.<br>
><br>
> Cheers,<br>
> Daniel<br>
><br>
><br>
> On 03/06/2009 01:45 PM, Brian Chamberlain wrote:<br>
>> Hi List!,<br>
>><br>
>> I am trying to write a normalised uri into the radius record for<br>
>> accounting reasons.<br>
>><br>
>> I have a route[5] that does the transformation for me<br>
>><br>
>><br>
>> I translate the uri and store it in a variable.<br>
>><br>
>> $var(translated_uri) = $ru;<br>
>> $ru = $var(ruri_store);<br>
>><br>
>> In the accounting module parameters I store Sip-Translated-Request-<br>
>> URI= $var(translated_uri) = $ru;<br>
>><br>
>> I added the following debug in my route[5] to check the variables<br>
>> are being transformed and they are as I want.<br>
>><br>
>> xlog("L_INFO", "[TEMP1] Accounting translation: $ru\n");<br>
>> xlog("L_INFO", "[TEMP2] Accounting translation:<br>
>> $var(translated_uri)\n");<br>
>><br>
>><br>
>> The Sip-Translated-Request-URI is equal to 0 on the radius record..<br>
>> What am I missing here?<br>
>><br>
>> I hope I have explained myself well<br>
>><br>
>> Thanks,<br>
>> Brian<br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>><br>
>> ------------------------------------------------------------------------<br>
>><br>
>> _______________________________________________<br>
>> Kamailio (OpenSER) - Users mailing list<br>
>> <a href="mailto:Users@lists.kamailio.org">Users@lists.kamailio.org</a><br>
>> <a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
>> <a href="http://lists.openser-project.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser-project.org/cgi-bin/mailman/listinfo/users</a><br>
><br>
> --<br>
> Daniel-Constantin Mierla<br>
> <a href="http://www.asipto.com" target="_blank">http://www.asipto.com</a><br>
><br>
><br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Kamailio (OpenSER) - Users mailing list<br>
<a href="mailto:Users@lists.kamailio.org">Users@lists.kamailio.org</a><br>
<a href="http://lists.kamailio.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.kamailio.org/cgi-bin/mailman/listinfo/users</a><br>
<a href="http://lists.openser-project.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.openser-project.org/cgi-bin/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br>