[OpenSIPS-Users] Add characters to uri

Brian Artigas brian at allstatecomputers.com
Fri Feb 18 15:57:30 CET 2011


Hello,

 

I have a provider that requires me to prefix every call with a technical
prefix.


For example a call to 15615551212 would have to be prepended with
12345#15615551212

 

Below is a code snippet that detects a 10 digit phone number prefixed
with a 1 and strips the 1.

 

 if (uri =~ "^sip:1[0-9]{10}@")
        {
            xlog("L_INFO", "route - found a local/ld call with a 1
prefixed - removing [$fu/$tu/$ru/$ci]\n");
            strip(1);
        }

How would I go about adding 12345# to the given uri?

 

Thanks,
Brian

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110218/da902240/attachment-0001.htm>


More information about the Users mailing list