<p>He should search the mailing list for rewriteuri</p>
<p>You can&#39;t, i believe, use pseudovariables with that function.  I believe you have to use an avp</p>
<p>Sent from Droid</p>
<div class="gmail_quote">On Feb 6, 2011 8:26 PM, &quot;Tyler Merritt&quot; &lt;<a href="mailto:tyler@fonality.com">tyler@fonality.com</a>&gt; wrote:<br type="attribution">&gt; I do this as well:<br>&gt; <br>&gt; $var(origFromNumber) = $(re{uri.user});<br>
&gt; $var(finalFromURI) = &quot;sip:81&quot; + $(var(origFromNumber){s.substr,1,0}) + &quot;@&quot; +<br>&gt; $fd;<br>&gt; <br>&gt; This works fine for me.  Takes what is essentially a DID and formats it to a<br>&gt; SIP PEER string as per the carrier.<br>
&gt; <br>&gt; You say that var(z) prints correctly in the logs, but according to the<br>&gt; parser it&#39;s not a legit URI.  It may just be that your upstream routes don&#39;t<br>&gt; recognize this format.<br>&gt; <br>
&gt; We use the usr_loc and db_aliases in order to match the URI up with a<br>&gt; destination - have you ensured that there is a valid destination for this<br>&gt; SIP URI?<br></div>