KooKoo tunes is nothing but the name given to markup language which powers the KooKoo platform. Using different KooKoo tunes you can make your application sing :). The heart of the KooKoo platform is a simple request response model. Your web application requests the platform to perform a specific action like play some text, collect some user input or record user voice etc. KooKoo performs the action and responds with a result if a result exists. The following are the KooKoo tunes available at your disposal:
- response: This is the root tag
- playtext: Play some text to your callers
- Say-As: Play some dynamic values like date ,currency ,characters etc in different languages
- playaudio: Play some audio to your callers
- collectdtmf: Collect user input from your callers
- record: Record caller conversation
- conference: Conference multiple callers
- hangup: Disconnect current caller
- dial: Make an outbound call (Available only to paid users)
- Description:This is the all enclosing root tag. You web application should enclose all other tags inside this root tag.
- Attributes:
- sid:Can be used by your web application for session tracking
purposes
- filler:Filler audio attribute. Can be "yes" or "no"
Use Case: With the addition of
filler
audio attribute to the response tag, you can now play a wait music when
you are doing a lot of processing
How to use: If you think, the next action from the customer will
involve a lot of processing from your side and the customer has to
wait, then include the attribute filler="yes" in your response.
Example:
$r=new Response();
$r->setFiller("yes");
Explanation:
When, KooKoo sees this attribute, it will first do all the tasks
specified by you in the response, and then it will make a Get request
to your application and parallely play the filler audio when the
customer is waiting.
- Examples:
1.Simple response
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<playtext>Hello World</playtext>
</Response>
2.Simple response with sid
<?xml version="1.0" encoding="UTF-8"?>
<Response sid="12345">
<playtext>Hello World</playtext>
</Response>
- Description:To play dynamic values such as date,currency,number etc.
- Attributes:
- format= format code to be given for playing date,currency,number.Format code listed below are applied to all the languages.
- Format code's for attribute language english, you can use the same code for other languages listed given
Example :
format format_code text lang Play As
Date 201 20110721 EN Thursday July 21st 2011
Date 202 20110721 EN July 21st 2011
Date 204 20110721 EN July 21st
Currency 402 53 EN Fifty three rupees and zero zero paise
Currency 401 53 EN it ignores numbers after decimal point
Digits 501 1234 EN one two three four
Number 1 1234 EN one thousand two hundred and thirty four
- lang= language code to be given in below format to play in that particular language.
- english => EN,hindi => HI,kannada =>KA,Malayalam=> ML,Telugu => TE,Tamil=>TN,Gujarati=> GUJ, Benagali=>
BN,Marathi=> MR,Oriya=> ORI
- Examples 1: To play characters
<?xml version="1.0" encoding="UTF-8"?>
<response>
<say-as format="501" lang="EN">123ABC</say-as>
</response>
It will be played as "one two three A B C";
Examples 2: To play date
<?xml version="1.0" encoding="UTF-8"?>
<response>
<say-as format="222" lang="EN">20121227ABC</say-as>
</response>
It will be played as "December 27 2012";
- Description:This tag is used to create a conference room with number given in the tag.Ex 2345. Using this, you can push callers into a conference room. This tag is mainly used to create dynamic phone conferences. You can mix this with collectdtmf to ask the users to enter a pin and then push them into a correct conference room.
- Attributes:None
- Examples:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<conference>2345</conference>
</response>
- Description:This tag is used to inform KooKoo to disconnect the caller.Make sure you always call this at the end of your program to keep things clean.
- Attributes:None
- Examples:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<hangup></hangup>
</response>
- Description: Inside your KooKoo XML just include number to be called. When KooKoo sees that tag it will make a call to that specified number and connect the caller. This is mainly used when we want to connect the caller to an agent or something.This tag is used to dial an outbound number and the conversation can be recorded. It returns status of the dial and also the url of the file containing the audio recorded and hosted for one day.
- Attributes:
- record=Record the conversation or not.Values are true or false.
- limit time= for max calltime //maxtime call allowed after called_number answered.
- timeout=maximum ringing time for call when dialed to a number.
- if {moh=default} there will be a music on hold or {moh=ring} there will be normal ring.
- Note:When you make a dial out, then it uses one more port. So if you have taken 5 KooKoo ports, you can make maximum of 2 dials.
- Examples:
<dial record="true" limittime="1000" timeout="30" moh="default" >09912343234</dial>
After the dial is done, KooKoo will call your application URL with the following parameters:
event=Dial
status=answered/not_answered
data=url of recorded file if record is enabled.
message=Telcom status as sent by the service provider.
The message gives us more insight into why a dialed call failed. Most calls go through, but when the calls have a problem these messages give us more pointers.
If a lot of calls are failing, please mail to support with the most common reason and KooKoo will work with the telecom service provider to resolve the issue.
Message can include the following values:
Unknown: Reason is not known. This happens when the service provider does not give enough information
InvalidNumber: Number is not allocated
NoRouteNetwork: No Route to the Network. This is a routing issue
NoRouteDestination: No Route to the Destination. Again a routing issue
SpecialTone:
MisdialedPrefix: The prefix was misdialed or not dialed properly
UnacceptableChannel: The channel specified is not acceptable. This error has to be resolved by KooKoo and the service provider working together.
BeingDelivered:
Preemption:
PreemptionReservedCircuit:
Normal: Normal call clearing
Busy: User is busy. This is when we get the engaged tone
NoResponse: User is not giving a response
NoAnswer: There is no answer from the user. The user phone is ringing
SubcriberAbsent:
Rejected: Call was rejected
NumberChanged: Number has changed
DestinationOutOfOrder: Destination out of order
InvalidNumberFormat: The number format specified to be dialed is wrong. Please check it.
FacilitiesRejected:
Congestion: No circuit/Channel is available. This generally happens during peak hours
CallQueuedAtServiceProvider:
NetworkOutOfOrder:
ConnnectionOutOfService:
TemporaryFailureAtServiceProvider:
ChannelNotAvailable:
ResourceUnavailable:
QOSUnavailable:
FacilityNotSubscribed:
OutgoingCallBarred:
OutgoingCallBarredInCUG:
IncomingCallBarred:
IncomingCallBarredInCUG:
UserNotInCUG:
InComapatibleDestination:
CUGNotPresent: