Skip to content

Trunking


SIP Trunks allow to connect traditional PBXes to the platform. You can setup trunkgroups and connect numbers (aka DIDs) to them. A trunkgoup always requires access trunks. An access trunk is a point-to-point connection between the PBX and the fusion platform. A trunkgroup must have at least 1 but can have multiple access trunk.

List all SIP trunks of a subscription

Use this endpoint to retrieve all SIP trunks currently assigned to a subscription.

Request

Endpoint

GET /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/trunkgroups

Authorization

Required role

tenants.instance.subscriptions.instance.trunkgroups.list

Path Parameters

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant to which the subscription belongs
sub_idintegerIndex of the subscription for which you want to list the existing SIP trunks

URL/Query parameters

N/A

Response

Status codes

ParameterDescription
200One or more SIP trunks found
400Error while processing the request
404No SIP trunk found for the specified subscription
403The API consumer doesn't have sufficient rights to perform this action
500Uncatched error on server side

Success

Body
ParameterTypeDescriptionConditional?
trunkgroupsarrayList containing all SIP trunks for the tenantno
SIP Trunk Summary Object
ParameterTypeDescriptionConditional?
idintegerIndex of the SIP trunkno
namestringName of the SIP trunkno
externalbooleanFlag that indicates if a SIP trunk is configured as externalno
Example
json
{
    "trunkgroups": [
        {
            "id": 7,
            "name": "My Cisco Trunk Group",
            "external": false
        },
        {
            "id": 8,
            "name": "Xelion",
            "external": true
        }

    ]
}

Get details of a specific SIP trunk

Use this endpoint to retrieve the details of a SIP trunk currently assigned to a subscription.

Request

Endpoint

GET /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/trunkgroups/{id}

Authorization

Required role

tenants.instance.subscriptions.instance.trunkgroups.read

Path Parameters

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant to which the subscription belongs
sub_idintegerIndex of the subscription for which you want to list the existing SIP trunks
idintegerIndex of an existing SIP trunk

URL/Query parameters

N/A

Response

Status codes

ParameterDescription
200Details of the SIP trunk could be retrieved
400Error while processing the request
404No SIP trunk found for the specified subscription and SIP trunk index
403The API consumer doesn't have sufficient rights to perform this action
500Uncatched error on server side

Success

Body
ParameterTypeDescriptionConditional?
namestringName of the SIP trunkno
externalbooleanFlag that indicates if the SIP trunk is configured as externalno
presentationFormatstringDetermines how the number should be presented on the trunk. This can be e164,national_with_0 or national_without_0no
maxCallsintegerMaximum simultaneous calls allowed for the SIP trunkyes
maxIncomingCallsintegerMaximum incoming calls allowed for the SIP trunkyes
maxOutgoingCallsintegerMaximum outgoing calls allowed for the SIP trunkyes
emergencyLocationobjectEmergency location as defined by this structure in common parametersyes
pilotobjectObject representing the pilot number of the trunk. Acts as main numberyes
blockUnscreenedCallsBooleanBlock calls that have a CLI that doesn't belong to this trunkno
overwiteUnscreenedCallsWithPilotBooleanOverwrite the CLI to the pilot number for calls with a CLI that doesn't belong to this trunkno
cfaActivebooleanFlag enabling or disabling call forwarding always on the SIP trunkno
cfaDestinationstringCall forwarding always destinationno
cfnrActivebooleanFlag enabling or disabling call forwarding not reachable on the SIP trunkno
cfnrDestinationstringCall forwarding not reachable destinationno
cfnrTimerintegerTimer in seconds before call forwarding not reachableno

The role of an external SIP trunk

External SIP trunks are special trunks that do not follow the classical settings of non-external SIP trunks. They do not need a specific SBC configuration as this has been set once in a static way for all customers. A static trunk is set per default for every subscriptions if the group properties draas_external_trunkgroup_nameand draas_external_trunkgroup_name have been set. This external SIP trunk cannot be deleted and has a limited set of settings that may be managed.

Phone Number Object
ParameterTypeDescriptionConditional?
idintegerIndex of the phone numberyes
connectionIdintegerIndex of the connection ID linking the phone number to the trunkno
fullNumberstringPhone number in E.164 international formatno
Example
json
{
    "name": "My Cisco Trunk Group",
    "external": false,
    "presentationFormat": "e164",
    "emergencyLocation": {
        "id": 1,
        "name": "Brussels"
    },
    "maxCalls": 10,
    "pilot": {
        "connectionId": 705,
        "fullNumber": "+3225405387"
    },
    "blockUnscreenedCalls": false,
    "overwiteUnscreenedCallsWithPilot": true,
    "cfaActive": false,
    "cfncActive": true,
    "cfnrDestination": "+33613575607",
    "cfnrTimer": 10,
    "cfaActive": false,
    "cfnrActive": true,
}

