"Outbound Route" for all USA, but not non-USA (e.g. not Canada, Caribbean, etc.)

4 posts / 0 new
Last post
jperry999
jperry999's picture
"Outbound Route" for all USA, but not non-USA (e.g. not Canada, Caribbean, etc.)

What is the best way to set up an "Outbound Route" for all USA, but exclude non-USA (e.g. not Canada, Caribbean, etc.)?

Should I just list out in Outbound-Route's "Dial Pattern" all 325 or so USA area-codes, or will this be too much cpu time (setup for each call)?

(I need to do this because I have a mix of VOIP trunks and FXO to POTS -- the POTS lines are fine for in-USA, but outrageous cost for out of USA.)

There is a similar question here:
http://www.freepbx.org/forum/dialplan-to-route-us-calls-to-one-carrier-and-ld-elsewhere
but no one really answered that posting.

p_lindheimer
p_lindheimer's picture
the hard harder part if

the hard harder part if coming up with all the area codes. You can list all the US ones in one route and let the next route do everything else, or you can list all the non-US routes first and then let the next route deal with all the others. As far as having a long list, if you have a reasonable system, a few hundred should not hurt things.

wiseoldowl
wiseoldowl's picture
Specify the area codes

We use separate routes for the USA, Canada, and other NANP points, and each has a different selection of trunks. It really doesn't seem to slow down call completion although admittedly I haven't done an A-B comparison. Here are our Dial Patterns (note, there is a slim chance these might not include one or more of the very newest area codes, but no one has complained recently):

U.S.A:

