Telephony, Messaging and Conferencing APIs
Placing a call
TringMe provides multiple ways to place calls - using REST API, using Flash, SIP, Instant messenger (e.g.Google-Talk), Mobile VoIP etc. This particular API will give you all the information needed to place a call using REST.
Fundamentally speaking, this will create a callback between two parties. The system will call ‘src’ first and then ‘dest’ and then bridge both the calls. By default, the ‘src’ will receive the call with the caller-id of the invoker (as set by the ‘setcallerid’ API). The ‘dest’ will receive the ‘src’ number as the caller-id. The caller-id behavior can be modified by setting the private caller-id flag. In private caller-id case, both ‘src’ and ‘dest’ with receive the caller id of the invoker thereby enabling the communication between two parties without revealing each other’s number. The API is extremely powerful and supports a lot of combinations (for e.g. broadcasting a message to multiple phone numbers, playing greeting messages, taking user input and so on).
Parameters
You can also specify comma separated multiple phone numbers to make bulk calls. This feature is specifically useful when broadcasting a voice message or inviting multiple people to a conference (e.g. 18585551212,19125551212). If you specify multiple phone numbers, then ‘dest’ should not be specified (Readmore about ‘dest’ below).
● URL of the wave file. Check supported formats below.
● A text string that should be spoken. It needs to prefixed with "male:" or "female:" to specify the type of voice to be used. For e.g.("male:Welcome to XYZ Bank")
● URL of the wave file. Check supported formats below.
● A text string that should be spoken. It needs to prefixed with "male:" or "female:" to specify the type of voice to be used. For e.g. ("male:Thank you for using XYZ Bank")
● URL of the wave file. Check supported formats below.
● A text string that should be spoken. It needs to prefixed with "male:" or "female:" to specify the type of voice to be used. For e.g. ("male:You have entered the PIN. Please try again")
0 - Disables all notifications.
1 - Send call completed and DTMF input notifications. This is the default value.
2 - Send call-in-progress notifications (e.g. SRCANSWERED)
16 - Private Callerid.
Supported Formats in Greeting Audio File:
● WAV file - 8KHz sampled, 16 bit linear, mono, uncompressed.
Sample Request URL
http://api.tringme.com/api.php?op=call&src=18585551234&dest=15015551234&cookie=1234567890123456789012345678901&apikey=b12345678901234567890123456789012345&sig=f1234567890123456789012345678901
Expected Response
OK <[operationid]>
Sample Responses
OK
OK 1feh68fdkry60bs43
Send SMS
This API is used to send an SMS to worldwide destinations.
Parameters
Sample Request URL
http://api.tringme.com/api.php?op=sms&dest=15015551234&msg=hai+joe&apikey=b12345678901234567890123456789012345&sig=f1234567890123456789012345678901
Expected Response
OK
Sample Responses
OK
Cancel a scheduled Call /SMS / Conference
This API is used to cancel a scheduled call, SMS or conference. This is a premium API and will be available on request only. Note that it's not always possible to cancel the scheduled call, SMS or conferences if there is not a sufficient time to cancel or calls/sms are already placed in queue.
Parameters
Sample Request URL
http://api.tringme.com/api.php?op=cancel&id=1q6gts8ers4&apikey=b12345678901234567890123456789012345&sig=f1234567890123456789012345678901
Expected Response
OK
Sample Responses
OK
Get Voicemails
This API is used to retrieve voicemails.
Parameters
Sample Request URL
http://api.tringme.com/api.php?op=getvoicemal&cookie=1234567890123456789012345678901&json=1&apikey=b12345678901234567890123456789012345&sig=f1234567890123456789012345678901
Expected Response
OKJ along with voicemail information in JSON format
Sample Responses
OKJ [{"voicemail":"v1t412345678901234567891","srcphone":"","recvtime":"45"},{"voicemail":"v1t412345678802234567892","srcphone":"","recvtime":"138"}]
Delete Voicemails
This API is used to delete voicemails.
Parameters
Sample Request URL
http://api.tringme.com/api.php?op=deletevoicemail&cookie=1234567890123456789012345678901&id=v1t412345678901234567891&apikey=b12345678901234567890123456789012345&sig=f1234567890123456789012345678901
Expected Response
OK
Sample Responses
OK
Create a Conference
This API is used to schedule a conference call.
Parameters
Sample Request URL
http://api.tringme.com/api.php?op=createconference&pin=12345&apin=41234&apikey=b12345678901234567890123456789012345&sig=f1234567890123456789012345678901
Expected Response
OK <id>
Sample Responses
OK 1234567890123456789012345678901
Set CallerID
This API is used to set caller-id.
Parameters
Following bit values can be specified:
● Bit 0 - Use SMS (0) or Call (1) for verification. '0' is the default value
● Bit 1 - Set this phone number as the default caller-id. This is useful when you have multiple verified caller-ids (default is ON).
● Bit 2 - Forced verification. This is useful when you want to force a caller-id verification even if that 'callerid' was already verified earlier.
Sample Request URL
http://api.tringme.com/api.php?op=setcallerid&cookie=1234567890123456789012345678901&message=setcallerid+operation+is+successful with+authenticaion+code+%25TRINGMEAUTHCODE%25&callerid=1234567890&flag=0&apikey=b12345678901234567890123456789012345&sig=f1234567890123456789012345678901
Expected Response
OK
Sample Responses
OK
Verify CallerID
This API is used to verify the caller-id that was being requested to set via ‘setcallerid’ API.
Parameters
Sample Request URL
http://api.tringme.com/api.php?op=verifycallerid&cookie=1234567890123456789012345678901&code=4kjq1ew5&apikey=b12345678901234567890123456789012345&sig=f1234567890123456789012345678901
Expected Response
OK
Sample Responses
OK
Delete CallerID
This API is used to delete existing caller-id that was being set via ‘setcallerid’ API.
Parameters
Sample Request URL
http://api.tringme.com/api.php?op=deletecallerid&cookie=1234567890123456789012345678901&callerid=18585551234&apikey=b12345678901234567890123456789012345&sig=f1234567890123456789012345678901
Expected Response
OK
Sample Responses
OK