Registration Status
Monitor and manage device registration status with the Audian API.
Overview​
Device registration is the process where a SIP device establishes a session with the Audian SIP server. Registration status indicates whether a device is actively connected and available to receive calls.
Registration States​
| Status | Description | Availability |
|---|---|---|
registered | Device is connected and active | Can send/receive calls |
unregistered | Device not registered | Cannot send/receive calls |
expired | Registration expired | Device must re-register |
invalid | Invalid registration | Check credentials |
offline | Device not reachable | Network issue |
provisioning | Device being configured | Will auto-register |
Endpoints​
GET /v1/accounts/{accountId}/devices/{deviceId}/registration
GET /v1/accounts/{accountId}/devices/registration/status
POST /v1/accounts/{accountId}/devices/{deviceId}/registration/renew
DELETE /v1/accounts/{accountId}/devices/{deviceId}/registration
Check Device Registration​
Endpoint​
GET https://api.audian.com:8443/v2/accounts/{accountId}/devices/{deviceId}/registration
Example​
curl -X GET https://api.audian.com:8443/v2/accounts/acc_1234567890/devices/dev_sip_123456/registration \
-H "X-Auth-Token: YOUR_API_TOKEN"
Response​
{
"deviceId": "dev_sip_123456",
"status": "registered",
"registeredAt": "2023-10-20T10:00:00Z",
"expiresAt": "2023-10-20T12:00:00Z",
"registrationExpiry": 7200,
"ipAddress": "203.0.113.50",
"port": 52415,
"transportProtocol": "UDP",
"userAgent": "Yealink T46S 131.431.0191.46",
"contactUri": "sip:john.doe@203.0.113.50:52415",
"lastActivity": "2023-10-20T10:45:22Z",
"callsActive": 0,
"callsQueued": 0
}
Bulk Registration Status​
Endpoint​
GET https://api.audian.com:8443/v2/accounts/{accountId}/devices/registration/status
Query Parameters​
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status |
type | string | Filter by device type |
limit | integer | Number of results |
offset | integer | Pagination offset |
Example​
curl -X GET "https://api.audian.com:8443/v2/accounts/acc_1234567890/devices/registration/status?status=registered&type=sip&limit=50" \
-H "X-Auth-Token: YOUR_API_TOKEN"
Response​
{
"data": [
{
"deviceId": "dev_sip_123456",
"name": "Desk Phone - John Doe",
"status": "registered",
"registeredAt": "2023-10-20T10:00:00Z",
"expiresAt": "2023-10-20T12:00:00Z",
"ipAddress": "203.0.113.50",
"port": 52415
},
{
"deviceId": "dev_sip_123457",
"name": "Conference Phone - Room A",
"status": "registered",
"registeredAt": "2023-10-20T09:30:00Z",
"expiresAt": "2023-10-20T11:30:00Z",
"ipAddress": "203.0.113.51",
"port": 52416
}
],
"pagination": {
"total": 45,
"registered": 43,
"unregistered": 2,
"offline": 0
}
}
Renew Registration​
Force a device to renew its registration.
Endpoint​
POST https://api.audian.com:8443/v2/accounts/{accountId}/devices/{deviceId}/registration/renew
Example​
curl -X POST https://api.audian.com:8443/v2/accounts/acc_1234567890/devices/dev_sip_123456/registration/renew \
-H "X-Auth-Token: YOUR_API_TOKEN"
Response​
{
"deviceId": "dev_sip_123456",
"status": "registered",
"renewedAt": "2023-10-20T10:45:00Z",
"expiresAt": "2023-10-20T12:45:00Z",
"message": "Registration renewed successfully"
}
Unregister Device​
Remove a device's registration.
Endpoint​
DELETE https://api.audian.com:8443/v2/accounts/{accountId}/devices/{deviceId}/registration
Example​
curl -X DELETE https://api.audian.com:8443/v2/accounts/acc_1234567890/devices/dev_sip_123456/registration \
-H "X-Auth-Token: YOUR_API_TOKEN"
Response​
{
"deviceId": "dev_sip_123456",
"status": "unregistered",
"unregisteredAt": "2023-10-20T10:50:00Z",
"message": "Device unregistered successfully"
}
Registration Monitoring​
Dashboard View​
Get aggregate registration metrics:
curl -X GET "https://api.audian.com:8443/v2/accounts/acc_1234567890/devices/registration/dashboard" \
-H "X-Auth-Token: YOUR_API_TOKEN"
Response​
{
"timestamp": "2023-10-20T14:30:00Z",
"summary": {
"total": 50,
"registered": 48,
"unregistered": 1,
"offline": 1,
"provisioning": 0
},
"byType": {
"sip": {
"total": 30,
"registered": 29,
"unregistered": 1
},
"softphone": {
"total": 15,
"registered": 15,
"unregistered": 0
},
"webrtc": {
"total": 5,
"registered": 4,
"offline": 1
}
},
"alerts": [
{
"severity": "warning",
"message": "Device offline: Conference Phone - Room B",
"deviceId": "dev_sip_123458"
}
]
}
Registration Events​
Subscribe to registration change events:
curl -X POST https://api.audian.com:8443/v2/accounts/acc_1234567890/webhooks \
-H "Content-Type: application/json" \
-H "X-Auth-Token: YOUR_API_TOKEN" \
-d '{
"url": "https://yourserver.com/webhooks/devices",
"events": ["device.registered", "device.unregistered", "device.offline"]
}'
Webhook Event Example​
{
"event": "device.registered",
"timestamp": "2023-10-20T10:00:00Z",
"data": {
"deviceId": "dev_sip_123456",
"status": "registered",
"ipAddress": "203.0.113.50",
"port": 52415,
"registeredAt": "2023-10-20T10:00:00Z"
}
}
Troubleshooting Registration Issues​
Device Won't Register​
-
Verify Credentials:
curl -X GET https://api.audian.com:8443/v2/accounts/acc_1234567890/devices/dev_sip_123456/credentials \
-H "X-Auth-Token: YOUR_API_TOKEN" -
Check Network:
- Verify device has IP address
- Check connectivity to sip.audian.com
- Verify firewall allows SIP (port 5060)
-
Device Configuration:
- Verify SIP server: sip.audian.com
- Verify SIP port: 5060
- Check username and password
- Verify registration expiry settings
-
View Device Logs:
curl -X GET "https://api.audian.com:8443/v2/accounts/acc_1234567890/devices/dev_sip_123456/logs?lines=50" \
-H "X-Auth-Token: YOUR_API_TOKEN"
Registration Expiring Too Quickly​
Adjust registration expiry:
curl -X PATCH https://api.audian.com:8443/v2/accounts/acc_1234567890/devices/dev_sip_123456 \
-H "Content-Type: application/json" \
-H "X-Auth-Token: YOUR_API_TOKEN" \
-d '{
"settings": {
"registrationExpiry": 3600
}
}'
Device Goes Offline​
- Check network connectivity
- Verify firewall rules
- Review NAT/UPnP settings
- Check for network timeouts
- Review device logs for errors
Registration Statistics​
Get Detailed Analytics​
curl -X GET "https://api.audian.com:8443/v2/accounts/acc_1234567890/devices/registration/analytics?period=24h" \
-H "X-Auth-Token: YOUR_API_TOKEN"
Response​
{
"period": "24h",
"data": [
{
"timestamp": "2023-10-19T14:00:00Z",
"registered": 48,
"unregistered": 2,
"offline": 0
},
{
"timestamp": "2023-10-20T14:00:00Z",
"registered": 48,
"unregistered": 1,
"offline": 1
}
],
"averageUptime": 99.5,
"peakRegistrations": 50,
"lowestRegistrations": 46
}
Best Practices​
- Monitoring: Monitor registration status regularly
- Alerting: Set up alerts for offline devices
- Renewal: Ensure devices renew before expiry
- Logs: Keep registration logs for troubleshooting
- Network: Maintain stable network connectivity
- Credentials: Rotate credentials periodically
- Keepalive: Enable SIP KEEP-ALIVE for NAT traversal
SIP Registration Details​
Registration Flow​
- Device sends REGISTER request
- Server challenges authentication
- Device responds with digest auth
- Server accepts registration
- Device maintains connection
- Device renews before expiry
Configuration Parameters​
| Parameter | Default | Description |
|---|---|---|
| Registration Expiry | 3600s | How long registration is valid |
| Keepalive Interval | 30s | SIP KEEP-ALIVE interval |
| Retry Interval | 30s | Failed registration retry |
| Maximum Contacts | 1 | Multiple devices per user |