Code Bites
Use Text-to-speech (TTS) to say a message to the caller (answers the call implicitly):
"play" :
{
"play_list" :
[
{ "text_to_say" : "Hello, good evening and welcome." }
]
}
"play" :
{
"play_list" :
[
{ "file_to_play" : "welcome.wav" }
],
"barge_in_on_digit" : false
}
"record" :
{
"barge_in_digits" : "#*",
"next_page" :
{
"url" : "my_record_handler_page"
}
}
Use Text-to-speech (TTS) to say a message to the caller (answers the call implicitly):
actions.Add(Play.SayText("Hello, good evening and welcome."));
Play playAction = Play.PlayFile("welcome.wav");
playAction.BargeIn = false;
actions.Add(playAction);
Record recordAction = new Record(new WebPageRequest("MyRecordHandlerPage.aspx"));
recordAction.BargeInDigits = "#*";
actions.Add(recordAction);
Use Text-to-speech (TTS) to say a message to the caller (answers the call implicitly):
actions.Add(Play.SayText("Hello, good evening and welcome."))
Dim playAction As Play = Play.PlayFile("welcome.wav")
playAction.BargeIn = False
actions.Add(playAction)
Dim recordAction As Record = New Record(New WebPageRequest("MyRecordHandlerPage.aspx"))
recordAction.BargeInDigits = "#*"
actions.Add(recordAction)
Use Text-to-speech (TTS) to say a message to the caller (answers the call implicitly):
List<TelephonyAction> actions = new ArrayList<TelephonyAction>();
Play playAction = Play.sayText("Hello, good evening and welcome.");
actions.add(playAction);
List<TelephonyAction> actions = new ArrayList<TelephonyAction>();
Play playAction = Play.playFile("welcome.wav");
playAction.setBargeInOnDigit(false);
actions.add(playAction);
List<TelephonyAction> actions = new ArrayList<TelephonyAction>();
Record recordAction = new Record(new WebPageRequest("my_record_handler_page"));
recordAction.setBargeInDigits("#*");
actions.add(recordAction);
Use Text-to-speech (TTS) to say a message to the caller (answers the call implicitly):
play_action = Play(text_to_say='Hello, good evening and welcome.')
my_actions.append(play_action)
play_action = Play(file_to_play='welcome.wav')
play_action.set_barge_in_on_digit(False)
my_actions.append(play_action)
record_action = Record(WebPage(url='my_record_handler_page'))
record_action.set_barge_in_digits("#*")
my_actions.append(record_action)
Use Text-to-speech (TTS) to say a message to the caller (answers the call implicitly):
$response->addAction(\Aculab\TelephonyRestAPI\Play::sayText('Hello, good evening and welcome.'));
$play = new \Aculab\TelephonyRestAPI\Play();
$play->addFile('welcome.wav');
$play->setBargeInOnDigit(false);
$response->addAction($play);
$recAction = new \Aculab\TelephonyRestAPI\Record('my_record_handler_page');
$recAction->setBargeInDigits('#*');
$response->addAction($recAction);