From Bright Pattern Documentation
Jump to: navigation, search
• 5.19 • 5.2 • 5.3 • 5.8

Create Trunk

This method creates a trunk with the name <trunk_name> and appropriate registration data. Carrier, registration, and prefixes parameters are optional. If registration data exists in the request, outgoing registration to the carrier will be configured. Otherwise, static registration will be used.


Request Body

URL http[s]://<host>:<port>/configapi/v2/selfservice/trunk/<trunk_name>
Method POST
Content Type Application/JSON
Body
{
   "domain":"sip.external.net",
   "carrier":"the best provider",
   "registration":{
        "number":"123456789",
        "user":"user_name",
        "password":"top_secret"
    },
   "prefixes": [
       {
         "prefix":"*",
         "cost":9
       },
       {
         "prefix":"8",
         "cost":0
       }
    ]
} 


Response

Code Description
200 Success
400 Bad arguments
403 Access denied
500 Server error



< Previous | Next >
< Previous | Next >