system.twilio.getPhoneNumbersDataset
This function is used in Python Scripting.
Description
Returns a list of outgoing phone numbers for a Twilio account as a single-column Dataset. Note that these numbers are supplied by Twilio, and are not defined on a user in Ignition.
Client Permission Restrictions
This scripting function has no Client Permission restrictions.
Syntax
system.twilio.getPhoneNumbersDataset(accountName)
Parameters
Type | Parameter | Description |
---|---|---|
String | accountName | The Twilio account to retrieve phone numbers for. |
Returns
Dataset - A list of phone numbers for the given Twilio account as a single-column Dataset.
Scope
All
Code Examples
Example #1
# Retrieves a list of phone numbers associated with a twilio account and then passes the resulting list to a Table component's Data property.
# Checks against a Twilio Profile configured on the gateway by the name of "Twilio Account"
# Call system.twilio.getPhoneNumbers() and store the returned list into a variable
twilioNumbers = system.twilio.getPhoneNumbersDataset("Twilio Account")
# Pass the dataset to a Table component. The Table is located in the same container as the
# component calling this script
event.source.parent.getComponent('Table').data = twilioNumbers