Created
November 8, 2011 18:44
-
-
Save libryder/1348693 to your computer and use it in GitHub Desktop.
Crash asterisk with adhearsion
This file contains 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
#as soon as caller hangs up, asterisk goes down | |
cellphone_ivr { | |
key = input 1, :timeout => 5.seconds, :speak => {:text => "You appear to be calling from the #{@calling_area} area; Press 1 if correct. Press 2 to enter zipcode.", :interruptible => true} | |
if key == "1" | |
speak "One moment please." | |
+route_to_store | |
elsif key == "2" | |
+play_enter_zip_ivr | |
else | |
+cellphone_ivr | |
end | |
} |
This file contains 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
#add recursive limit | |
cellphone_ivr { | |
@tries = @tries + 1 | |
key = input 1, :timeout => 5.seconds, :speak => {:text => "You appear to be calling from the #{@calling_area} area; Press 1 if correct. Press 2 to enter zipcode.", :interruptible => true} | |
if key == "1" | |
speak "One moment please." | |
+route_to_store | |
elsif key == "2" | |
+play_enter_zip_ivr | |
elsif @tries <= 3 | |
+cellphone_ivr | |
else | |
speak "Thanks for trying." | |
hangup | |
end | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment