![]() |
ive got my dial rules about 75% doneBased on vague recollections...
but im stuck on two points (which by the way, turn out to be the same problem)
I have two variables in my dialrules one is called localareas and the other is localexchanges
both have data of the format "123|456|789"
the issue is that we have a long distance access code that must be dialed after the main number is dialed if the call is long distance
based on the results of my dialrules tests I have the system building a complete phone number with the ld access code correctly
assume that hylafax dialrules can get me to the point where I have every number entered as 19185551212111
where the last three numbers are the ld access code we have discussed, also note that the ldsuffix is a variable in the dialrules script as well
I need a transformation that will return the existing value except for ldsuffix if the phone number matches the following regex
^1918(${localexchanges})[0-9]{4}4${ldsufix} assume 918 is the local area code, then assume that localechanges has the list of local exchanges, if the string expression matches this, then what needs to be returned is the original string minus the last ldsuffix variable
this is what I have and what it does:
^1918(${localexchanges})[0-9]{4}4${ldsufix}= \1
This only returns the local exchange I need it to return the localexchange and the number.
This seemed easier than a bunch of if then else statements to construct the number in one pass.
can someone help me fix this please.
Thank you
____________________ HylaFAX(tm) Users Mailing List _______________________ To subscribe/unsubscribe, click http://lists.hylafax.org/cgi-bin/lsg2.cgi On UNIX: mail -s unsubscribe hylafax-users-request@xxxxxxxxxxx < /dev/null *To learn about commercial HylaFAX(tm) support, mail sales@xxxxxxxxx*