<br><br><div class="gmail_quote">On Tue, Apr 5, 2011 at 8:26 AM, Max Clark <span dir="ltr"><<a href="mailto:max.clark@gmail.com">max.clark@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<br>
<br>
I am trying to clean up the number of invalid calls being sent<br>
upstream to PSTN gateways. I've been researching numbering formats and<br>
could use some guidance/clarification.<br>
<br>
Currently I'm matching NADP calls looking by looking for a destination<br>
number matching 1 + 10 digits:<br>
<br>
<condition field="destination_number" expression="^(1\d{10})$"><br>
<br>
>From what I've found NPA should be 201-999 and NXX should be 200-999<br>
(ugly regex):<br>
<br>
<condition field="destination_number"<br>
expression="^(1[2-9][0-9]{2}[2-9]\d{2}\d{4})$"><br></blockquote><div><br></div><div>I don't believe that regex is correct. You might want to base your pattern off the one listed here:</div><div><a href="http://wiki.freeswitch.org/wiki/Regex#NANPA_.2B1NxxNxxXXXX_E.164_Dialstring">http://wiki.freeswitch.org/wiki/Regex#NANPA_.2B1NxxNxxXXXX_E.164_Dialstring</a> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Are there any cases where the NPA & NXX would not conform to this list?<br></blockquote><div>Not unless NANPA decides to make some changes...</div><div>-MC<br></div></div>