This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| say "Hi, this is a sample call from Globe Labs! Goodbye!" | |
| hangup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ask "please choose from blue,yellow or green", { | |
| :choices => "blue,yellow,green", | |
| :recognizer => "en-PH", | |
| :timeout => 20, | |
| :bargein => false, | |
| :mode => "speech", | |
| :onChoice => lambda { |event| @answer = event.value}, | |
| :onBadChoice => lambda { |event| say "Sorry, we did not recognized your speech"}, | |
| :onTimeout => lambda { |event| say "Sorry, we did not receive your input"}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def say_as(value,type) | |
| ssml_start="<?xml version='1.0'?><speak>" | |
| ssml_end="</say-as></speak>" | |
| ssml ="<say-as interpret-as='vxml:#{type}'>#{value}" | |
| complete_string = ssml_start + ssml + ssml_end | |
| say complete_string | |
| end | |
| wait(1500) | |
| say "Hi! how may we help you today?" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| call $caller, {:callerID => 'sip:917111@sip.tropo.net'} | |
| wait(1500) | |
| say "This is a D T M F test" | |
| ask "Please press a number between 1 and 4. Press pound when finished", { | |
| :choices => "1,2,3,4", | |
| :terminator => '#', | |
| :timeout => 15.0, | |
| :mode => "dtmf", | |
| :interdigitTimeout => 5 , | |
| :onChoice => lambda { |event| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| say "starting duration call" | |
| wait(3600000) | |
| say "Thank you and goodbye" | |
| hangup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1.upto(1000) do |x| | |
| say "hello there agent number " + x.to_s | |
| end | |
| hangup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| call $caller, {:callerID => 'sip:917111@sip.tropo.net'} | |
| say "starting 15 minute test" | |
| wait(900000) | |
| say "Thank you and goodbye" | |
| hangup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| call $caller, {:callerID => 'sip:917111@sip.tropo.net'} | |
| say "starting 1 minute test" | |
| wait(60000) | |
| say "Thank you and goodbye" | |
| hangup |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| call $caller, {:callerID => 'sip:917111@sip.tropo.net'} | |
| wait(1500) | |
| say "Please wait while we transfer your call. Press star to cancel the transfer." | |
| transfer ["sip:9175744034@sip.tropo.net"], { | |
| :callerID => 'sip:917111@sip.tropo.net', | |
| :playvalue => "http://www.phono.com/audio/holdmusic.mp3", | |
| :terminator => "*", | |
| :onTimeout => lambda { |event| | |
| say "Sorry, but nobody answered"} | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| call $caller, {:callerID => 'sip:917111@sip.tropo.net'} | |
| wait(1500) | |
| say "Please wait while we transfer your call. Press star to cancel the transfer." | |
| transfer ["9175744034"], { | |
| :callerID => 'sip:917111@sip.tropo.net', | |
| :playvalue => "http://www.phono.com/audio/holdmusic.mp3", | |
| :terminator => "*", | |
| :onTimeout => lambda { |event| | |
| say "Sorry, but nobody answered"} | |
| } |