POST /api/v2/call
Upload a new call to your account.
NOTE: For a normal call containing audio this function will return a temporary call id which will need to be used with the CallAudio PUT call to attach the audio recording. Only once this audio is attached will the complete call be uploaded to your account.
JSON Body Schema
{ "startdatetimeutc": {"type": "string"}, "connecteddatetimeutc": {"type": "string"}, "callid": {"type": "string"}, "caller": [ "phonenumber": {"type": "string"}, "name": {"type": "string"}, "macaddress": {"type": "string"}, "mediaendpoint": {"type": "string"}, "keypresses": ([ "timems": {"type": "integer"}, "key": {"type": "string"} ]) ], "destination": [ "phonenumber": {"type": "string"}, "name": {"type": "string"}, "macaddress": {"type": "string"}, "mediaendpoint": {"type": "string"}, "keypresses": ([ "timems": {"type": "integer"}, "key": {"type": "string"} ]) ], "telephonyplatform": {"type": "string"}, "clientoperatingsystem": {"type": "string"}, "clientservername": {"type": "string"}, "location": {"type": "string"} "notes": {"type": "string"} }
Result Code
200 | OK – Call upload complete and no audio is needed. Check status description for more information on reason, e.g. ‘Handset disabled’. |
---|---|
206 | Partial Content – The audio must now be attached before the uploaded call is complete. |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
406 | SSL must be used |
500 | Internal Server Error |
503 | Service Unavailable |
Result Headers
Temporary-Call-ID | Audio must now be attached before the uploaded call is complete. |
---|
Example request
Example;- POST https://api.calln.com/api/v2/call Headers: Content-Type: application/json; charset=utf-8 Content-Length: {body length in bytes} Body: {"startdatetimeutc":"2017-04-12 1:14:32","connectdatetimeutc":"2017-04-12 1:14:35","callid":"","caller":{"phonenumber":"0390953000","name":"Test Caller","macaddress":"01234567890AB","mediaendpoint":"192.168.1.100:5060","keypresses":null},"destination":{"phonenumber":"0409000000","name":"Destination Party","macaddress":"BA0987654321","mediaendpoint":"192.168.1.50:5060","keypresses":null},"telephonyplatform":"Telstra TIPT","clientoperatingsystem":"Windows Server 2012R2 64-bit","clientservername":"TEST-SVR","location":"Melbourne Office"} Result;- 206 (Partial Content)
Response-Headers: Temporary-Call-ID: 312947621348675456t8234 Body: <empty>
Using Curl
curl "https://api.calln.com/api/v2/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'}"