Create a new SIP trunk

Use this endpoint to associate a new SIP trunk to a subscription

Request

Endpoint

POST /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/trunkgroups

Authorization

Required role

tenants.instance.subscriptions.instance.trunkgroups.create

Path Parameters

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant to which the subscription belongs
sub_idintegerIndex of the subscription to which you want to add a SIP trunk

URL/Query parameters

N/A

Body
ParameterTypeDescriptionRequired?
namestringName of the new SIP trunk. This name must be unique within a subscriptionyes
presentationFormatstringDetermines how the number should be presented on the trunk. This can be e164,national_with_0 or national_without_0no
maxCallsintegerMaximum simultaneous calls allowed for the SIP trunkno
maxIncomingCallsintegerMaximum incoming calls allowed for the SIP trunkno
maxOutgoingCallsintegerMaximum outgoing calls allowed for the SIP trunkno
emergencyLocationobjectEmergency location as defined by this structure in common parametersyes
blockUnscreenedCallsBooleanBlock calls that have a CLI that doesn't belong to this trunkno
overwiteUnscreenedCallsWithPilotBooleanOverwrite the CLI to the pilot number for calls with a CLI that doesn't belong to this trunkno
cfaActivebooleanFlag enabling or disabling call forwarding always on the SIP trunkno
cfaDestinationstringCall forwarding always destinationno
cfnrActivebooleanFlag enabling or disabling call forwarding not reachable on the SIP trunkno
cfnrDestinationstringCall forwarding not reachable destinationno
cfnrTimerintegerTimer in seconds before call forwarding not reachableno

Example

json
{
  "name": "My New SIP Trunk"
}

Response

Status codes

ParameterDescription
200The SIP trunk was created successfully
400Error while creating the SIP trunk
403The API consumer doesn't have sufficient rights to perform this action
500Uncatched error on server side

Success

Body
ParameterTypeDescriptionConditional?
idintegerIndex of the created SIP trunkno
Example
json
{
  "id": 7
}

Modify an existing SIP trunk

Use this endpoint to modify an existing SIP trunk.

Request

Endpoint

PUT /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/trunkgroups/{id}

Authorization

Required role

tenants.instance.subscriptions.instance.trunkgroups.update

Path Parameters

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant to which the subscription belongs
sub_idintegerIndex of the subscription for which you want to list the existing SIP trunks
idintegerIndex of an existing SIP trunk

URL/Query parameters

N/A

Body
ParameterTypeDescriptionRequired?
namestringName of the new SIP trunk. This name must be unique within a subscriptionyes
presentationFormatstringDetermines how the number should be presented on the trunk. This can be e164,national_with_0 or national_without_0no
maxCallsintegerMaximum simultaneous calls allowed for the SIP trunkno
maxIncomingCallsintegerMaximum incoming calls allowed for the SIP trunkno
maxOutgoingCallsintegerMaximum outgoing calls allowed for the SIP trunkno
emergencyLocationobjectEmergency location as defined by this structure in common parametersyes
pilotintegerConnection ID of the DID you want to assign as pilotyes
blockUnscreenedCallsBooleanBlock calls that have a CLI that doesn't belong to this trunkno
overwiteUnscreenedCallsWithPilotBooleanOverwrite the CLI to the pilot number for calls with a CLI that doesn't belong to this trunkno
cfaActivebooleanFlag enabling or disabling call forwarding always on the SIP trunkno
cfaDestinationstringCall forwarding always destinationno
cfnrActivebooleanFlag enabling or disabling call forwarding not reachable on the SIP trunkno
cfnrDestinationstringCall forwarding not reachable destinationno
cfnrTimerintegerTimer in seconds before call forwarding not reachableno

Response

Status codes

ParameterDescription
204SIP trunk has been updated
400Error while processing the request
404No SIP trunk found for the specified subscription and SIP trunk index
403The API consumer doesn't have sufficient rights to perform this action
500Uncatched error on server side

Success

Body

N/A

Delete an existing SIP trunk

Use this endpoint to remove an existing SIP trunk from a subscription.

Request

Endpoint

DELETE /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/trunkgroups/{id}

Authorization

Required role

