User Tools

Site Tools


api:sbc:host:update

API : SBC Host Update

Introduction

This request will update an internal hosts that the SBC relays traffic to and accepts traffic from.

Request

URL https://api.telecomx.dk/sbc/host/HOST_ID
Method POST
Access level ADMIN.
Param HOST_ID IP address of the host.
Body hostname String [optional] Hostname of the host. Must resolve to the host's IP address - an empty value keeps the stored hostname.
purpose String [optional] What the host is used for.
pbxCluster Number [optional] Id of the PBX cluster the host belongs to. Only used for pbx hosts, a whole number from 1 to 9 - a host that becomes a pbx host must be given one.
serviceMode Boolean [optional] True if host is down for service. Can be set on any host type.
type String [optional] Type of server: gw, trunk, pbx, tngw, sbc, development, webrtc, job, voicemail.

Query examples

{
  "hostname": "siptrunk48.example.com"
}

Response

The response is a host object.

Host object (JSON)
_id String IP address of the host.
hostname String Hostname of the host.
purpose String What the host is used for.
pbxCluster Number Id of the PBX cluster the host belongs to. Only on pbx hosts.
serviceMode Boolean True if host is down for service.
type String Type of server: gw, trunk, pbx, tngw, sbc, development, webrtc, job, voicemail.

Note that properties holding no value may be omitted from the object.

Response example

{
  "_id": "203.0.113.10",
  "hostname": "siptrunk1.example.com",
  "purpose": "SIP trunk server, part of primary cluster",
  "type": "trunk"
}
{
  "_id": "203.0.113.20",
  "hostname": "pbx1.example.com",
  "purpose": "Hosted PBX",
  "pbxCluster": 1,
  "serviceMode": false,
  "type": "pbx"
}

Errors

Error code Message Description
422 <property> Invalid input for the named property - the request body, query or URL parameter failed validation
404 _id Host not found
422 hostname Hostname is not valid - it could not be resolved
409 hostname Hostname does not resolve to the specified IP address
422 pbxCluster Invalid PBX cluster id
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/sbc/host/update.txt · Last modified: by Mikkel Meerwaldt Jørgensen

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki