The Asterisk Call Notifier gem now features on_new_call

require 'asterisk_call_notifier'

acn = AsteriskCallNotifier.new()

def acn.on_new_call(h)
  puts "extension %s called %s at %s" % [h[:src], h[:dst], h[:start]]
end

acn.start

The on_new_call method can now be implemented by the client, allowing them to use their on notifier as well as to control whether a notification needs to be sent and in what format.

output:

extension c7905 called 1011 at 2015-10-03 12:40:12

Resources