Question:

How do we find out the Circle and the Mobile Operator for the Incoming Calls?  There is a hack available which provides this in a webpage, but we need this as part of the Exotel API.


Answer:

If a human needs to find this on a browser, Please use our phone number lookup page.

If you have to do this inside an application, You could use our phone number lookup API. The DND Tag in the response is what you are looking for. 


DND scrubbing

You could also use this API do effectively do DND scrubbing. For all the numbers in your List, Repeatedly (With a time gap, say 3 seconds) query this API and based on the value of the DND tag, store it in a new List. The new list is now your list of DND free phone numbers. 


Sample PHP code for this DND scrubber is available in Github.