Skip to content

Instantly share code, notes, and snippets.

@krakatoa
Created March 7, 2013 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krakatoa/6fbb0a0d0c8a2925a2e2 to your computer and use it in GitHub Desktop.
Save krakatoa/6fbb0a0d0c8a2925a2e2 to your computer and use it in GitHub Desktop.
Dial issue - controller and dialplan
<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>
# 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