Managing PSTN blacklist
Methods
AddPstnBlackListItem
Add a new phone number to the PSTN blacklist. BlackList works for numbers that are purchased from Voximplant only. Since we have no control over exact phone number format for calls from SIP integrations, blacklisting such numbers should be done via JavaScript scenarios.
Parameters
Follow link for authentication parameter names and details.
pstn_blacklist_phone:
stringThe phone number in format e164 or regex pattern
Returns
result:
number1
pstn_blacklist_id:
numberThe PSTN black list item ID.
Examples
request:
https://api.voximplant.com/platform_api/AddPstnBlackListItem/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&pstn_blacklist_phone=123456789
response:
{
"result": 1,
"pstn_blacklist_id": 1
}
DelPstnBlackListItem
Remove phone number from the PSTN blacklist.
Parameters
Follow link for authentication parameter names and details.
pstn_blacklist_id:
numberThe PSTN black list item ID.
Returns
result:
number1
Examples
request:
https://api.voximplant.com/platform_api/DelPstnBlackListItem/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&pstn_blacklist_id=1
response:
{
"result": 1
}
GetPstnBlackList
Get the whole PSTN blacklist.
Parameters
Follow link for authentication parameter names and details.
- OPTIONAL
pstn_blacklist_id:
numberThe PSTN black list item ID for filter.
- OPTIONAL
pstn_blacklist_phone:
stringThe phone number in format e164 for filter.
- OPTIONALDEFAULTS TO: 20
count:
numberThe max returning record count.
- OPTIONALDEFAULTS TO: 0
offset:
numberThe first N records will be skipped in the output.
Returns
result:
[ PstnBlackListInfoType ]total_count:
numberThe total found phone numbers count.
count:
numberThe returned phone numbers count.
Examples
request:
https://api.voximplant.com/platform_api/GetPstnBlackList/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac
response:
{
"count": 1,
"result": [
{
"pstn_blacklist_id": 1,
"pstn_blacklist_phone": "123456789"
}
],
"total_count": 1
}
SetPstnBlackListItem
Update the PSTN blacklist item. BlackList works for numbers that are purchased from Voximplant only. Since we have no control over exact phone number format for calls from SIP integrations, blacklisting such numbers should be done via JavaScript scenarios.
Parameters
Follow link for authentication parameter names and details.
pstn_blacklist_id:
numberThe PSTN black list item ID.
pstn_blacklist_phone:
stringThe new phone number in format e164.
Returns
result:
number1
Examples
request:
https://api.voximplant.com/platform_api/SetPstnBlackListItem/?account_id=1&api_key=eec36d6c-a0eb-46b5-a006-1c2b65343bac&pstn_blacklist_phone=123456789&pstn_blacklist_id=1
response:
{
"result": 1
}