restful_clicktocall.rb
# This method traverses Adhearsion's data structure for active calls and returns
# the proper channel name that Asterisk needs to hangup a call.
This method traverses Adhearsion's data structure for active calls and returns
the proper channel name that Asterisk needs to hangup a call.
This method traverses Adhearsion ' s data structure for active calls and returns the proper channel name that Asterisk needs to hangup a call .
def hangup_channel_with_destination(destination)
    found_call = Adhearsion.active_calls.to_a.find do |call|
      call.variables[:destination].include? destination
    end
    if found_call
      Adhearsion::VoIP::Asterisk.manager_interface.hangup found_call.variables[:channel]
      found_call.variables[:channel]
    else
      nil
    end
  end
def hangup_channel_with_destination ( destination ) found_call = Adhearsion . active_calls . to_a . find do | call | call . variables [ :destination ] . include? destination end if found_call Adhearsion :: VoIP :: Asterisk . manager_interface . hangup found_call . variables [ :channel ] found_call . variables [ :channel ] else nil end end
This method traverses Adhearsion's data structure for active calls and returns
the proper channel name that Asterisk needs to hangup a call.
This method traverses Adhearsion ' s data structure for active calls and returns the proper channel name that Asterisk needs to hangup a call .
destination
<not_specific>