Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Introduction

Use the Twilio is a web service to make a call to a phone and play a recording.

...

  • A Twilio account is required.

  • From your Twilio account console, note Account SIDAuth Token, and Phone number.

    Image RemovedImage Added

Configure Twilio Voice Play within the NETx Core Studio

  • In the Core Studio menu, open Modules > Messenger [Live] Twilio Voice Play.

  • Right-click to open the context menu and select Insert new definition to add a new profile.

  • Fill the following fields:

    • Profile: profile name

    • AccountSidAccount SID as in your Twilio console

    • AuthTokenAuth Token as in your Twilio console

    • SenderPhoneNumer: the Phone number as in your Twilio console

  • Save the definition table. Changes are immediately applied.

...

Use a Twilio Voice Play messenger profile in combination with the MessengerMESSENGER.SendVoicePlaySENDVOICEPLAY XCommand.

Testing

To test the profile from the Core Studio,

  • Go to Tools > Run XCommand.

  • Select XCommand MESSENGER.SENDVOICEPLAY and fill the required fields:

    • Profile: the name of the configured profile (note: if the profile name does not exist or if this parameter is blank, the first found Twilio Voice Play definition will be used)

    • Recipient: recipient phone number

    • Audio URL: a URL the audio file to play

  • Click Execute to send the message.

...

  • Set up an action that uses the MessengerMESSENGER.SendVoicePlaySENDVOICEPLAY XCommand.

  • Select the configured Twilio Voice Play profile and provide Recipient and Message.

  • Save the action.

  • Use this action in the desired alarm or conditional event.

...

To send a voice play within LUA scripts, use the XMessage LUA function.

XMessage is a general LUA function that can be used to send notification and visualization message via LUA. For sending Twilio Voice Play messages, use the following parameter values:

...

The following example uses the Twilio Voice Play messenger profile "your-profile-name" to send a voice play message:

nxa.XMessage("","","TwilioVoicePlay","your-profile-name", "+436641234567", "https://api.twilio.com/cowbell.mp3")