[OpenSIPS-Users] Add characters to uri
Anton Zagorskiy
a.zagorskiy at oyster-telecom.ru
Fri Feb 18 16:04:04 CET 2011
prefix("12345#");
or
$rU = "12345#" + $rU;
From: users-bounces at lists.opensips.org
[mailto:users-bounces at lists.opensips.org] On Behalf Of Brian Artigas
Sent: Friday, February 18, 2011 5:58 PM
To: users at lists.opensips.org
Subject: [OpenSIPS-Users] Add characters to uri
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
More information about the Users
mailing list