Create an inbound trunk matched by the called number
POST/v1/trunks/by-called-number
Inbound calls whose called number starts with prefix and is min_digits..max_digits long land on this trunk. prefix must be one of GET /v1/trunks/available-prefixes; an unavailable one returns 422. name is required. Without host the PBX uses the Netgsm SIP server and fills permit itself, as it does whenever the host is the Netgsm SIP server; any other host requires permit. port defaults to 5060. Without secret a strong random one is generated and returned once. type is not accepted: it is netgsm for Netgsm hosts and custom otherwise. Creating a trunk is capped by the number of phone line packages the organization owns; every existing trunk except fct ones counts against it (fctmvno counts). No phone line package returns 403 (also when the package check cannot be completed); a full quota returns 422, and a second create running for the same organization returns 429 after waiting up to 5 seconds. A 429 is also returned when the PBX trunk limit for the organization is reached. Requires api_user|trunk_create.
Request
Responses
- 201
- 401
- 403
- 409
- 422
- 429
- 503
Created
Unauthenticated
Missing permission, or no phone line package owned
The trunk name is already taken
Validation error, unavailable prefix, or phone line quota exceeded
Rate limit exceeded, another create in progress, or the PBX trunk limit for the organization reached
The PBX is unreachable, or no PBX tenant is assigned to the organization