User Tools

Site Tools


api:sbc:host:create

API : SBC Host Create

Introduction

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

Request

URL https://api.telecomx.dk/sbc/host
Method GET
Access level ADMIN.
Body _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.
serviceMode Boolean True if host is down for service (PBX type only).
type String Type of server: gw, trunk, pbx, tngw, sbc, development, webrtc, job.

Query examples

{
  _id: '3.1.1.1',
  hostname: 'siptrunk23.telecomx.dk',
  purpose: 'SIP trunk server, part of primary cluster',
  type: 'trunk'
}
{
  _id: '213.83.176.40',
  hostname: 'pbx1.telecomx.dk',
  purpose: 'Hosted PBX',
  pbxCluster: 1,
  serviceMode: false,
  type: 'pbx'
}

Response

The response is a host object.

Peer 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.
serviceMode Boolean True if host is down for service (PBX type only).
type String Type of server: gw, trunk, pbx, tngw, sbc, development, webrtc, job.

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

Response example

{
  _id: '3.1.1.1',
  hostname: 'siptrunk23.telecomx.dk',
  purpose: 'SIP trunk server, part of primary cluster',
  type: 'trunk'
}
{
  _id: '213.83.176.40',
  hostname: 'pbx1.telecomx.dk',
  purpose: 'Hosted PBX',
  pbxCluster: 1,
  serviceMode: false,
  type: 'pbx'
}

Errors

Error code Message Description
422 _id Id is not a valid IP address
404 purpose Purpose is missing
422 hostname Hostname is not valid - it could not be resolved
409 hostname Hostname does not resolve to the specified IP address
409 _id A host with the same IP address already exists
422 pbxCluster Invalid PBX cluster id
422 type Invalid type
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/sbc/host/create.txt · Last modified: 2022/09/06 08:29 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki