Outbound Calls

 
 
Note 1: By default Outbound is disabled for all the KooKoo users and if you want to enable outbound for your account please send a mail to This e-mail address is being protected from spambots. You need JavaScript enabled to view it with subject as:Enable Outbound and it will be enabled at the earliest for Paid Accounts.

Note 2: KooKoo has DND scrubbing where in if the number you dialed out is in the DND(Do Not Disturb) list, KooKoo would not be dailing that number.

Note 3: If the number to be dialed is a STD number,Make sure you are prepending a zero before that. Example 097XXXXXXXX .

Note 4: When KooKoo receives an outbound request, it places the call on the telco network. The status of the call will be sent back to your callback URL. Since there are a lot of variables in the call getting completed, your callback URL should handle these scenarios and perform retries. The retry logic is with your application.

Use Case: Programatically make outbound calls using KooKoo. This feature can be used to automatically call your users to alert them or give information.

Now making an outbound call is as simple as making a HTTP request.

Procedure:
To make an outbound call just make a http request to http://www.kookoo.in/outbound/outbound.php with the following parameters:

KooKoo Outbound parameters
api_key
the API KEY of your account. This is so that you don't send your username and password over HTTP. You can find it in your dashboard once you login to www.kookoo.in mandatory
phone_no
The phone number to place the call to mandatory
url
The url of your application optional
extra_data
The initial XML action to perform.It could be something like <response><playtext>Some text to be played to the users</playtext><hangup/></response> optional

beta

outbound_version value should be set to 2. This is the latest version and the older versions are deprecated. optional
caller_id Using this parameter, you can set your caller id if you have more than one phone number assigned to you. optional
callback_url
This is the URL which will be called after the call is finished. You can have your after call processing at this URL. We send the following parameters to this URL: 'sid' : A unique sequence ID. This will uniquely identify the call. 'caller_id' : The caller id which was set for this call 'phone_no' : The phone number which was called. 'duration': The duration of the call in seconds 'start_time': The start time of the call 'status': The status of the call.It currently has 'answered/ring/invalid_number/busy/network_congestion/exception' optional
      
Example Http Request:

1. To call 9333422312 and when he picks up, play "I love KooKoo" and hangup

http://www.kookoo.in/outbound/outbound.php?phone_no=9333422312&api_key=XXXXXXXXXXXXXXXXXXXXXXXXX&outbound_version=2&extra_data=<response><playtext>I Love KooKoo</playtext><hangup/></response>

2. To call 9333422312 and when he picks up, play "I love KooKoo" redirect him to your KooKoo application which is hosted at http://www.test.com/kookoo

http://www.kookoo.in/outbound/outbound.php?phone_no=9333422312&api_key=XXXXXXXXXXXXXXXXXXXXXXXXX&outbound_version=2&extra_data=<response><playtext>I Love KooKoo</playtext></response>&url=http://www.test.com/kookoo

3. To call 9333422312 and when he picks up, redirect him to your KooKoo application which is hosted at http://www.test.com/kookoo

http://www.kookoo.in/outbound/outbound.php?phone_no=9333422312&api_key=XXXXXXXXXXXXXXXXXXXXXXXXX&outbound_version=2&url=http://www.test.com/kookoo

Note:
  1. Because of TRAI restrictions we do not allow bulk calling. We limit the number of outbound calls to 50/day. In case you have a valid business requirement to make more calls, please mail your requirement to This e-mail address is being protected from spambots. You need JavaScript enabled to view it and we will get in touch with you.
  2. Outbound call charges apply.The call charges have been fixed at Re.1/min pan India.
  3. Just remember if the text is very long, then it takes some time the first time and you will hear the phone ringing. The second time onwards, since the TTS comes from the cache it will be faster.
  4. This feature is available only to paid users of KooKoo.

The following is the flow:

  1. You make an outbound call request to the REST API by making a HTTP request:

    http://www.kookoo.in/outbound/outbound.php?phone_no=090xxxxxxxxx&api_key=XXXXXXXXXXXXXXXXXXXXXXXXX&outbound_version=2& url=http://www.yourwebsite.com&caller_id=9140xxxxxxx&callback_url=http://yourwebsite.com/ outbound_callback.php

    Here we are setting our caller id and also providing a callback URL.

  2. Once the request is made, KooKoo responds with a status: <response><status>queued</status><message>1234552525</message></response> The status can be 'queued' or 'error'. If it is queued you get the unique id. If it is error, you get an error message. If it is an error, you will have to retry this call.

  3. In the background. KooKoo will be making the call and handling it. Once the call is finished KooKoo will make an HTTP POST request to your callback URL:

    http://www.yourwebsite.com/outbound_callback.php?sid=0xfde3223234gsssss&caller_id=9140xxxxxx&phone_no=09xxxxxxxxx&duration=81& start_time=xxxxxxx&status=answered.

    If the call is not answered you will get a corresponding status given below. In your call back url you can do post call processing. Very simply you can record all the call statuses in the database and then try to call them again in another attempt or do something.
                        Call Back Url Parameters
             sid            => outbound-ucid, This is the link to the outbound request. 
                               It will be the same value which was returned in the xml for the outbound.php request
             status         => 'answered/ring/invalid_number/busy/network_congestion/exception',
             phone_no       => 'phone number of the dialed number'
             start_time     => called dialed at datetime,
             ringing_time   => duration of call ring before answered,
             duration       => answered call duration in seconds,
             caller_id      => number, on which call is dialed
             status_details => reason to call is not answered check  tag for descriptions,
KooKoo Outbound API Status and Message
Description
<response><status>error</status><message>Outbound parameter extra_data or url is mandatory</message></response> extraData is mandatory
<response><status>error</status><message>Phone number is mandatory</message></response> Phone Number is mandatory
<response><status>error</status><message>Phone number is not in proper format</message></response> Phone Number is not in particular format
<response><status>error</status><message>DB Error</message></response> If there is an internal API error.
<response><status>error</status><message>Authentication error</message></response> Not Provided valid details like callerID and apiKey
<response><status>error</status><message>Phone number in DND list</message></response> Phone Number is in DND
<response><status>error</status><message>Calls will not be made between 9pm to 9am</message></response> Can't call after between 9PM to 9 AM as per TRAI
<response><status>error</status><message>Caller Id not valid</message></response> callerID not provided properly
<response><status>error</status><message>Telephony error</message></response> Can't able to queue the call
<response><status>error</status><message>Max Connections Reached</message></response> Max Connections Reached (this will work if you use outbound_version=2)
<response><status>queued</status><message>xxxxx</message></response> if call is successfully queued
<response><status>error</status><message>Credit limit exceeded</message></response> Credit limit exceeded.

Please Keep Watching this Space for more Updates......