Last active
January 25, 2017 15:42
-
-
Save radralph/a5b06c30d64682447345 to your computer and use it in GitHub Desktop.
trying out the tropo conference
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 "sip:21581077@sip.tropo.net", { :callerID => 'sip:21581077@sip.tropo.net'} | |
| #call "sip:21581077@sip.tropo.net" | |
| #call "9175744034" | |
| say "hello there" | |
| command = Thread.new do | |
| my_sesh = $currentCall.sessionId | |
| Kernel.system "curl -k 'ip.sessions?action=create&token=534472466c5255447961417779474a59676e46795876564b6e4a4341644a53507a6a7a46504e72726c697665'" | |
| end | |
| command.join | |
| say "Joining conference" | |
| conference "1137", { | |
| :conferenceId => "1137", | |
| :terminator => "*", | |
| :playTones => true, | |
| :onChoice => lambda { |event| | |
| say("Disconnecting")}, | |
| :allowSignals => "exit", | |
| :onSignal => "exit applcation"} | |
| # command = Thread.new do | |
| # wait(10000) | |
| # my_sesh = $currentCall.sessionId | |
| # Kernel.system "curl -k 'https://54.251.177.176/sessions/#{my_sesh}/signals?action=signal&value=test'" | |
| # end | |
| #command2 = Thread.new do | |
| # log $currentCall.sessionId + "-------------" | |
| # say "joining conference" | |
| # conference "1137", { | |
| # :conferenceId => "1137", | |
| # :allowSignals => "exit", | |
| # :onSignal => lambda { |event| | |
| # say "what...what...what...what"} | |
| # } | |
| #end | |
| #say "what...what...what...what" | |
| #call $caller, { :callerID => 'sip:21581077@sip.tropo.net'} | |
| # say "Joining conference" | |
| # conference "1137", { | |
| # :conferenceId => "1137", | |
| # :terminator => "*", | |
| # :playTones => true, | |
| # :onChoice => lambda { |event| | |
| # say("Disconnecting") | |
| # }} | |
| # log $currentCall.sessionId + "-------------" | |
| # log "=====================" | |
| # say "We hope you had fun, call back soon!" | |
| # say "Welcome to the conference!" | |
| # sessionid = $currentCall.sessionId | |
| # log "The Session ID is " + sessionid + "------------" | |
| # conference "1337", { | |
| # :playTones => true, | |
| # :allowSignals => "exit"} | |
| # log $currentCall.sessionId + "-------------" | |
| # log "=====================" | |
| # say "We hope you had fun, call back soon!" | |
| # sessionid = $currentCall.sessionId | |
| # log "The Session ID is " + sessionid + "------------" | |
| # say "http://www.phono.com/audio/holdmusic.mp3", { | |
| # :allowSignals => "exit"} | |
| # say "You are now off hold." | |
| # result = ask "enter a number to call", { | |
| # :choices => "[11 DIGITS]", | |
| # :timeout => 10.0, | |
| # :attempts => 3, | |
| # :terminator => '#' | |
| # } | |
| # say "answer is " + result.value | |
| # conference "1337", { | |
| # :playTones => true, | |
| # :allowSignals => "exit"} | |
| # log $currentCall.sessionId + "-------------" | |
| # log "=====================" | |
| # say "You are done son!" | |
| # say "Hi" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment