<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>I've been jacking with this for a while but don't
understand all that I'm reading...</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>The problem is sometimes I get ANI II digits from
the phone company. These will be two digits that prefix ANI - so some
callerid might arrive as only "00" or "007147391234", "00714", "714"
or normal "7147391234". </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><FONT face=Arial size=2>The prefix digits I get are
"00", "23", "61", "62", "63" - see <A
href="http://www.nanpa.com/number_resource_info/ani_ii_assignments.html">http://www.nanpa.com/number_resource_info/ani_ii_assignments.html</A> for
info on ANI II digits.</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I need a script deals with this by
normalizes the ANI as received at the beginning of the call. </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>What I would like to do is ( ANI =
${CALLERIDNUM} ):</FONT></DIV>
<DIV> </DIV>
<DIV>if the ANI is a 10 digit number - do noting</DIV>
<DIV> </DIV>
<DIV>if ANI is greater than 10 digits and the first two digits are one of these:
"00", "23", "61", "62", "63" or might be others not found
yet - Then strip the first two digits and make CALLERIDNUM =
corrected ANI</DIV>
<DIV> </DIV>
<DIV>if ANI is less than 10 digit and the first two digits are one of these:
"00", "23", "61", "62", "63" or might be others not found yet - then
strip these digits and make CALLERIDNUM = corrected ANI</DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I was wondering if you could show me an example of
how you would do this? </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>TIA</FONT></DIV>
<DIV> </DIV>
<DIV>Bart</DIV></FONT></DIV></BODY></HTML>