1201NXXXXXX
1202NXXXXXX
1203NXXXXXX
1205NXXXXXX
1206NXXXXXX
1207NXXXXXX
1208NXXXXXX
1209NXXXXXX
1210NXXXXXX
1212NXXXXXX
1213NXXXXXX
1214NXXXXXX
1215NXXXXXX
1216NXXXXXX
1217NXXXXXX
1218NXXXXXX
1219NXXXXXX
1224NXXXXXX
1225NXXXXXX
1228NXXXXXX
1229NXXXXXX
1231NXXXXXX
1234NXXXXXX
1239NXXXXXX
1240NXXXXXX
1248NXXXXXX
1251NXXXXXX
1252NXXXXXX
1253NXXXXXX
1254NXXXXXX
1256NXXXXXX
1260NXXXXXX
1262NXXXXXX
1267NXXXXXX
1269NXXXXXX
1270NXXXXXX
1276NXXXXXX
1281NXXXXXX
1301NXXXXXX
1302NXXXXXX
1303NXXXXXX
1304NXXXXXX
1305NXXXXXX
1307NXXXXXX
1308NXXXXXX
1309NXXXXXX
1310NXXXXXX
1312NXXXXXX
1313NXXXXXX
1314NXXXXXX
1315NXXXXXX
1316NXXXXXX
1317NXXXXXX
1318NXXXXXX
1319NXXXXXX
1320NXXXXXX
1321NXXXXXX
1323NXXXXXX
1325NXXXXXX
1330NXXXXXX
1331NXXXXXX
1334NXXXXXX
1336NXXXXXX
1337NXXXXXX
1339NXXXXXX
1347NXXXXXX
1351NXXXXXX
1352NXXXXXX
1360NXXXXXX
1361NXXXXXX
1385NXXXXXX
1386NXXXXXX
1401NXXXXXX
1402NXXXXXX
1404NXXXXXX
1405NXXXXXX
1406NXXXXXX
1407NXXXXXX
1408NXXXXXX
1409NXXXXXX
1410NXXXXXX
1412NXXXXXX
1413NXXXXXX
1414NXXXXXX
1415NXXXXXX
1417NXXXXXX
1419NXXXXXX
1423NXXXXXX
1424NXXXXXX
1425NXXXXXX
1430NXXXXXX
1432NXXXXXX
1434NXXXXXX
1435NXXXXXX
1440NXXXXXX
1443NXXXXXX
1469NXXXXXX
1470NXXXXXX
1478NXXXXXX
1479NXXXXXX
1480NXXXXXX
1484NXXXXXX
1501NXXXXXX
1502NXXXXXX
1503NXXXXXX
1504NXXXXXX
1505NXXXXXX
1507NXXXXXX
1508NXXXXXX
1509NXXXXXX
1510NXXXXXX
1512NXXXXXX
1513NXXXXXX
1515NXXXXXX
1516NXXXXXX
1517NXXXXXX
1518NXXXXXX
1520NXXXXXX
1530NXXXXXX
1540NXXXXXX
1541NXXXXXX
1551NXXXXXX
1559NXXXXXX
1561NXXXXXX
1562NXXXXXX
1563NXXXXXX
1567NXXXXXX
1570NXXXXXX
1571NXXXXXX
1573NXXXXXX
1574NXXXXXX
1575NXXXXXX
1580NXXXXXX
1585NXXXXXX
1586NXXXXXX
1601NXXXXXX
1602NXXXXXX
1603NXXXXXX
1605NXXXXXX
1606NXXXXXX
1607NXXXXXX
1608NXXXXXX
1609NXXXXXX
1610NXXXXXX
1612NXXXXXX
1614NXXXXXX
1615NXXXXXX
1616NXXXXXX
1617NXXXXXX
1618NXXXXXX
1619NXXXXXX
1620NXXXXXX
1623NXXXXXX
1626NXXXXXX
1630NXXXXXX
1631NXXXXXX
1636NXXXXXX
1641NXXXXXX
1646NXXXXXX
1650NXXXXXX
1651NXXXXXX
1660NXXXXXX
1661NXXXXXX
1662NXXXXXX
1678NXXXXXX
1682NXXXXXX
1701NXXXXXX
1702NXXXXXX
1703NXXXXXX
1704NXXXXXX
1706NXXXXXX
1707NXXXXXX
1708NXXXXXX
1712NXXXXXX
1713NXXXXXX
1714NXXXXXX
1715NXXXXXX
1716NXXXXXX
1717NXXXXXX
1718NXXXXXX
1719NXXXXXX
1720NXXXXXX
1724NXXXXXX
1727NXXXXXX
1731NXXXXXX
1732NXXXXXX
1734NXXXXXX
1740NXXXXXX
1754NXXXXXX
1757NXXXXXX
1760NXXXXXX
1762NXXXXXX
1763NXXXXXX
1765NXXXXXX
1769NXXXXXX
1770NXXXXXX
1772NXXXXXX
1773NXXXXXX
1774NXXXXXX
1775NXXXXXX
1779NXXXXXX
1781NXXXXXX
1785NXXXXXX
1786NXXXXXX
1801NXXXXXX
1802NXXXXXX
1803NXXXXXX
1804NXXXXXX
1805NXXXXXX
1806NXXXXXX
1808NXXXXXX
1810NXXXXXX
1812NXXXXXX
1813NXXXXXX
1814NXXXXXX
1815NXXXXXX
1816NXXXXXX
1817NXXXXXX
1818NXXXXXX
1828NXXXXXX
1830NXXXXXX
1831NXXXXXX
1832NXXXXXX
1843NXXXXXX
1845NXXXXXX
1847NXXXXXX
1848NXXXXXX
1850NXXXXXX
1856NXXXXXX
1857NXXXXXX
1858NXXXXXX
1859NXXXXXX
1860NXXXXXX
1862NXXXXXX
1863NXXXXXX
1864NXXXXXX
1865NXXXXXX
1870NXXXXXX
1878NXXXXXX
1901NXXXXXX
1903NXXXXXX
1904NXXXXXX
1906NXXXXXX
1907NXXXXXX
1908NXXXXXX
1909NXXXXXX
1910NXXXXXX
1912NXXXXXX
1913NXXXXXX
1914NXXXXXX
1915NXXXXXX
1916NXXXXXX
1917NXXXXXX
1918NXXXXXX
1919NXXXXXX
1920NXXXXXX
1925NXXXXXX
1928NXXXXXX
1931NXXXXXX
1936NXXXXXX
1937NXXXXXX
1940NXXXXXX
1941NXXXXXX
1947NXXXXXX
1949NXXXXXX
1951NXXXXXX
1952NXXXXXX
1954NXXXXXX
1956NXXXXXX
1970NXXXXXX
1971NXXXXXX
1972NXXXXXX
1973NXXXXXX
1978NXXXXXX
1979NXXXXXX
1980NXXXXXX
1985NXXXXXX
1989NXXXXXX
201NXXXXXX
202NXXXXXX
203NXXXXXX
205NXXXXXX
206NXXXXXX
207NXXXXXX
208NXXXXXX
209NXXXXXX
210NXXXXXX
212NXXXXXX
213NXXXXXX
214NXXXXXX
215NXXXXXX
216NXXXXXX
217NXXXXXX
218NXXXXXX
219NXXXXXX
224NXXXXXX
225NXXXXXX
228NXXXXXX
229NXXXXXX
231NXXXXXX
234NXXXXXX
239NXXXXXX
240NXXXXXX
248NXXXXXX
251NXXXXXX
252NXXXXXX
253NXXXXXX
254NXXXXXX
256NXXXXXX
260NXXXXXX
262NXXXXXX
267NXXXXXX
269NXXXXXX
270NXXXXXX
276NXXXXXX
281NXXXXXX
301NXXXXXX
302NXXXXXX
303NXXXXXX
304NXXXXXX
305NXXXXXX
307NXXXXXX
308NXXXXXX
309NXXXXXX
310NXXXXXX
312NXXXXXX
313NXXXXXX
314NXXXXXX
315NXXXXXX
316NXXXXXX
317NXXXXXX
318NXXXXXX
319NXXXXXX
320NXXXXXX
321NXXXXXX
323NXXXXXX
325NXXXXXX
330NXXXXXX
331NXXXXXX
334NXXXXXX
336NXXXXXX
337NXXXXXX
339NXXXXXX
347NXXXXXX
351NXXXXXX
352NXXXXXX
360NXXXXXX
361NXXXXXX
385NXXXXXX
386NXXXXXX
401NXXXXXX
402NXXXXXX
404NXXXXXX
405NXXXXXX
406NXXXXXX
407NXXXXXX
408NXXXXXX
409NXXXXXX
410NXXXXXX
412NXXXXXX
413NXXXXXX
414NXXXXXX
415NXXXXXX
417NXXXXXX
419NXXXXXX
423NXXXXXX
424NXXXXXX
425NXXXXXX
430NXXXXXX
432NXXXXXX
434NXXXXXX
435NXXXXXX
440NXXXXXX
443NXXXXXX
469NXXXXXX
470NXXXXXX
478NXXXXXX
479NXXXXXX
480NXXXXXX
484NXXXXXX
501NXXXXXX
502NXXXXXX
503NXXXXXX
504NXXXXXX
505NXXXXXX
507NXXXXXX
508NXXXXXX
509NXXXXXX
510NXXXXXX
512NXXXXXX
513NXXXXXX
515NXXXXXX
516NXXXXXX
517NXXXXXX
518NXXXXXX
520NXXXXXX
530NXXXXXX
540NXXXXXX
541NXXXXXX
551NXXXXXX
559NXXXXXX
561NXXXXXX
562NXXXXXX
563NXXXXXX
567NXXXXXX
570NXXXXXX
571NXXXXXX
573NXXXXXX
574NXXXXXX
575NXXXXXX
580NXXXXXX
585NXXXXXX
586NXXXXXX
601NXXXXXX
602NXXXXXX
603NXXXXXX
605NXXXXXX
606NXXXXXX
607NXXXXXX
608NXXXXXX
609NXXXXXX
610NXXXXXX
612NXXXXXX
614NXXXXXX
615NXXXXXX
616NXXXXXX
617NXXXXXX
618NXXXXXX
619NXXXXXX
620NXXXXXX
623NXXXXXX
626NXXXXXX
630NXXXXXX
631NXXXXXX
636NXXXXXX
641NXXXXXX
646NXXXXXX
650NXXXXXX
651NXXXXXX
660NXXXXXX
661NXXXXXX
662NXXXXXX
678NXXXXXX
682NXXXXXX
701NXXXXXX
702NXXXXXX
703NXXXXXX
704NXXXXXX
706NXXXXXX
707NXXXXXX
708NXXXXXX
712NXXXXXX
713NXXXXXX
714NXXXXXX
715NXXXXXX
716NXXXXXX
717NXXXXXX
718NXXXXXX
719NXXXXXX
720NXXXXXX
724NXXXXXX
727NXXXXXX
731NXXXXXX
732NXXXXXX
734NXXXXXX
740NXXXXXX
754NXXXXXX
757NXXXXXX
760NXXXXXX
762NXXXXXX
763NXXXXXX
765NXXXXXX
769NXXXXXX
770NXXXXXX
772NXXXXXX
773NXXXXXX
774NXXXXXX
775NXXXXXX
779NXXXXXX
781NXXXXXX
785NXXXXXX
786NXXXXXX
801NXXXXXX
802NXXXXXX
803NXXXXXX
804NXXXXXX
805NXXXXXX
806NXXXXXX
808NXXXXXX
810NXXXXXX
812NXXXXXX
813NXXXXXX
814NXXXXXX
815NXXXXXX
816NXXXXXX
817NXXXXXX
818NXXXXXX
828NXXXXXX
830NXXXXXX
831NXXXXXX
832NXXXXXX
843NXXXXXX
845NXXXXXX
847NXXXXXX
848NXXXXXX
850NXXXXXX
856NXXXXXX
857NXXXXXX
858NXXXXXX
859NXXXXXX
860NXXXXXX
862NXXXXXX
863NXXXXXX
864NXXXXXX
865NXXXXXX
870NXXXXXX
878NXXXXXX
901NXXXXXX
903NXXXXXX
904NXXXXXX
906NXXXXXX
907NXXXXXX
908NXXXXXX
909NXXXXXX
910NXXXXXX
912NXXXXXX
913NXXXXXX
914NXXXXXX
915NXXXXXX
916NXXXXXX
917NXXXXXX
918NXXXXXX
919NXXXXXX
920NXXXXXX
925NXXXXXX
928NXXXXXX
931NXXXXXX
936NXXXXXX
937NXXXXXX
940NXXXXXX
941NXXXXXX
947NXXXXXX
949NXXXXXX
951NXXXXXX
952NXXXXXX
954NXXXXXX
956NXXXXXX
970NXXXXXX
971NXXXXXX
972NXXXXXX
973NXXXXXX
978NXXXXXX
979NXXXXXX
980NXXXXXX
985NXXXXXX
989NXXXXXX
NXXXXXX

