Call v2 POST

Call v2 POST
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.
Use the CallAudio PUT api to attach it using the Temporary-Call-ID: response header.

400

Bad Request
Account not allowed to upload
JSON body not provided
Invalid value for startdatetimeutc

401

Unauthorized

403

Forbidden
Account has reached monthly deposit quota of <plan limit> hours
Account has reached storage capacity of <plan limit> hours, and you have automatic remove oldest recordings disabled

406

SSL must be used

500

Internal Server Error

503

Service Unavailable
Server has temporarily disabled user uploads

 

Result Headers

Temporary-Call-ID

Audio must now be attached before the uploaded call is complete.
Use the CallAudio PUT api with this id to attach it.

 

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'}"

Calculate your CallN Costs in 60 Seconds

  • Accurate details are needed in order to use the right pricing tier information.
  • The calculator will give you the total cost of the plan according to the total months you specify
  • Accurate details are needed in order to use the right pricing tier information.
  • The calculator will give you the total cost of the plan according to the total months you specify
  • After you sign up, this will be used for your Calln domain.
  • A Team member will contact you on this number.
  • A summary of your calculations will be sent to this email address.
  • You may review our terms and conditions and privacy policies by clicking on the links above.