Operations

Operations corresponding calls

Hangup Call

Currently, active/live call can be hung up by using the below method

curl --request POST \
  --url https://api.servetel.in/v1/call/hangup \
  --header 'accept: application/json' \
  --header 'authorization: Bearer yourtokenhere' \
  --header 'content-type: application/json' \
   --data '{}'

Request variables

Variable Name

Description

Data Type

call_id

Unique ID of call

String

Sample request

curl --request POST \
  --url https://api.servetel.in/v1/call/hangup \
  --header 'accept: application/json' \
  --header 'authorization: Authorization' \
  --header 'content-type: application/json' \
  --data '{"call_id":"123456789.123"}'

Response variables

Variable Name

Description

Data Type

success

Request success status

Boolean

message

Message corresponding success status

String

Call Options

Below operations can be performed on a currently active call

Type of Operation

Description

Value

Monitor

Monitor conversation between agents and clients

1

Whisper

Talk to an agent while their conversation with a client

2

Transfer

Transfer call to another agent

4

curl --request POST \
  --url https://api.servetel.in/v1/call/options \
  --header 'accept: application/json' \
  --header 'authorization: Authorization' \
  --header 'content-type: application/json'

Request variables

Variable Name

Description

Data Type

type*

Type of Call Operation to be performed.

Integer

call_id*

Unique ID of the call on which operations needs to be performed

String

agent_id

Unique ID of the Agent who can monitor or can whisper during the call, is only required in case of type: 1 (Monitor), 2 (Whisper)

Integer

intercom

Unique intercom number of the agent to whom call would be transferred, only required in case of type: 4 (Transfer)

String

Sample request

curl --request POST \
  --url https://api.servetel.in/v1/call/options \
  --header 'accept: application/json' \
  --header 'authorization: Authorization' \
  --header 'content-type: application/json' \
  --data '{"type":1,"call_id":"123456.123"}'

Response variables

Variable Name

Description

Data Type

success

Request success status

Boolean

message

Message corresponding success status

String