tenants.instance.subscriptions.instance.trunkgroups.delete

Path Parameters

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant to which the subscription belongs
sub_idintegerIndex of the subscription for which you want to list the existing SIP trunks
idintegerIndex of an existing SIP trunk

URL/Query parameters

N/A

Body

N/A

Response

Status codes

ParameterDescription
204SIP trunk has been deleted
400Error while processing the request
403The API consumer doesn't have sufficient rights to perform this action
500Uncatched error on server side

Auto removing of phone numbers

If the SIP trunk still has numbers associated, the deletion bill be refused. Please make sure the numbers are disconnected from the trunk, prior to deleting the trunk.

Success

Body

N/A

Get numbers from a SIP trunk

Use this endpoint to get all phonenumbers connected to a trunk.

Request

Endpoint

GET /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/trunkgroups/{trunkgroup_id}/numbers

Authorization

Required role

tenants.instance.subscriptions.instance.trunkgroups.instance.numbers.list

Path Parameters

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant to which the subscription belongs
sub_idintegerIndex of the subscription to which the SIP trunk belongs
trunkgroup_idintegerIndex of the SIP trunk

URL/Query parameters

N/A

Body

N/A

Response

Status codes

ParameterDescription
204The phone numbers have been successfully removed (might be the complete list or a partial list)
400Error while removing the phone numbers
404No SIP trunk found for the specified subscription and SIP trunk index
403The API consumer doesn't have sufficient rights to perform this action
500Uncatched error on server side

Success

Body
ParameterTypeDescriptionConditional?
numbersarrayArray of phone numbers that have been assigned to the SIP trunkyes
Phone Number Object
ParameterTypeDescriptionConditional?
idintegerIndex of the phone numberyes
connectionIdintegerIndex of the connection ID linking the phone number to the trunkno
fullNumberstringPhone number in E.164 international formatno
Example
json
{
    "numbers": [
        {
            "id": 872,
            "connectionId": 137,
            "fullNumber": "+3225405440"
        },
        {
            "id": 1042,
            "connectionId": 136,
            "fullNumber": "+3225409843"
        },
        {
            "id": 1043,
            "connectionId": 135,
            "fullNumber": "+3225409844"
        }
    ]
}

Add numbers to a SIP trunk

Use this endpoint to add phone numbers to an existing SIP trunk.

Request

Endpoint

POST /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/trunkgroups/{trunkgroup_id}/numbers

Authorization

Required role

tenants.instance.subscriptions.instance.trunkgroups.instance.numbers.create

Path Parameters

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant to which the subscription belongs
sub_idintegerIndex of the subscription to which the SIP trunk belongs
trunkgroup_idintegerIndex of the SIP trunk

URL/Query parameters

N/A

Body
ParameterTypeDescriptionRequired?
numbersarrayArray of numbers in e164 forma that you want to addyes

Example

json
{
    "countryCode": "+32",
    "numbers": [
        "+3225405220",
        "+3225405221",
        "+3225405230",
        "+3225405231",
    ]
}

Response

Status codes

ParameterDescription
200The phone numbers have been successfully added (might be the complete list or a partial list)
400Error while adding the phone numbers
404No SIP trunk found for the specified subscription and SIP trunk index
403The API consumer doesn't have sufficient rights to perform this action
500Uncatched error on server side

Remove numbers from a SIP trunk

Use this endpoint to remove phone numbers from an existing SIP trunk.

Request

Endpoint

DELETE /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/trunkgroups/{trunkgroup_id}/numbers

Authorization

Required role

tenants.instance.subscriptions.instance.trunkgroups.instance.numbers.delete

Path Parameters

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant to which the subscription belongs
sub_idintegerIndex of the subscription to which the SIP trunk belongs
trunkgroup_idintegerIndex of the SIP trunk

URL/Query parameters

N/A

Body
ParameterTypeDescriptionRequired?
connectionIdsarrayArray of connection ID's used to link phone numbers to the SIP trunk as returned by this APIyes

Example

json
{
    "connectionIds": [
        125,
        138,
        139
    ]
}

Response

Status codes

ParameterDescription
204The phone numbers have been successfully removed (might be the complete list or a partial list)
400Error while removing the phone numbers
404No SIP trunk found for the specified subscription and SIP trunk index
403The API consumer doesn't have sufficient rights to perform this action
500Uncatched error on server side

List all SIP access trunks linked to a SIP trunk

Use this endpoint to retrieve all SIP access trunks currently linked to a SIP trunk.

Request

Endpoint

