#56 ✓resolved
Jayson Vaughn

hungup_call event in events.rb is not working.

Reported by Jayson Vaughn | January 26th, 2009 @ 05:54 PM

I use hangup events with adhearsion and I had to modify the newest version (0.8 from github) to get the event to work. There were a few changes I had to do:

  1. When you create a new app (ahn create) the default events.rb says to use events.asterisk.call_hangup. However if you use call_hangup you get the follow error: "Could not find "/asterisk/call_hangup" in the namespace registry. Did you register it yet? (Theatre::NamespaceNotFound)"
  2. "lib/adhearsion/events_support.rb" line 32 the namespace is defined as /asterisk/hungup_call

    • The other events are labeled ' before_call', 'after_call' and so on; I figured hungup_call is what jicksta wants and the events.rb is just old or hasn't been updated to reflect the change.
  3. If you use the following example, using hungup_call, it will start the app but won't actually do what you tell it to do.

    events.asterisk.hungup_call.each do |call| ahn_log "#{Time.now} Hung up call" end

  4. I changed Changed to Events.trigger [:asterisk, :hungup_call], hungup_call.call in /lib/adhearsion/voip/asterisk/agi_server.rb

  5. Changed the templates to reflect events.asterisk.hungup_call
  6. Changed the spec tests to match

Now events.asterisk.hungup_call works perfect for me.
I went ahead and forked adhearsion on github and pushed the changes necessary to make it work. Please apply upstream so I can use upstream adhearsion :)

The github link is http://github.com/thedonvaughn/a...

Thanks for your time and keep up the good work!

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket

Pages