I’ve seen the page detailing a method for making a suitable dial plan for UK use (3 outbound routes, each trunk with 3 dial plan rules), but if I could strip a 0 and add a 44 I could do it in 1 outbound route and only need dial plan rules in certain trunks, not all.
Basically, leave the default outbound route alone (strip the 9), and for trunks needing full international dialing codes (in my case ENUM lookups) a rule to match full UK national numbers (01234567890) strip the leading 0 and add 44 (or +44, but macro-dialout-enum sorts out + or no +) to make it 441234567890.
I was thinking perhaps an extension to fixlocalprefix to pass the number as it stands after being processed by a matching rule, back in to the next rule?
Being able to stack rules like this would be extremely powerful. Shouldn’t be especially hard either.
if($last_digit == “>”){
break;
}else{
// note, because this matched, we exit even if we didn’t change anything
exit(0);
}
// if the last rule continued, but didn't match, we skip this rule
if(empty($match) && isset($last_digit)){
unset($last_digit);
continue;
}
unset($match);
// check for and strip off >, the indicator to try the next rule even if we match
if((strrpos($regex, ">")+1) == strlen($regex)){
$regex = substr($regex, 0, -1);
$last_digit = ">";
}else{
unset($last_digit);
}
// Remove all non-pattern characters from $regex except for '+' and '|'.
// Allow groups like "[0-9]" to remain.
$regex = preg_replace("/[^0-9XNZ#*\.\[\]\-\+\|]/", "", $regex);
where can I get 2.2 at? last I checked 2.13 was the latest
----- Original Message -----
From: “xrobau” [email protected]
To: [email protected]
Sent: Sunday, October 15, 2006 11:51 PM
Subject: Re: [Amportal-users] Need to strip a number, and add a prefix
[quote] In 2.2, you can do that in trunks, no problems 8)
44+0|.
Sending 0123456 to the trunk will strip off the zero, and add 44 on the
start.
–Rob
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642