Not very elegant, but:
 
exten => 1,1,SetVar(MyNumber=780-555-1212)
exten => 1,2,SetVar(AreaCode=${MyNumber:3:3})
exten => 1,3,SetVar(Prefix=${MyNumber:5:7})
exten => 1,4,SetVar(Suffix=${MyNumber:8:11})
exten => 1,5,Dial(ZAP/g0/1${AreaCode}${Prefix}${Suffix})
 
hth
-----Original Message-----
From: Scott Miller [mailto:[EMAIL PROTECTED]
Sent: Friday, September 23, 2005 1:22 PM
To: [email protected]
Subject: [Asterisk-Users] Removing "-" (Dash) from Dialed Numbers

I am trying to enable dial-by-email by using LDAPget to query an Active Directory server.  I've got it retrieving the phone number fine.  Unforunately, the numbers stored in active directory are either in the format:  (xxx) xxx-xxxx or xxx-xxx-xxxx.   Is there any way to parse characters out of the dialed phone number so that I only end up with digits (remove spaces, parenthesis and dashes)?   From there, my outbound routes can take care of where to send the call.

 

Help is always appreciated! J 

 

Thank you,

Scott Miller

 

 

 

_______________________________________________
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to