class Adhearsion::PunchblockPlugin
Public Class Methods
default_port_for_platform(platform)
click to toggle source
# File lib/adhearsion/punchblock_plugin.rb, line 46 def default_port_for_platform(platform) case platform when :freeswitch then 8021 when :asterisk then 5038 when :xmpp then 5222 else nil end end
execute_component(command, timeout = 60)
click to toggle source
# File lib/adhearsion/punchblock_plugin.rb, line 55 def execute_component(command, timeout = 60) client.execute_command command, :async => true response = command.response timeout raise response if response.is_a? Exception command end
validate_number(value)
click to toggle source
# File lib/adhearsion/punchblock_plugin.rb, line 41 def validate_number(value) return 1.0/0.0 if ["Infinity", 1.0/0.0].include? value value.to_i end