<p>I don't know that its mentioned in the documentation, but I ran across the same issue and remembered finding something about it by searching nabble's opensips part.</p>
<p>Its one of those things you chalk up to experience.</p>
<p>Sent from Droid</p>
<div class="gmail_quote">On Feb 6, 2011 8:54 PM, "Nigel Daniels" <<a href="mailto:nigel.daniels@connectandsell.com">nigel.daniels@connectandsell.com</a>> wrote:<br type="attribution">> that seems to be working, thanks alot ! clearly I need to re-read the docs<br>
> <br>> On Sun, Feb 6, 2011 at 6:48 PM, Dave Singer <<a href="mailto:dave.singer@wideideas.com">dave.singer@wideideas.com</a>>wrote:<br>> <br>>> Isn't<br>>> $var(my_uri) = "<a href="mailto:555@example.com">555@example.com</a>";<br>
>> $ru = "sip:" + $var(my_ruri);<br>>> the same as<br>>> rewriteuri("<a href="mailto:sip%3A555@example.com">sip:555@example.com</a>");<br>>> just that using $ru you can use it just like assigning to other vars<br>
>> like you are doing.<br>>><br>>><br>>> On Sun, Feb 6, 2011 at 6:36 PM, Duane Larson <<a href="mailto:duane.larson@gmail.com">duane.larson@gmail.com</a>><br>>> wrote:<br>>> > Avpops<br>
>> ><br>>> > Sent from Droid<br>>> ><br>>> > On Feb 6, 2011 8:34 PM, "Nigel Daniels" <<br>>> <a href="mailto:nigel.daniels@connectandsell.com">nigel.daniels@connectandsell.com</a>><br>
>> > wrote:<br>>> >> the problem is that rewriteuri() does not support variables is there any<br>>> >> alternative to rewriteuri() for changing the uri<br>>> >><br>>> >> On Sun, Feb 6, 2011 at 6:26 PM, Tyler Merritt <<a href="mailto:tyler@fonality.com">tyler@fonality.com</a>><br>
>> wrote:<br>>> >><br>>> >>> I do this as well:<br>>> >>><br>>> >>> $var(origFromNumber) = $(re{uri.user});<br>>> >>> $var(finalFromURI) = "sip:81" + $(var(origFromNumber){s.substr,1,0}) +<br>
>> >>> "@"<br>>> >>> + $fd;<br>>> >>><br>>> >>> This works fine for me. Takes what is essentially a DID and formats it<br>>> to<br>>> >>> a SIP PEER string as per the carrier.<br>
>> >>><br>>> >>> You say that var(z) prints correctly in the logs, but according to the<br>>> >>> parser it's not a legit URI. It may just be that your upstream routes<br>>> >>> don't<br>
>> >>> recognize this format.<br>>> >>><br>>> >>> We use the usr_loc and db_aliases in order to match the URI up with a<br>>> >>> destination - have you ensured that there is a valid destination for<br>
>> this<br>>> >>> SIP URI?<br>>> >>><br>>> >>> _______________________________________________<br>>> >>> Users mailing list<br>>> >>> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
>> >>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>>> >>><br>>> >>><br>>> >><br>
>> >><br>>> >> --<br>>> >> Nigel Daniels<br>>> >> Network & Systems Administrator<br>>> >> ConnectAndSell inc.<br>>> >> (650)-533-2542 <+16505332542><br>
>> ><br>>> > _______________________________________________<br>>> > Users mailing list<br>>> > <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>>> > <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
>> ><br>>> ><br>>><br>>> _______________________________________________<br>>> Users mailing list<br>>> <a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>>> <a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
>><br>> <br>> <br>> <br>> -- <br>> Nigel Daniels<br>> Network & Systems Administrator<br>> ConnectAndSell inc.<br>> (650)-533-2542<br></div>