Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Launch the individual phone calls
- def launch_call(treatment_strategy)
- channel = COMPONENTS.hammer[:dial_strategies][treatment_strategy[:dial]][:channel] + treatment_strategy[:number].to_s
- options = { "Channel" => channel,
- "Context" => COMPONENTS.hammer[:dial_strategies][treatment_strategy[:dial]][:context],
- "Exten" => COMPONENTS.hammer[:dial_strategies][treatment_strategy[:dial]][:extension],
- "Priority" => COMPONENTS.hammer[:dial_strategies][treatment_strategy[:dial]][:priority],
- "Callerid" => treatment_strategy[:callerid],
- "Timeout" => COMPONENTS.hammer[:dial_strategies][treatment_strategy[:dial]][:timeout],
- "Variable" => "strategy_name=" + treatment_strategy[:name],
- "Async" => COMPONENTS.hammer[:dial_strategies][treatment_strategy[:dial]][:async] }
- result = Adhearsion::VoIP::Asterisk.manager_interface.originate options
- return result
- end
Add Comment
Please, Sign In to add comment