Hi Brian, you should use $avp(*s:*translated_uri) = $ru;
You have 2 types of AVPs, by index and by string. Rgds, Uriel On Fri, Mar 6, 2009 at 12:14 PM, Brian Chamberlain <br...@asterisk.ie>wrote: > 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@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 > > > > > > > > > > > > > > _______________________________________________ > Kamailio (OpenSER) - Users mailing list > Users@lists.kamailio.org > http://lists.kamailio.org/cgi-bin/mailman/listinfo/users > http://lists.openser-project.org/cgi-bin/mailman/listinfo/users >
_______________________________________________ Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users