Sha256: c31f520c2ed5a052adcad4a1411e9d1177b562b85166cd917a64c7676b5f3172
Contents?: true
Size: 601 Bytes
Versions: 9
Compression:
Stored size: 601 Bytes
Contents
#!/usr/bin/env ruby require File.join(File.dirname(__FILE__), "..", 'lib', 'fsr') require "fsr/listener/outbound" $stdout.flush class InboundCallerId < FSR::Listener::Outbound def session_initiated caller_number = @session.headers[:caller_caller_id_number] FSR::Log.info "*** Answering incoming call from #{exten}" answer do # Lookup number in the database caller_name = Ldap.find(telephoneNumber: caller_number).givenName set(caller_caller_id_name: caller_name) { continue } end end end FSR.start_oes! InboundCallerId, :port => 8084, :host => "127.0.0.1"
Version data entries
9 entries across 9 versions & 1 rubygems