Can I limit my application to not send calls or SMS to certain countries or prefixes?

Here’s how to limit your call and SMS messaging to certain prefixes. This example shows how to allow calls and SMS only to numbers in the US.

Below are the prefixes for the US state:

1201, 1202, 1203, 1205, 1206, 1207, 1208, 1209, 1210, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1224, 1225, 1228, 1229, 1231, 1234, 1239, 1240, 1248, 1251, 1252, 1253, 1254, 1256, 1260, 1262, 1267, 1269, 1270, 1276, 1278, 1281, 1301, 1302, 1303, 1304, 1305, 1307, 1308, 1309, 1310, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1323, 1325, 1330, 1331, 1334, 1336, 1337, 1339, 1346, 1347, 1351, 1352, 1360, 1361, 1364, 1385, 1386, 1401, 1402, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1412, 1413, 1414, 1415, 1417, 1419, 1423, 1424, 1425, 1430, 1432, 1434, 1435, 1440, 1442, 1443, 1447, 1458, 1464, 1469, 1470, 1475, 1478, 1479, 1480, 1484, 1500, 1501, 1502, 1503, 1504, 1505, 1507, 1508, 1509, 1510, 1512, 1513, 1515, 1516, 1517, 1518, 1520, 1530, 1531, 1534, 1539, 1540, 1541, 1551, 1557, 1559, 1561, 1562, 1563, 1567, 1570, 1571, 1573, 1574, 1575, 1580, 1585, 1586, 1601, 1602, 1603, 1605, 1606, 1607, 1608, 1609, 1610, 1612, 1614, 1615, 1616, 1617, 1618, 1619, 1620, 1623, 1626, 1630, 1631, 1636, 1641, 1646, 1650, 1651, 1657, 1660, 1661, 1662,667, 1669, 1678, 1681, 1682, 1701, 1702, 1703, 1704, 1706, 1707, 1708, 1712, 1713, 1714, 1715, 1716, 1717, 1718, 1719, 1720, 1724, 1725, 1727, 1730, 1731, 1732, 1734, 1740, 1747, 1752, 1754, 1757,760, 1762, 1763, 1765, 1769, 1770, 1772, 1773, 1774, 1775, 1779, 1781, 1785, 1786, 1801, 1802, 1803, 1804, 1805, 1806, 1808, 1810, 1812, 1813, 1814, 1815, 1816, 1817, 1818, 1830, 1831, 1832, 1835, 1843, 1845, 1847, 1848, 1849, 1850, 1856, 1857, 1858, 1859, 1860, 1862, 1863, 1864, 1865, 1870, 1872, 1878, 1901, 1903, 1904, 1906, 1907, 1908, 1909, 1910, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 1920, 1925, 1927, 1928, 1929, 1930, 1931, 1936, 1937, 1938, 1940, 1941, 1947, 1949, 1951, 1952, 1954, 1956, 1959, 1970, 1971, 1972, 1973, 1978, 1979, 1980, 1984, 1985, 1989

Whitelist these prefixes in your application. If you wish to send messages to US islands, you can also whitelist the following prefixes:

1242 ,1246 ,1264 ,1268 ,1284 ,1340 ,1345 ,1441 ,1473 ,1649 ,1664 ,1670 ,1671 ,1684 ,1721 ,1758 ,1767 ,1784 ,1868 ,1869 ,1876 ,1809,1829,1849,1787,1939

If you wish to send messages or make calls to Canada, you can whitelist the following prefixes:

1403, 1587, 1780, 1250, 1604, 1778, 1236, 1204, 1431, 1506, 1709, 1902, 1782, 1226, 1249, 1289, 1343, 1365, 1416, 1437, 1519, 1613, 1647, 1705, 1807, 1905, 1418, 1438, 1450, 1514, 1579, 1581, 1819, 1873, 1306, 1639, 1867 

If you want to send messages or make calls to the US, US islands, and Canada, you need to whitelist the prefix "1". 

Once you have whitelisted the above prefixes, your application will check to make sure that any attempts to message or call any other prefix will not be completed. You can also achieve the same results for outbound calling by going to your account dashboard to configure your geo permissions.

Please create a ticket with Plivo’s Support Team if you have any further questions or concerns.

Was this article helpful?
0 out of 0 found this helpful
Didn’t find what you are looking for? Create new ticket