With this hack, again thanks to Akash Manohar , you can now enter a mobile/landline number and find out the following:

1. If it is registered on DND Registry or not (What is the DND registry? - Read more on our SMS Guidelines post )

2. Which telecom operator the phone number belongs to (e.g. Airtel, Aircel, TATA, Reliance, Vodafone etc.)

3. Which region (state) does the phone number belong to also (e.g. Karnataka, Tamil Nadu etc.)

Hope it helps.

If you are a business owner, what can you do with this information ?

Exotel maintains the list of phone numbers subscribed to TRAI regulated DND (Do Not Disturb) / NCPR (National Customer Preference Registry). In general, a phone number subscribed to DND should not be dialed for marketing/commercial calls. Exotel differentiates these as transactional calls and promotional calls .
Currently, Exotel does not allow outgoing calls to DND numbers. But if a DND number has called your Exotel number previously in the last 2 months  we allow Transactional calls to be made to that number.
We understand that this may pose a business problem for you as you may want to contact a registered customer who has not called you on your Exotel number yet. For Eg: A customer who has registered on your website to your product/service.
As another step to help you, we're happy to introduce the Customer Whitelist API which allows you to add your DND clients' phone numbers into the Exotel's system thereby allowing you to call them if they wish to be contacted. Note that this whitelisting is also valid only for the next 2 months, post which you will have to ask your customer again if they wish to be contacted.

How does it work ?

1) You use the Customer whitelist API and add your DND customers' numbers into the Whitelist

2) An SMS is automatically sent to these numbers asking them their permission for you to contact them.

Sample SMS: You've registered with <Your-company-Name> and permitted us to call you. If this is not the case, please give a missed call to 09XXXXXXXX. Thank you.

3) If the person does not want to receive calls from you, s/he can 'unsubscribe' by giving a missed call to a specified number (in the sms). Following this you will not be able to call him/her.
4) Once you have 'whitelisted' a DND number, you can make outbound transactional calls to that number
IMPORTANT: If more than 3 people 'unsubscribe', then the process for whitelisting will change.
Now, instead of getting a number that is on DND to 'unsubscribe' by giving a missed call, for you to be able to call him/her, the number will have to 'subscribe' by giving a missed call. Steps 3,4 will change accordingly. The following steps will then take place.
2.a) Sample SMS: You've registered with <Your-company-name>. As you're on DND, please authorise us to call you by giving a missed call to 09XXXXXXXXX.
3.a) If the person wants to receive calls from you, they would have to give a missed call on the given number. Until that, you would be unable to contact that number
This is done to ensure that this whitelist API is used genuinely and only for transactional calls.

SMS senderID and costs

The above mentioned SMSes are sent from your registered sender ID (given along with every Virtual number) and the cost of the SMS (18 ps/sms ) will be deducted from your account.

NCPR Agreement

To use this API, an agreement outlining the clauses pertaining to calling NCPR numbers, needs to be signed and sent across to Exotel. Please contact your Account manager  for further details.

API Specs
To start with, a list of DND numbers, who you wish to contact, needs to be prepared. While posting these numbers to Exotel, a Virtual Number need to be specified using which SMSes can be sent to the DND numbers. On posting to Exotel, a SMS is sent to the DND number informing them that a company has added them as a client and an option is given to accept or deny calls from the company.
An example request to add phone numbers into Exotel system is as follows,
$ cat > postdata
$ curl -d@postdatahttps://${sid}:${token}@twilix.exotel.in/v1/Accounts/${sid}/CustomerWhitelist/
<?xml version="1.0" encoding="UTF-8"?>
<Message><The numbers have been added to the whitelist. If DND number gives a missed call to unsubscribe, the corresponding number will be removed from whitelist. | The numbers are not added to whitelist. The numbers will be added to whitelist only when DND number gives a missed call to subscribe. The count of DND numbers who have unsubscribed is count .></Message>

In the above response, in case more than 3 DND numbers have called to your account to unsubscribe to your messages, the next time you use whitelist API, DND numbers can be whitelisted only if they call and subscribe. In such cases, The <Message> </Message> will display the corresponding message.

In the above example, we create a file named postdata which contains the parameters that need to be sent in the request. The parameters of the request include two variables VirtualNumber and Number. The variable VirtualNumber is the number you have purchased from Exotel and Number is your customer's phone number that you would like to call. Multiple phone numbers can be specified by using the variable as Number[] multiple times.

REST API Specification

 URL https://<sid >:<token>@twilix.exotel.in/v1/Accounts/<sid>/CustomerWhitelist/
 PARAMETERS VirtualNumber


Language - Possible values are 'en' and 'ta'

The Language parameter specifies the language in which the SMS should be sent to the user.The following languages are supported. The default Language is English ('en').
'en' - English
'ta' - Tamil
 CODE Success - 200
Client-Side Error - 4XX
Server-Side Error - 5XX
 TYPE application/xml
 BODY Result/Total       - Total numbers provided
Result/Duplicate      - Count of duplicate numbers skipped
Result/Processed      - Count of processed numbers
Result/Succeeded     - Count of successfully processed numbers
Result/Redundant      - Count of number with no action taken
Result/Failed             - Count of failed numbers
A more detailed view of sample HTTP request/response with headers has been show below for reference.
$ curl -vd"VirtualNumber=08088919888&Number[]=08037701514&Number[]=08037701515" https://${sid}:${token}@twilix.exotel.in/v1/Accounts/${sid}/CustomerWhitel ist/
> POST /v1/Accounts/exotel/CustomerWhitelist/ HTTP/1.1
> User-Agent: curl/7.21.3 (i386-redhat-linux-gnu) libcurl/7.21.3 NSS/ zlib/1.2.5 libidn/1.19 libssh2/1.2.7

> Host: twilix.exotel.in
> Accept: */*
> Content-Length: 67
> Content-Type: application/x-www-form-urlencoded

< HTTP/1.1 200 OK
< Date: Tue, 05 Nov 2013 10:51:29 GMT
< Server: Apache/2.2.22 (Fedora)
< X-Powered-By: PHP/5.3.13
< Content-Length: 243
< Connection: close
< Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8"?>
<Message><The numbers have been added to the whitelist. If DND number gives a missed call to unsubscribe, the corresponding number will be removed from whitelist.></Message>

Common Errors

When using the API, you may encounter the following errors. A detailed description of the error and how to solve it has been mentioned in this section.

1. Only numbers in DND are allowed

<?xml version="1.0" encoding="UTF-8"?>
  <Message>Only numbers in DND are allowed</Message>
JFK Customer Whitelist API works only on Phone Numbers which have opted for DND (Do Not Disturb). You seem to have provided a phone number which is currently not registered for DND. You can check whether a phone number is currently registered for DND using our REST API.

2. NCPR agreement not signed

<?xml version="1.0" encoding="UTF-8"?>
  <Message>NCPR agreement not signed</Message>