GET /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/trunkgroups/{trunkgroup_id}/access_trunks

Authorization

Required role

tenants.instance.subscriptions.instance.trunkgroups.instance.access_trunks.list

Path Parameters

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant to which the subscription belongs
sub_idintegerIndex of the subscription for which you want to list the existing SIP access trunks
trunkgroup_idintegerIndex of an existing SIP trunk

URL/Query parameters

ParameterTypeDescriptionRequired?
searchstringUsed to perform a search through all searchable properties of a SIP access trunk that look like the string passedno
sortstringAllows to specify one searchable property of a SIP access trunk to apply a sorting operationno
dirstringWhen performing a sort operation, specifies the type. Allowed values are asc for ascending (default) or desc for descendingno
page_sizeintegerUsed for pagination, determines the maximum number of records on one page of results (defaults to 10)no
nextstringA token used to get the next records in the list. This token is taken back from the results of the previous callno

Response

Status codes

ParameterDescription
200One or more SIP access trunk found
400Error while processing the request
403The API consumer doesn't have sufficient rights to perform this action
404No SIP trunk found for the specified subscription and tenant
500Uncatched error on server side

Success

Body
ParameterTypeDescriptionConditional?
resultsstringTotal count of results that match your queryno
pagesstringTotal count of result pages that are availableno
pagestringID of the page that is currently returnedno
nextstringA token used for infinite scrolling, to be used in the next call to retrieve subsequent records. Only present if the list of numbers has to be continuedyes
accessTrunksarrayList containing all SIP access trunks for the tenantno
SIP Access Trunk Summary Object
ParameterTypeDescriptionConditional?Searchable?
idintegerIndex of the SIP access trunknono
namestringName of the SIP access trunknoyes
poparray0ject describing the details of the Trunking access POP to which the trunk is connectedno
weightintegerWeight applicable to this access trunknono
priorityintegerPriority applicable to this access trunknono
primaryPeerIpstringIP address of your PBXyesyes
primaryPeerPortintegerPort of your PBXyesno
ipWhiteliststringA string giving a list of white listed IP addressesyesno
authRequiredbooleanFlag indicating if authorization is required for this access trunknono
authUsernamestringUsername used in authorization for this access trunknono
authPasswordstringPassword used in authorization for this access trunknono
Trunking POP Object
ParameterTypeDescriptionConditional?Searchable?
idintegerInternal ID representing the access point in the network to which this trunk is connectednono
namestringFriendly name of the POPnono
accessFQDNstringFQDN that can be used by the PBX as outbound proxynono
accessPortintegerUDP port to whnono
Example
json
    "accessTrunks": [
        {
            "authRequired": false,
            "id": 9,
            "name": "Another CBUR Access Trunk Test",
            "pop": {
                "accessFQDN": "amsterdam.trunking.copaco.nl",
                "id": "2",
                "name": "Trunking Access Amsterdam"
            },
            "primaryPeerIp": "192.168.0.1",
            "primaryPeerPort": 5060,
            "priority": 1,
            "weight": 5
        },
        {
            "authRequired": false,
            "id": 7,
            "ipWhitelist": "192.168.0.1,192.168.1.1",
            "name": "CBUR Access Trunk Test",
            "pop": {
                "accessFQDN": "eindhoven.trunking.copaco.nl",
                "id": "1",
                "name": "Trunking Access Eindhoven"
            },
            "primaryPeerIp": "10.0.0.1",
            "primaryPeerPort": 5061,
            "priority": 2,
            "weight": 10
        },
        {
            "authPassword": "2nice!",
            "authRequired": true,
            "authUsername": "brice",
            "id": 10,
            "name": "Modified CBUR Access Trunk Test",
            "primaryPeerIp": "10.1.1.2",
            "primaryPeerPort": 5061,
            "priority": 2,
            "weight": 5
        }
    ],
    "page": 1,
    "pages": 1,
    "results": 3
}

Create a new SIP access trunk

Use this endpoint to associate a new SIP access trunk to an existing SIP trunk.

Request

Endpoint

POST /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/trunkgroups/{trunkgroup_id}/access_trunks

Authorization

Required role

tenants.instance.subscriptions.instance.trunkgroups.instance.access_trunks.create

Path Parameters

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant to which the subscription belongs
sub_idintegerIndex of the subscription to which you want to add a SIP access trunk
trunkgroup_idintegerIndex of an existing SIP trunk

URL/Query parameters

N/A

