CallAudio PUT

CallAudio PUT
PUT /api/callaudio/{tempcallid}

Attach call audio to a call that is in the process of being uploaded.
After a successful call to PUT /api/call to insert a new call, a {tempcallid} is returned which is used with this function.
Once the last audio chunk is complete, the whole temporary call including this new recording will be stored. 

 

Example request

Example;-
PUT
https://api.calln.com/api/callaudio/{tempcallid}

Headers:
Content-Type: {audio/mpeg or audio/wav}
Content-Encoding: gzip
Content-Length: {body length in bytes}
Content-Range: chunk {chunkNumber}/{totalChunks}

Body:
<Binary audio data>

{tempcallid} After a successful call to PUT /api/call to insert a new call, the value returned. {chunkNumber} is the chunk that is being uploaded. {totalChunks} is the total amount of chunks. If unknown, it can be set to ‘*’ until the last chunk. 

 

Result Code

200

OK

400

Content-Type header is not present Content-Type header only currently valid value is ‘audio/mpeg’ Content-Range header is not present Content-Range header should start with ‘chunk’ Content-Range header should be in the format ‘chunk {chunkNumber}/{totalChunks}’ Content-Range header should be in the format ‘chunk {chunkNumber}/{totalChunks}’ Invalid Content-Range header value for {chunkNumber} Content-Range header value for {chunkNumber} must be 1 or more Content-Range header value for {totalChunks} was already previously set to <x> Invalid Content-Range header value for {totalChunks} Content-Range header value for {totalChunks} value is less than 1 Content maximum size is 10MB

401

Unauthorized

404

Temporary callid not found

406

SSL must be used

500

Server Error

 

Example request

Example;-
PUT
https://api.calln.com/api/callaudio/93ee1996c26a407cb5390b42cf0de1dc

Headers:
Content-Type: audio/mpeg
Content-Length: 35784
Content-Range: chunk 15/15

Body:
<Binary audio data>

Result;-
200 (OK)

Body:
{'status':'complete'}

Using Curl

curl "https://api.calln.com/api/callaudio/{tempcallid}" -H "Authorization: Basic username:password | base64" -X PUT --data-binary file@myfile.bin

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.