<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o = 
"urn:schemas-microsoft-com:office:office" xmlns:w = 
"urn:schemas-microsoft-com:office:word"><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2800.1476" name=GENERATOR>
<STYLE>@font-face {
        font-family: Wingdings;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV><SPAN class=723062719-23092005><FONT face=Arial color=#0000ff size=2>Not 
very elegant, but:</FONT></SPAN></DIV>
<DIV><SPAN class=723062719-23092005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=723062719-23092005><FONT face=Arial color=#0000ff size=2>exten 
=&gt; 1,1,SetVar(MyNumber=780-555-1212)</FONT></SPAN></DIV>
<DIV><SPAN class=723062719-23092005><FONT face=Arial color=#0000ff size=2>exten 
=&gt; 1,2,SetVar(AreaCode=${MyNumber:3:3})</FONT></SPAN></DIV>
<DIV><SPAN class=723062719-23092005><FONT face=Arial color=#0000ff size=2>exten 
=&gt; 1,3,SetVar(Prefix=${MyNumber:5:7})</FONT></SPAN></DIV>
<DIV><SPAN class=723062719-23092005><FONT face=Arial color=#0000ff size=2>exten 
=&gt; 1,4,SetVar(Suffix=${MyNumber:8:11})</FONT></SPAN></DIV>
<DIV><SPAN class=723062719-23092005><FONT face=Arial color=#0000ff size=2>exten 
=&gt; 1,5,Dial(ZAP/g0/1${AreaCode}${Prefix}${Suffix})</FONT></SPAN></DIV>
<DIV><SPAN class=723062719-23092005><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=723062719-23092005><FONT face=Arial color=#0000ff 
size=2>hth</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> Scott Miller 
  [mailto:scoscmil@imap.iu.edu]<BR><B>Sent:</B> Friday, September 23, 2005 1:22 
  PM<BR><B>To:</B> asterisk-users@lists.digium.com<BR><B>Subject:</B> 
  [Asterisk-Users] Removing "-" (Dash) from Dialed Numbers<BR><BR></FONT></DIV>
  <DIV class=Section1>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I am trying to enable 
  dial-by-email by using LDAPget to query an Active Directory server.&nbsp; I've 
  got it retrieving the phone number fine.&nbsp; Unforunately, the numbers 
  stored in active directory are either in the format:&nbsp; (xxx) xxx-xxxx or 
  xxx-xxx-xxxx.&nbsp;&nbsp; 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)?&nbsp;&nbsp; From there, my outbound routes can take 
  care of where to send the call.<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Help is always appreciated! 
  </SPAN></FONT><FONT face=Wingdings size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Wingdings">J</SPAN></FONT><FONT 
  face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">&nbsp; 
  <o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thank 
  you,<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Scott 
  Miller<o:p></o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face=Arial size=2><SPAN 
  style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P>
  <P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN 
  style="FONT-SIZE: 12pt"><o:p>&nbsp;</o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>