Body
ParameterTypeDescriptionRequired?
namestringName of the SIP access trunkyes
trunkingPopIdintegerIndex of the associated trunking popno
weightintegerWeight applicable to this access trunkno
priorityintegerPriority applicable to this access trunkno
primaryPeerIpstringIP address of your PBXno
primaryPeerPortintegerPort of your PBXno
ipWhiteliststringA string giving a list of white listed IP addressesno
authRequiredbooleanFlag indicating if authorization is required for this access trunkno
authUsernamestringUsername used in authorization for this access trunkno
authPasswordstringPassword used in authorization for this access trunkno

Business Rules

If authorization is required, then the primary peer IP is not mandatory. If authorization is not required, then one of those IP addresses is required.

Example

json
{
  "name": "CBUR Access Trunk Test",
  "weight": 10,
  "priority": 2,
  "primaryPeerIP": "10.0.0.1",
  "primaryPeerPort": 5061,
  "ipWhitelist": "192.168.0.1,192.168.1.1",
  "authRequired": true,
  "authUsername": "brice",
  "authPassword": "2nice!"
}

Response

Status codes

ParameterDescription
200SIP access trunk has been added
400Error while processing the request
403The API consumer doesn't have sufficient rights to perform this action
404No SIP trunk found for the specified subscription and tenant
500Uncatched error on server side

Success

Body
ParameterTypeDescriptionConditional?
idintegerIndex of the created SIP access trunkno
Example
json
{
  "id": 12
}

Modify an existing SIP access trunk

Use this endpoint to modify an existing SIP access trunk.

Request

Endpoint

PUT /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/trunkgroups/{trunkgroup_id}/access_trunks/{id}

Authorization

Required role

tenants.instance.subscriptions.instance.trunkgroups.instance.access_trunks.instance.update

Path Parameters

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant to which the subscription belongs
sub_idintegerIndex of the subscription for which you want to modify the existing SIP access trunk
trunkgroup_idintegerIndex of an existing SIP trunk

URL/Query parameters

N/A

Body
ParameterTypeDescriptionRequired?
namestringName of the SIP access trunkno
trunkingPopIdintegerIndex of the associated trunking popno
weightintegerWeight applicable to this access trunkno
priorityintegerPriority applicable to this access trunkno
primaryPeerIpstring or nullIP address of your PBX. Set to null to removeno
primaryPeerPortintegerPort of your PBXno
ipWhiteliststring or nullA string giving a list of white listed IP addresses. Set to null to removeno
authRequiredbooleanFlag indicating if authorization is required for this access trunkno
authUsernamestring or nullUsername used in authorization for this access trunk. Set to null to removeno
authPasswordstring or nullPassword used in authorization for this access trunk. Set to null to removeno

Business Rules

If authorization is required, then the primary peer IP is not mandatory. If authorization is not required, then one of those IP addresses is required. This is checked against new provided data and existing data for coherence.

Example

json
{
  "name": "Modified CBUR Access Trunk Test",
  "weight": 5,
  "priority": 2,
  "primaryPeerIp": "10.1.1.2",
  "ipWhitelist": null,
  "authRequired": false,
  "authUsername": null,
  "authPassword": null
}

Response

Status codes

ParameterDescription
204SIP access trunk has been modified
400Error while processing the request
403The API consumer doesn't have sufficient rights to perform this action
404No SIP trunk found for the specified subscription and tenant
500Uncatched error on server side

Success

Body

N/A

Delete an existing SIP access trunk

Use this endpoint to remove an existing SIP access trunk from an existing SIP trunk.

Request

Endpoint

DELETE /api/v01/draas/{draas_instance}/tenants/{uuid}/subscriptions/{subscription_id}/trunkgroups/{trunkgroup_id}/access_trunks/{id}

Authorization

Required role

tenants.instance.subscriptions.instance.trunkgroups.instance.access_trunks.instance.delete

Path Parameters

ParameterTypeDescription
draas_instancestringSee common parameters
uuidstringA system generated unique ID (UUID) identifying the tenant to which the subscription belongs
sub_idintegerIndex of the subscription for which you want to delete the SIP access trunk
trunkgroup_idintegerIndex of an existing SIP trunk
idintegerIndex of an existing SIP access trunk linked to the SIP trunk

URL/Query parameters

N/A

Body

N/A

Response

Status codes

ParameterDescription
204SIP access trunk has been deleted
400Error while processing the request
403The API consumer doesn't have sufficient rights to perform this action
404No SIP trunk found for the specified subscription and tenant
500Uncatched error on server side

Success

Body

N/A