api:sbc:rule:create
Table of Contents
API : SBC Rule Create
Introduction
This request will create an outbound routing rule.
Request
| URL | https://api.telecomx.dk/sbc/rule | ||
|---|---|---|---|
| Method | GET | ||
| Access level | RESELLER_ADMIN with FINANCE feature, or ADMIN. | ||
| Body | type | String | Type of rule: PREFIX, ANUMBER, CUSTOMER, DKCPS. |
| condition | String | Condition to be met for rule to be applied: PREFIX - Prefix of full E.164 number, e.g. +462 ANUMBER - Callers number in E.164 format, e.g. +4570305050 CUSTOMER - Id of calling customer, e.g. 123457890ABCDEF12345678 DKCPS - CPS code of destination service operator, e.g. 01011 |
|
| peer | String | Id of the peer to send outbound calls to if the rule is matched. | |
| note | String | Note about the rule. | |
Query examples
{
type: 'PREFIX',
condition: '+462',
peer: 'Telenor',
note: 'Least cost routing'
}
Response
The response is a rule object.
| Rule object (JSON) | ||
|---|---|---|
| _id | Id | Id of the rule. |
| type | String | Type of rule: PREFIX, ANUMBER, CUSTOMER, DKCPS. |
| condition | String | Condition to be met for rule to be applied: PREFIX - Prefix of full E.164 number, e.g. +462 ANUMBER - Callers number in E.164 format, e.g. +4570305050 CUSTOMER - Id of calling customer, e.g. 123457890ABCDEF12345678 DKCPS - CPS code of destination service operator, e.g. 01011 |
| peer | String | Id of the peer to send outbound calls to if the rule is matched. |
| note | String | Note about the rule. |
Note that properties holding no value may be omitted from the object.
Response example
{ _id: '123457890ABCDEF12345678', type: 'PREFIX', condition: '+462', peer: 'Telenor', note: 'Least cost routing' }
Errors
| Error code | Message | Description |
|---|---|---|
| 422 | type | Type is invalid |
| 422 | condition | Condition is invalid |
| 422 | peer | Peer is invalid |
| 422 | condition | Prefix is invalid |
| 422 | condition | Customer not found |
| 422 | condition | CPS not found |
| 404 | peer | Peer not found |
| 409 | rule | Rule already exists |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/sbc/rule/create.txt · Last modified: 2023/10/30 21:39 by Per Møller