Skip to content

Instantly share code, notes, and snippets.

View howethomas's full-sized avatar
💭
Currently pairing, sleeping or walking the dogs.

Thomas Howe howethomas

💭
Currently pairing, sleeping or walking the dogs.
View GitHub Profile
# -----------
# connecting the call to another number ()
# -----------
answer
log "Inbound call answered at #{Time.now}"
wait 2000
result = record "Hello. Thanks for calling. Leave your message at the beep.",
{ :beep => true, :timeout => 10, :silenceTimeout => 7, :maxTime => 10 }
if( result.name=='record' )
00000 00-1 6:13:56 PM Application[http://mistermashup.voipmashups.com/call.rb] ver(1.0.100.10) has been created.
00001 00-1 6:13:56 PM DNS found hosted Application[http://mistermashup.voipmashups.com/call.rb] ver(1.0.100.10) for sip:[email protected]:5060
00002 5844 6:13:56 PM # ----------- # line 436
00003 5844 6:13:56 PM # connecting the call to another number () # line 437
00004 5844 6:13:56 PM # ----------- # line 438
00005 5844 6:13:56 PM # line 439
00006 5844 6:13:56 PM answer # line 440
00007 5844 6:13:56 PM # line 441
00008 5844 6:13:56 PM options = { :choices => 'sales( 1, sales), support( 2, support)', # line 442
00009 5844 6:13:56 PM :repeat => 3 } # line 443
# -----------
# connecting the call to another number ()
# -----------
answer
options = { :choices => 'sales( 1, sales), support( 2, support)',
:repeat => 3 }
result = ask 'For sales, just say sales or press 1. For support, say support or press 2.', options