[OpenSIPS-Users] trying to rewriteuri to the value of a variable

Duane Larson duane.larson at gmail.com
Mon Feb 7 03:29:56 CET 2011


He should search the mailing list for rewriteuri

You can't, i believe, use pseudovariables with that function.  I believe you
have to use an avp

Sent from Droid
On Feb 6, 2011 8:26 PM, "Tyler Merritt" <tyler at fonality.com> wrote:
> I do this as well:
>
> $var(origFromNumber) = $(re{uri.user});
> $var(finalFromURI) = "sip:81" + $(var(origFromNumber){s.substr,1,0}) + "@"
+
> $fd;
>
> This works fine for me. Takes what is essentially a DID and formats it to
a
> SIP PEER string as per the carrier.
>
> You say that var(z) prints correctly in the logs, but according to the
> parser it's not a legit URI. It may just be that your upstream routes
don't
> recognize this format.
>
> We use the usr_loc and db_aliases in order to match the URI up with a
> destination - have you ensured that there is a valid destination for this
> SIP URI?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110206/c5626a41/attachment.htm>


More information about the Users mailing list