Skip to main content

Device Management

Toggle phone and SIP device status for users in your WebRTC application. Control whether a user receives calls on their PSTN phone, SIP endpoint, or both.

Base URL

https://integrationscore.mum1.exotel.com/v2/integrations

Update Device Status

Toggle a user's phone or SIP device on/off.

PUT /{customer_id}/apps/{app_id}/users/{user_id}/devices

Headers

HeaderValue
AuthorizationBearer <app_token>
Content-Typeapplication/json

Request Body

{
"phone": true,
"sip": true
}

Parameters

ParameterTypeRequiredDescription
phoneBooleanNoEnable/disable PSTN phone device
sipBooleanNoEnable/disable SIP/WebRTC device
info

At least one device must remain enabled. The API will reject requests that disable all devices.

Example Request

curl -X PUT \
'https://integrationscore.mum1.exotel.com/v2/integrations/{customer_id}/apps/{app_id}/users/{user_id}/devices' \
-H 'Authorization: Bearer <app_token>' \
-H 'Content-Type: application/json' \
-d '{
"phone": false,
"sip": true
}'

Response

{
"success": true,
"data": {
"user_id": "agent_001",
"devices": {
"phone": {
"enabled": false,
"number": "+919876543210"
},
"sip": {
"enabled": true,
"username": "agent_001@app_abc123.exotel.com"
}
},
"updated_at": "2024-06-15T10:30:00.000Z"
}
}

Get Device Status

GET /{customer_id}/apps/{app_id}/users/{user_id}/devices

Example Request

curl -X GET \
'https://integrationscore.mum1.exotel.com/v2/integrations/{customer_id}/apps/{app_id}/users/{user_id}/devices' \
-H 'Authorization: Bearer <app_token>'

Response

{
"success": true,
"data": {
"user_id": "agent_001",
"devices": {
"phone": {
"enabled": false,
"number": "+919876543210"
},
"sip": {
"enabled": true,
"username": "agent_001@app_abc123.exotel.com",
"registered": true,
"last_seen": "2024-06-15T10:25:00.000Z"
}
}
}
}

Device Behavior

phonesipBehavior
truetrueCalls ring on both PSTN phone and WebRTC client
truefalseCalls ring only on PSTN phone
falsetrueCalls ring only on WebRTC/SIP client
falsefalse❌ Not allowed — at least one device must be enabled

HTTP Status Codes

CodeDescription
200Success
400Bad Request — Invalid parameters or all devices disabled
401Unauthorized — Invalid or expired token
404Not Found — User doesn't exist
500Internal Server Error