View Categories

Refer Call API

1 min read

The Refer Call API allows you to return calls to the customer’s telephone system after the routing plan has been run through on the TENIOS Cloud Communications platform.

Initiate Refer call :

Initiate refer call.

POST https://api.tenios.com/refer-call

 

Request Parameter:

access_key The API Access Key. It can be found in the menu MY ACCOUNT–>General Settings in the section API in the customer portal.
call_uuid The uuid of the call which should be transferred.
sip_uri The sip uri which will be put into the the Refer-To header in the related REFER message.

Request Parameter:

success boolean true if successful, otherwise an error message

 

Examples of correct requests:

Request:

{
   "access_key": "XXXXX-XXXX-XXXXXX",
   "call_uuid": "XXXXX-XXXX-XXXXXX",
   "sip_uri": "sip:4044@8.8.8.8:5060;user=phone"
}

API Response:

HTTP Status Code: 200 (OK)

{
   "success": true
}

 

Examples of incorrect requests:

INVALID_FIELD_1
This error is returned if the sip_uri invalid.

Request:

{
   "access_key": "XXXXX-XXXX-XXXXXX",
   "call_uuid": "XXXXX-XXXX-XXXXXX",
   "sip_uri": ""
}

 

API Response:

HTTP Status Code: 400 (Bad Request)

{
   "error_code": "INVALID_FIELD",
   "error_message": "Invalid 'sip_uri' input parameter. Invalid value - '' .",
   "fields": [
      "sip_uri"
   ]
}

 

INVALID_FILED_2
This error is returned if the call_uuid invalid.

Request:

{
   "access_key": "XXXXX-XXXX-XXXXXX",
   "call_uuid": "123456789",
   "sip_uri": "sip:4044@8.8.8.8:5060;user=phone"
}

 

API Response:

HTTP Status Code: 400 (Bad Request)

{
   "error_code": "INVALID_FIELD",
   "error_message": "Invalid 'call_uuid' input parameter. Invalid value - '1234567890'.",
   "fields": [
      "call_uuid"
   ]
}

 

INVALID_JSON
This error is returned when a parameter missing in the request.

Request:

{
   "access_key": "XXXXX-XXXX-XXXXXX",
   "call_uuid": "XXXXX-XXXX-XXXXXX"
}

 

API Response:

HTTP Status Code: 400 (Bad Request)

{
   "error_code": "INVALID_JSON",
   "error_message": "An invalid JSON object was provided in the request body.",
   "fields": []
}

 

INVALID_SIP_URI
This error is returned if the sip_uri invalid.

Request:

{
   "access_key": "c0b93a5e-4ce0-4adb-940e-5079f2abbcb4",
   "call_uuid": "39d3f096-ad39-4fb1-a666-8353b27e2a8b",
   "sip_uri": "8.8.8.8:5060;user=phone"
}

 

API Response:

HTTP Status Code: 400 (Bad Request)

{
   "error_code": "INVALID_SIP_URI",
   "error_message": "Invalid URI. Valid format is like 'sip:<USER>@<DOMAIN>[:<PORT>][<ATTRIBUTES>]'",
   "fields": [
      "sip_uri"
   ]
}

 

TOP