Numbers status validate with Asterisk

We have to develop an application integrate with Asterisk to Check Numbers (Mobile or Land numbers) working or not.

Scenario,
Customer has Telephone number database so application should have to check number working or not .
There is a Asterisk PBX with SIP trunk.

is there is any method to detect working numbers and not working numbers ?

Call them, make any statutory announcement needed for unsolicited calls, then ask them to key a digit to confirm that the call is working.

1 Like

Once you have dialed a number, you may get one of the following responses:

  1. Call is answered.
  2. Call is not answered and times out, but the number exists.
  3. Busy (error 486).
  4. Decline (error 603).
  5. Number does not exist (error 404).
  6. Other errors generated by local providers for non-existent or forbidden numbers.

So, first of all you should specify the criteria for treating the number as “working”.
1 is “working number”, 5,6 is “non-working number”, but what about 2,3,4?

Then, you should parse SIP responses from the far end depending on the technology used by your application. I cannot consult you any deeper as parsing and processing methods will depend on this technology (AGI, REST API, Lua…)

1 Like

You may also get an announcement, as early media, to the effect, the number you have called does not exist, or the call may be answered and that announcement made as normal media. In the preceding, the announcement might be replaced by a number unobtainable tone, or similar.

It is possible that your SIP provider will not handle early media properly, and you may just continue to hear ringback tone, or silence.

Even if there is no statutory requirement, in your country, to announce why you are making the call, it would be good manners, to play an an announcement to anyone that answers, providing your business identity and the reason for the call.

3 Likes

Yes, there is a number of options.
So, first of all you should specify the criteria for treating the number as “working” or “non-working”.

1 Like