POST /api/call
Upload a new call.
NOTE: This function will return a {tempcallid} which can then be used to attach audio. Only when the audio is attached is the call record uploaded to the server.
JSON Body Schema
{ "startdatetimeutc": {"type": "string"}, "callername": {"type": "string"}, "callerphone": {"type": "string"}, "callerdtmf": {"type": "string"}, "callermacaddress": {"type": "string"}, "callermediaendpoint": {"type": "string"}, "destinationname": {"type": "string"}, "destinationphone'": {"type": "string"}, "destinationdtmf": {"type": "string"}, "destinationmacaddress": {"type": "string"}, "destinationmediaendpoint": {"type": "string"}, "clientoperatingsystem": {"type": "string"}, "servername": {"type": "string"}, "location": {"type": "string"} }
Result Code
200 | OK |
---|---|
400 | JSON body not provided invalid startdatetimeutc |
401 | Unauthorized |
403 | account has reached monthly deposit quota of |
405 | Your reseller account has no clients with that phone number and there is no UnmatchedAssociatedAccount configured |
406 | SSL must be used |
500 | Server Error |
Result Body
{tempcallid} | This is used to upload audio to complete the call upload. |
---|
Example request
Example;- PUT https://api.calln.com/api/call Headers: Content-Type: application/json; charset=utf-8 Content-Length: {body length in bytes} Body: {'startdatetimeutc':'2013-10-09 15:23:54','callername':'fred','callerphone':'0409123456','callerdtmf':'','destinationname':'bill','destinationphone':'0312345678','destinationdtmf':'','clientoperatingsystem':'Windows Server 2008 R2 64-bit','servername':'testpc','location':'Melbourne office'} Result;- 200 (OK) Body: {'tempcallid':'312947621348675456t8234'}
Using Curl
curl "https://api.calln.com/api/call" -H "Authorization: Basic username:password | base64" -X POST -d "{'startdatetimeutc':'2013-10-09 15:23:54','callername':'fred','callerphone':'0409123456','callerdtmf':'','destinationname':'bill','destinationphone':'0312345678','destinationdtmf':'','clientoperatingsystem':'Windows Server 2008 R2 64-bit','servername':'testpc','location':'Melbourne office'}"