Canada:

1204NXXXXXX
1226NXXXXXX
1250NXXXXXX
1289NXXXXXX
1306NXXXXXX
1403NXXXXXX
1416NXXXXXX
1418NXXXXXX
1438NXXXXXX
1450NXXXXXX
1506NXXXXXX
1514NXXXXXX
1519NXXXXXX
1604NXXXXXX
1613NXXXXXX
1647NXXXXXX
1705NXXXXXX
1709NXXXXXX
1778NXXXXXX
1780NXXXXXX
1807NXXXXXX
1819NXXXXXX
1867NXXXXXX
1902NXXXXXX
1905NXXXXXX
204NXXXXXX
226NXXXXXX
250NXXXXXX
289NXXXXXX
306NXXXXXX
403NXXXXXX
416NXXXXXX
418NXXXXXX
438NXXXXXX
450NXXXXXX
506NXXXXXX
514NXXXXXX
519NXXXXXX
604NXXXXXX
613NXXXXXX
647NXXXXXX
705NXXXXXX
709NXXXXXX
778NXXXXXX
780NXXXXXX
807NXXXXXX
819NXXXXXX
867NXXXXXX
902NXXXXXX
905NXXXXXX

Other NANP (this comes AFTER the above two):
1NXXNXXXXXX
NXXNXXXXXX

