User Tools

Site Tools


api:sbc:rule:list

API : SBC Rules List

Introduction

This request will return a list of all the outbound routing rules that exists.

Request

URL https://api.telecomx.dk/sbc/rule
Method GET
Access level RESELLER_ADMIN, ADMIN.
Query type [optional] Type of rules to return:
PREFIX - Prefix rules e.g. +462
ANUMBER - Callers number in E.164 format
CUSTOMER - Id of calling customer
DKCPS - CPS code of destination service operator

Query examples

https://api.telecomx.dk/sbc/rule
https://api.telecomx.dk/sbc/rule?type=PREFIX

Response

The response is an array of rules.

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: 'SUPERTEL',
    note: null
  },
  {
    _id: '123457890ABCDEF12345679',
    type: 'ANUMBER',
    condition: '+4570305050',
    peer: 'TELENOR2',
    note: 'Custom routing for customer X'
  },
  {
    _id: '123457890ABCDEF1234567A',
    type: 'CUSTOMER',
    condition: '1234567890ABCDEF12345678',
    peer: 'TELENOR',
    note: null
  },
  {
    _id: '123457890ABCDEF1234567B',
    type: 'DKCPS',
    condition: '01011',
    peer: 'TDC',
    note: null
  },
]

Errors

Error code Message Description
403 access_denied Insufficient access level
500 internal_error <Unspecified>
api/sbc/rule/list.txt · Last modified: 2023/10/30 21:39 by Per Møller

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki