SIGN UP

Managing PSTN blacklist

Methods

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:

    string

    The phone number in format e164 or regex pattern

Returns

  • result:

    number

    1

  • pstn_blacklist_id:

    number

    The 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
}

Remove phone number from the PSTN blacklist.

Parameters

  • Follow link for authentication parameter names and details.

  • pstn_blacklist_id:

    number

    The PSTN black list item ID.

Returns

  • result:

    number

    1

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
}

Get the whole PSTN blacklist.

Parameters

  • Follow link for authentication parameter names and details.

  • pstn_blacklist_id:

    number

    The PSTN black list item ID for filter.

  • pstn_blacklist_phone:

    string

    The phone number in format e164 for filter.

  • count:

    numberDefaults to 20

    The max returning record count.

  • offset:

    numberDefaults to 0

    The first N records will be skipped in the output.

Returns

  • total_count:

    number

    The total found phone numbers count.

  • count:

    number

    The 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
}

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:

    number

    The PSTN black list item ID.

  • pstn_blacklist_phone:

    string

    The new phone number in format e164.

Returns

  • result:

    number

    1

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
}