Add Destination Priority
Add a voice destination (VoIP gateway or PSTN number) at priority 1–3 for a phone number.
Overview
This method lets you add a voice destination priority for a phone number.
Authentication
Method
Add a destination priority associated with a phone number.
POST https://api-service.tsgglobal.world/v1/did/priority
Request Body
did*
String
The phone number (e.g. 12022011234)
priority*
String
1-3 in order of preferred priority.
destination*
String
192.168.1.1 (for VOIP), 16352321233 (for PSTN)
call_type*
String
VOIP, PSTN
call_option
String
WP, NP
For VOIP Call Type you need to enter just the IP Address of the Gateway and we will format the rest of the destination. For PSTN Call Type you need to just enter the PSTN Destination in E.164 format, with or without the leading plus.
call_type must be exactly one of VOIP (VoIP destination) or PSTN (PSTN destination). This value is case sensitive.
call_option: NP = DID sent to the gateway without a plus, WP = DID sent to the gateway with a plus. This value is case sensitive.
Example POST (PSTN)
Example POST (VOIP)
Error Codes
-1000Invalid or Blank API Key-1001Invalid or Blank Call Option-1003Invalid or No DID Provided-1004Invalid or No Priority Provided-1005Invalid or No Destination Provided-1006Invalid or No Call Type Provided-1007Priority Already Exists Use Another Priority-1008-VPriority Added to Database as VoIP Destination-1008-PPriority Added to Database as PSTN Destination-1010Unknown Error Please Contact TSG Support with URL String for Review
Last updated
Was this helpful?