Module: Adhearsion::IMS::CallControllerMethods
- Defined in:
- lib/adhearsion-ims/controller_methods.rb
Instance Method Summary collapse
-
#generate_ims_options(type, options = {}) ⇒ String, Hash
Creates an IMS dial string as a B2BUA or an Out of the Blue.
-
#generate_isc_headers(type) ⇒ Hash
Creates the headers required for IMS B2BUA or Out of the Blue dialing.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method) ⇒ Object (private)
Used to create a convenience method for filtering out the to/from in a call header
148 |
# File 'lib/adhearsion-ims/controller_methods.rb', line 148 def method_missing(method); extract_user_from variables[method]; end |
Instance Method Details
#initialize(params) ⇒ String, Hash #ims_dial_string(params, &block) ⇒ String, Hash
Creates an IMS dial string as a B2BUA or an Out of the Blue
16 17 18 19 20 21 22 23 |
# File 'lib/adhearsion-ims/controller_methods.rb', line 16 def (type, ={}) type, return { :sip_uri => build_to(), :options => { :from => build_from(), :headers => generate_isc_headers(type) } } end |
#generate_isc_headers(type) ⇒ Hash
Creates the headers required for IMS B2BUA or Out of the Blue dialing
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/adhearsion-ims/controller_methods.rb', line 30 def generate_isc_headers(type) headers={} case type when :b2bua headers[:route] = process_b2bua_route_headers(call.variables[:route]) headers.merge! call.variables.select { |k,v| k =~ /^P/i } when :out_of_the_blue if Adhearsion::IMS::Plugin.config[:sbc_address] headers[:route] = config[:sbc_address] + delimitter + config[:cscf_address] else headers[:route] = config[:cscf_address] end headers[:p_charging_vector] = "icid-value=#{uuid};orig-ioi=#{config[:originating_ims_identity]}" end headers end |