<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks Uriel,<div><br></div><div>I will make this change later..</div><div><br></div><div>Regards,</div><div>Brian</div><div><br><div><div>On 6 Mar 2009, at 14:32, Uriel Rozenbaum wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">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">&lt;<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 &nbsp; &nbsp; &nbsp; $avp(translated_uri) = $ru; I get<br> <br> Mar &nbsp;6 14:03:40 [19224] ERROR:core:pv_parse_avp_name: bad avp name<br> [translated_uri]<br> Mar &nbsp;6 14:03:40 [19224] ERROR:core:pv_parse_spec: pvar "avp" has an<br> invalid name param [translated_uri]<br> Mar &nbsp;6 14:03:40 [19224] ERROR:core:pv_parse_spec: wrong char [)/41] in<br> [$avp(translated_uri)] at [19 (5)]<br> Mar &nbsp;6 14:03:40 [19224] CRITICAL:core:yyerror: parse error in config<br> file, line 527, column 8-28: unknown script variable<br> Mar &nbsp;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> >> &nbsp; &nbsp; &nbsp; $var(translated_uri) = $ru;<br> >> &nbsp; &nbsp; &nbsp; $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> >> &nbsp; &nbsp; &nbsp; xlog("L_INFO", "[TEMP1] Accounting translation: $ru\n");<br> >> &nbsp; &nbsp; &nbsp; 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></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif; "><font class="Apple-style-span" face="Verdana" size="3"><span class="Apple-style-span" style="font-size: 13px;"><br></span></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-family: Calibri, sans-serif; "><font class="Apple-style-span" face="Verdana"><font class="Apple-style-span" size="1"><span class="Apple-style-span" style="font-size: 9px; "><br></span></font></font></div><div style="margin-top: 0cm; margin-right: 0cm; margin-left: 0cm; margin-bottom: 0.0001pt; font-family: Calibri, sans-serif; "><font class="Apple-style-span" face="Verdana"><font class="Apple-style-span" size="1"><span class="Apple-style-span" style="font-size: 9px; "><br></span></font></font></div></div></span></span></span></span></span></div></span></div></span></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></div></body></html>