API List
API List
1. Get Authentication Token Used for receiving websocket signals for call events.
URL:
/oapi/v1/voice/auth_token
METHOD: POST
Content Type:
application/json
Headers:
x-auth-app-id
String
3rd party identifier
x-auth-app-hash
String
sha256(appId + appSecret)
Response:
200
{ value: <auth_token>, expire: <expire time> }
2. Click to Call
URL:
/oapi/v1/call/click-to-call/:number
METHOD: POST
Content Type:
application/json
Headers:
x-auth-app-id
String
3rd party identifier
x-auth-app-hash
String
sha256(appId + appSecret)
Parameters:
sipUser
String
Device name for click to call
sipPassword
String
Password
Response:
200
Device online, click to call successful
400
Device offline, click to call failed
Note: To receive the call, the SIP device must be registered on the system. Error 400 occurs when the device is not registered.
3. Get Call History
URL:
/oapi/v1/call/histories
METHOD: GET
Content Type:
application/json
Parameters:
appId
String
3rd party identifier
created_from
String
Start date
created_to
String
End date
limit
Number
Limit of records per page, default 20
page
Number
Current page, default 1
hash
String
sha256(appId + created_from + created_to + limit + page + appSecret)
Notes:
Maximum time filter is 31 days.
Default limit is 20 records, maximum 100.
Default page is 1.
Response:
caller
{number: "01693608879", type: "realnumber"}
Caller details, with username if type=user
callee
{number: "thutranhtkbee", type: "user", username: "thutran"}
Callee details, with username if type=user
class
trunking
Call type: one_one
for internal, trunking
for inbound/outbound calls
did_number
02873019555
DID number for the company. Null if internal or outbound
direction
from_ab
from_ab
for outbound calls, to_ab
for inbound
status_detail
SUCCESS
Call status: IVR
(system call not answered), SUCCESS
, CANCELLED
, BUSY
, UNSUCCESS
duration_seconds
50
Duration of the call in seconds
unix_timestamp
1519639917
Call timestamp in Unix format
billing_seconds
43
Talk time for the call in seconds
recording
call_recording_dl5m5j5hfh4n8njj1oor.mp3
File path for the recording, empty if no recording
Limit: The call history can only be retrieved for a maximum of 31 days.
4. Get Call Recording
URL:
/oapi/v1/call/play_recording
METHOD: GET
Content Type:
application/json
Parameters:
appId
String
3rd party identifier
media
String
Recording file name
hash
String
sha256(appId + media + appSecret)
Response:
media
https://abs1.antbuddy.com/nkrecord/call_recording_F5879958-1A1211E8-A55AA457-72574952%40172.16.0.204.mp3?AWSAccessKeyId=E7IPYE4LN28Y4I6T4400&Expires=1519640615&Signature=wXNENYxr0OJR8vA26kvOOwsttzU%3D
URL link to the recording file
Last updated