Note that the NXXXXXX at the bottom of the U.S.A. list should only be used if you allow seven-digit dialing AND you are in the U.S.A. (you could put it at the bottom of the Canada list if you are in Canada, etc.)

One thing to note is that I put in both ten and eleven digit routing even if you only permit one type or the other at endpoints because you can get into situations where call forwarding or some other feature may not work right if both aren't specified. I know that originally I only had the eleven digit (1+) routings in and had to add the ten digit routings to make something work properly, though I don't recall exactly what offhand - I think it may have been *69 callback or something like that.

Also note that toll free numbers are not included - I have a separate route for them, that comes BEFORE any of the above routes, and looks like this:

1800NXXXXXX
1822NXXXXXX
1833NXXXXXX
1844NXXXXXX
1855NXXXXXX
1866NXXXXXX
1877NXXXXXX
1888NXXXXXX
800NXXXXXX
822NXXXXXX
833NXXXXXX
844NXXXXXX
855NXXXXXX
866NXXXXXX
877NXXXXXX
888NXXXXXX

This includes all the present and future toll-free area codes - so far I don't think any numbers are assigned in the 822, 833, 844, or 855 blocks (though I'm not entirely sure about 855) but I figured I may as well include them because it's one less thing I'll have to worry about later on, when they are opened up for use.

I understand that you might think this would slow down call processing but if so it's really not that noticeable (but it could be on a really slow system). And, unfortunately, this is really the only "correct" way to do it.

jperry999
jperry999's picture
Missing some area-codes

Thank you for that verification this is the way to do it.
I compared you list to what I have, and here are the USA area-codes you are missing (in case you want to improve your list):

1227XXXXXXX
1236XXXXXXX
1249XXXXXXX
1278XXXXXXX
1280XXXXXXX
1282XXXXXXX
1283XXXXXXX
1327XXXXXXX
1335XXXXXXX
1341XXXXXXX
1353XXXXXXX
1356XXXXXXX
1358XXXXXXX
1369XXXXXXX
1380XXXXXXX
1381XXXXXXX
1383XXXXXXX
1420XXXXXXX
1442XXXXXXX
1445XXXXXXX
1464XXXXXXX
1475XXXXXXX
1546XXXXXXX
1557XXXXXXX
1564XXXXXXX
1627XXXXXXX
1628XXXXXXX
1656XXXXXXX
1657XXXXXXX
1659XXXXXXX
1667XXXXXXX
1669XXXXXXX
1679XXXXXXX
1689XXXXXXX
1737XXXXXXX
1747XXXXXXX
1752XXXXXXX
1764XXXXXXX
1835XXXXXXX
1836XXXXXXX
1861XXXXXXX
1872XXXXXXX
1932XXXXXXX
1935XXXXXXX
1957XXXXXXX
1959XXXXXXX
1969XXXXXXX
1975XXXXXXX
1984XXXXXXX