Rate this page:

PSTNBlacklist

Methods

AddPstnBlackListItem

Copy URL

Add a new phone number to the PSTN blacklist. Use blacklist to block incoming calls from specified phone numbers to numbers purchased from Voximplant. Since we have no control over exact phone number format for calls from SIP integrations, blacklisting such numbers should be done via JavaScript scenarios.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
AddPstnBlackListItem example

AddPstnBlackListItem example

Parameters

  • 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

SetPstnBlackListItem

Copy URL

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.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
SetPstnBlackListItem example

SetPstnBlackListItem example

Parameters

  • 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

DelPstnBlackListItem

Copy URL

Remove phone number from the PSTN blacklist.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
DelPstnBlackListItem example

DelPstnBlackListItem example

Parameters

  • pstn_blacklist_id:

    number

    The PSTN black list item ID

Returns

  • result:

    number

    1

GetPstnBlackList

Copy URL

Get the whole PSTN blacklist.

Available for roles

To call this method, make sure your service account has one of the following roles:

See Available Roles
Owner
Admin
GetPstnBlackList example

GetPstnBlackList example

Parameters

  • pstn_blacklist_id:

    number

    Optional

    The PSTN black list item ID for filter

  • pstn_blacklist_phone:

    string

    Optional

    The phone number in format e164 for filter

  • count:

    number

    Optional
    Defaults on:  20

    The max returning record count

  • offset:

    number

    Optional
    Defaults on:  0

    The first N records are skipped in the output

Returns

  • total_count:

    number

    The total found phone numbers count

  • count:

    number

    The returned phone numbers count