Im trying to figure out the base way to check the callerID being sent  
to my Asterisk box and use it if it is a valid NANP number, but  
replace it with a static NANP number if it is not.  (Why?  I have a  
few carriers that require this, and a few international users - if it  
happens to take one of the carriers that require it, I want it to set  
a static number that is valid).

I'm playing with IF and REGEX in extensions.conf, but not getting  
very far.  Has anyone done this and/or know of a doc?  I haven't had  
any success searching.

At this point, I have a very broken setup of:

Set(CALLERID(num)=${IF(${REGEX("^(?:\([2-9]\d{2}\)\ ?|[2-9]\d{2}(?: 
\-?|\ ?))[2-9]\d{2}[- ]?\d{4}$" ${CALLERID(num)})}?${CALLERID 
(num)}:<staticNumber>)

I'm sure I'm pretty far off - and I've been through many permutations  
of this so far.  Any ideas?

Thanks,
Daryl

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to