-
-
Save krakatoa/6fbb0a0d0c8a2925a2e2 to your computer and use it in GitHub Desktop.
Dial issue - controller and dialplan
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
<extension name="adhearsion"> | |
<condition> | |
<action application="set" data="hangup_after_bridge=false"/> | |
<action application="set" data="park_after_bridge=true"/> | |
<action application="park" /> | |
</condition> | |
</extension> |
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
# encoding: utf-8 | |
class IvrController < Adhearsion::CallController | |
def run | |
AudioService.establish_connection(Adhearsion.config.platform.root, Adhearsion.config.platform.environment.to_s) | |
answer | |
destinations = ["sofia/gateway/re_engine_out/1001"] | |
status = dial destinations | |
case status.result | |
when :answer | |
play *AudioService.urls_for([1]) | |
when :no_answer | |
play *AudioService.urls_for([2]) | |
when :error, :timeout | |
play *AudioService.urls_for([3]) | |
end | |
play *AudioService.urls_for([3]) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment