eric-adhearsion 0.7.999 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +8 -2
- data/EVENTS +11 -0
- data/Rakefile +96 -24
- data/adhearsion.gemspec +148 -0
- data/app_generators/ahn/ahn_generator.rb +24 -9
- data/app_generators/ahn/templates/.ahnrc +25 -3
- data/app_generators/ahn/templates/Rakefile +22 -2
- data/app_generators/ahn/templates/components/ami_remote/ami_remote.rb +15 -0
- data/app_generators/ahn/templates/components/disabled/HOW_TO_ENABLE +7 -0
- data/app_generators/ahn/templates/components/disabled/stomp_gateway/README.markdown +47 -0
- data/app_generators/ahn/templates/components/disabled/stomp_gateway/config.yml +12 -0
- data/app_generators/ahn/templates/components/disabled/stomp_gateway/stomp_gateway.rb +34 -0
- data/app_generators/ahn/templates/components/simon_game/{lib/simon_game.rb → simon_game.rb} +14 -19
- data/app_generators/ahn/templates/config/startup.rb +3 -6
- data/app_generators/ahn/templates/dialplan.rb +2 -3
- data/app_generators/ahn/templates/events.rb +32 -0
- data/bin/jahn +10 -0
- data/examples/asterisk_manager_interface/standalone.rb +51 -0
- data/lib/adhearsion.rb +17 -11
- data/lib/adhearsion/cli.rb +141 -24
- data/lib/adhearsion/component_manager.rb +169 -238
- data/lib/adhearsion/component_manager/component_tester.rb +55 -0
- data/lib/adhearsion/component_manager/spec_framework.rb +24 -0
- data/lib/adhearsion/events_support.rb +84 -0
- data/lib/adhearsion/{core_extensions → foundation}/all.rb +0 -0
- data/lib/adhearsion/{blank_slate.rb → foundation/blank_slate.rb} +0 -0
- data/lib/adhearsion/{core_extensions → foundation}/custom_daemonizer.rb +0 -0
- data/lib/adhearsion/foundation/event_socket.rb +203 -0
- data/lib/adhearsion/foundation/future_resource.rb +36 -0
- data/lib/adhearsion/{core_extensions → foundation}/global.rb +0 -0
- data/lib/adhearsion/{core_extensions → foundation}/metaprogramming.rb +0 -0
- data/lib/adhearsion/foundation/numeric.rb +13 -0
- data/lib/adhearsion/foundation/pseudo_guid.rb +10 -0
- data/lib/adhearsion/{core_extensions → foundation}/relationship_properties.rb +2 -0
- data/lib/adhearsion/foundation/string.rb +26 -0
- data/lib/adhearsion/foundation/synchronized_hash.rb +96 -0
- data/lib/adhearsion/{core_extensions → foundation}/thread_safety.rb +0 -0
- data/lib/adhearsion/host_definitions.rb +5 -1
- data/lib/adhearsion/initializer.rb +229 -73
- data/lib/adhearsion/initializer/asterisk.rb +33 -11
- data/lib/adhearsion/initializer/configuration.rb +58 -6
- data/lib/adhearsion/initializer/database.rb +3 -46
- data/lib/adhearsion/initializer/drb.rb +9 -3
- data/lib/adhearsion/initializer/freeswitch.rb +3 -3
- data/lib/adhearsion/initializer/rails.rb +1 -1
- data/lib/adhearsion/tasks.rb +2 -1
- data/lib/adhearsion/tasks/deprecations.rb +59 -0
- data/lib/adhearsion/version.rb +3 -3
- data/lib/adhearsion/voip/asterisk.rb +2 -2
- data/lib/adhearsion/voip/asterisk/agi_server.rb +9 -6
- data/lib/adhearsion/voip/asterisk/commands.rb +106 -4
- data/lib/adhearsion/voip/asterisk/manager_interface.rb +562 -0
- data/lib/adhearsion/voip/asterisk/manager_interface/ami_lexer.rb +1754 -0
- data/lib/adhearsion/voip/asterisk/manager_interface/ami_lexer.rl.rb +286 -0
- data/lib/adhearsion/voip/asterisk/manager_interface/ami_messages.rb +78 -0
- data/lib/adhearsion/voip/asterisk/manager_interface/ami_protocol_lexer_machine.rl +87 -0
- data/lib/adhearsion/voip/asterisk/super_manager.rb +19 -0
- data/lib/adhearsion/voip/call.rb +51 -2
- data/lib/adhearsion/voip/dial_plan.rb +74 -61
- data/lib/adhearsion/voip/dsl/dialing_dsl.rb +1 -1
- data/lib/adhearsion/voip/dsl/dialplan/parser.rb +2 -6
- data/lib/adhearsion/voip/dsl/numerical_string.rb +2 -2
- data/lib/adhearsion/voip/freeswitch/oes_server.rb +2 -2
- data/lib/theatre.rb +151 -0
- data/lib/theatre/README.markdown +64 -0
- data/lib/theatre/callback_definition_loader.rb +84 -0
- data/lib/theatre/guid.rb +23 -0
- data/lib/theatre/invocation.rb +121 -0
- data/lib/theatre/namespace_manager.rb +153 -0
- data/lib/theatre/version.rb +2 -0
- metadata +63 -138
- data/Manifest.txt +0 -149
- data/README.txt +0 -6
- data/ahn_generators/component/USAGE +0 -5
- data/ahn_generators/component/component_generator.rb +0 -57
- data/ahn_generators/component/templates/configuration.rb +0 -0
- data/ahn_generators/component/templates/lib/lib.rb.erb +0 -3
- data/ahn_generators/component/templates/test/test.rb.erb +0 -12
- data/ahn_generators/component/templates/test/test_helper.rb +0 -14
- data/app_generators/ahn/templates/components/simon_game/configuration.rb +0 -0
- data/app_generators/ahn/templates/components/simon_game/test/test_helper.rb +0 -14
- data/app_generators/ahn/templates/components/simon_game/test/test_simon_game.rb +0 -31
- data/lib/adhearsion/core_extensions/array.rb +0 -0
- data/lib/adhearsion/core_extensions/guid.rb +0 -5
- data/lib/adhearsion/core_extensions/hash.rb +0 -0
- data/lib/adhearsion/core_extensions/numeric.rb +0 -4
- data/lib/adhearsion/core_extensions/proc.rb +0 -0
- data/lib/adhearsion/core_extensions/pseudo_uuid.rb +0 -11
- data/lib/adhearsion/core_extensions/publishable.rb +0 -73
- data/lib/adhearsion/core_extensions/string.rb +0 -26
- data/lib/adhearsion/core_extensions/thread.rb +0 -13
- data/lib/adhearsion/core_extensions/time.rb +0 -0
- data/lib/adhearsion/distributed/gateways/dbus_gateway.rb +0 -0
- data/lib/adhearsion/distributed/gateways/osa_gateway.rb +0 -0
- data/lib/adhearsion/distributed/gateways/rest_gateway.rb +0 -9
- data/lib/adhearsion/distributed/gateways/soap_gateway.rb +0 -9
- data/lib/adhearsion/distributed/gateways/xmlrpc_gateway.rb +0 -9
- data/lib/adhearsion/distributed/peer_finder.rb +0 -0
- data/lib/adhearsion/distributed/remote_cli.rb +0 -0
- data/lib/adhearsion/hooks.rb +0 -57
- data/lib/adhearsion/initializer/paths.rb +0 -55
- data/lib/adhearsion/services/scheduler.rb +0 -5
- data/lib/adhearsion/voip/asterisk/ami.rb +0 -147
- data/lib/adhearsion/voip/asterisk/ami/actions.rb +0 -238
- data/lib/adhearsion/voip/asterisk/ami/machine.rb +0 -871
- data/lib/adhearsion/voip/asterisk/ami/machine.rl +0 -109
- data/lib/adhearsion/voip/asterisk/ami/parser.rb +0 -262
- data/script/destroy +0 -14
- data/script/generate +0 -14
- data/spec/fixtures/dialplan.rb +0 -3
- data/spec/initializer/test_configuration.rb +0 -267
- data/spec/initializer/test_loading.rb +0 -162
- data/spec/initializer/test_paths.rb +0 -43
- data/spec/silence.rb +0 -10
- data/spec/test_ahn_command.rb +0 -149
- data/spec/test_code_quality.rb +0 -87
- data/spec/test_component_manager.rb +0 -97
- data/spec/test_constants.rb +0 -8
- data/spec/test_drb.rb +0 -104
- data/spec/test_helper.rb +0 -94
- data/spec/test_hooks.rb +0 -37
- data/spec/test_host_definitions.rb +0 -79
- data/spec/test_initialization.rb +0 -105
- data/spec/test_logging.rb +0 -80
- data/spec/test_relationship_properties.rb +0 -54
- data/spec/voip/asterisk/ami_response_definitions.rb +0 -23
- data/spec/voip/asterisk/config_file_generators/test_agents.rb +0 -253
- data/spec/voip/asterisk/config_file_generators/test_queues.rb +0 -325
- data/spec/voip/asterisk/config_file_generators/test_voicemail.rb +0 -306
- data/spec/voip/asterisk/menu_command/test_calculated_match.rb +0 -111
- data/spec/voip/asterisk/menu_command/test_matchers.rb +0 -98
- data/spec/voip/asterisk/mock_ami_server.rb +0 -176
- data/spec/voip/asterisk/test_agi_server.rb +0 -451
- data/spec/voip/asterisk/test_ami.rb +0 -227
- data/spec/voip/asterisk/test_commands.rb +0 -2006
- data/spec/voip/asterisk/test_config_manager.rb +0 -129
- data/spec/voip/dsl/dispatcher_spec_helper.rb +0 -45
- data/spec/voip/dsl/test_dialing_dsl.rb +0 -268
- data/spec/voip/dsl/test_dispatcher.rb +0 -82
- data/spec/voip/dsl/test_parser.rb +0 -87
- data/spec/voip/freeswitch/test_basic_connection_manager.rb +0 -39
- data/spec/voip/freeswitch/test_inbound_connection_manager.rb +0 -39
- data/spec/voip/freeswitch/test_oes_server.rb +0 -9
- data/spec/voip/test_call_routing.rb +0 -127
- data/spec/voip/test_dialplan_manager.rb +0 -372
- data/spec/voip/test_numerical_string.rb +0 -48
- data/spec/voip/test_phone_number.rb +0 -36
- data/test/test_ahn_generator.rb +0 -59
- data/test/test_component_generator.rb +0 -52
- data/test/test_generator_helper.rb +0 -20
@@ -1,238 +0,0 @@
|
|
1
|
-
module Adhearsion
|
2
|
-
module VoIP
|
3
|
-
module Asterisk
|
4
|
-
class AMI
|
5
|
-
module Actions
|
6
|
-
class Action
|
7
|
-
@@subclasses = []
|
8
|
-
@@actions = {}
|
9
|
-
|
10
|
-
attr_accessor :action
|
11
|
-
attr_accessor :action_id
|
12
|
-
|
13
|
-
class << self
|
14
|
-
# Return a new instance of the command. Make sure to return an instance
|
15
|
-
# of the command-specific subclass if it exists.
|
16
|
-
def build(name, hash, &block)
|
17
|
-
name = name.to_s
|
18
|
-
entry = @@subclasses.find { |klass| klass.downcase == name.downcase }
|
19
|
-
klass = entry ? Actions.const_get("#{entry}Action") : self
|
20
|
-
obj = klass.new(name, hash, &block)
|
21
|
-
self[obj.action_id] = obj
|
22
|
-
end
|
23
|
-
|
24
|
-
# Keep a list of the subclasses.
|
25
|
-
def inherited(klass)
|
26
|
-
@@subclasses << klass.to_s.split("::").last.match(/(.*?)Action/)[1]
|
27
|
-
end
|
28
|
-
|
29
|
-
def [](key)
|
30
|
-
@@actions[key]
|
31
|
-
end
|
32
|
-
|
33
|
-
def []=(key, action)
|
34
|
-
@@actions[key] = action
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
def initialize(name, hash, &block)
|
39
|
-
@action = name.downcase
|
40
|
-
@action_id = __action_id
|
41
|
-
@arguments = {}
|
42
|
-
@packets = []
|
43
|
-
@sync_complete = false
|
44
|
-
@error = nil
|
45
|
-
|
46
|
-
# Normalize the keys
|
47
|
-
hash.each_pair { |k,v| @arguments[k.to_s.downcase] = v }
|
48
|
-
|
49
|
-
if block and not async?
|
50
|
-
raise RuntimeError, "Cannot specify completion callback for synchronous command"
|
51
|
-
end
|
52
|
-
@async_completion_callback = block
|
53
|
-
end
|
54
|
-
|
55
|
-
def <<(packet)
|
56
|
-
if packet.error?
|
57
|
-
@error = packet.message
|
58
|
-
complete_sync!
|
59
|
-
end
|
60
|
-
|
61
|
-
# We don't keep every packet, just the important ones.
|
62
|
-
@packets << packet if keep?(packet)
|
63
|
-
|
64
|
-
# Check if the synchronous portion of the action is done.
|
65
|
-
if completed_by?(packet)
|
66
|
-
# The synchronous portion is done.
|
67
|
-
complete_sync!
|
68
|
-
|
69
|
-
# We're totally done if it is not asynchronous.
|
70
|
-
complete! if not async?
|
71
|
-
end
|
72
|
-
|
73
|
-
# Check if this is an asynchronous action, and we have received the last event
|
74
|
-
complete_async! if completed_by_async?(packet)
|
75
|
-
end
|
76
|
-
|
77
|
-
def done?
|
78
|
-
@sync_complete
|
79
|
-
end
|
80
|
-
|
81
|
-
def packets!
|
82
|
-
packets, @packets = @packets, []
|
83
|
-
packets.inject([]) do |arr, pkt|
|
84
|
-
pkt = pkt.body.inject({}) do |hash, (k, v)|
|
85
|
-
hash[k] = v
|
86
|
-
hash
|
87
|
-
end
|
88
|
-
arr << pkt if not pkt.blank?
|
89
|
-
arr
|
90
|
-
end
|
91
|
-
end
|
92
|
-
|
93
|
-
def check_error!
|
94
|
-
raise ActionError, @error if @error
|
95
|
-
end
|
96
|
-
|
97
|
-
# Return true if this is an 'immediate' command, i.e., it returns raw
|
98
|
-
# results synchronously without a response header.
|
99
|
-
# Don't bother doing this in subclasses. It is easy enough.
|
100
|
-
def immediate?
|
101
|
-
%w(iaxpeers queues).include? @action
|
102
|
-
end
|
103
|
-
|
104
|
-
# Return true if this action will return matching events that we will wait on.
|
105
|
-
def waits_for_events?
|
106
|
-
follows? or %w(dbget).include? @action
|
107
|
-
end
|
108
|
-
|
109
|
-
# Return true if this action returns matching events that we will not wait on,
|
110
|
-
# but can access at a later time.
|
111
|
-
def async?
|
112
|
-
false
|
113
|
-
end
|
114
|
-
|
115
|
-
# Actions of the form "Response: <Action> results will follow"
|
116
|
-
def follows?
|
117
|
-
%w(parkedcalls queuestatus agents status sippeers zapshowchannels).include? @action
|
118
|
-
end
|
119
|
-
|
120
|
-
# Virtually all commands return a response. There is at least one
|
121
|
-
# exception, handled with a command-specific subclass.
|
122
|
-
def has_response?
|
123
|
-
true
|
124
|
-
end
|
125
|
-
|
126
|
-
# Return true if this packet completes the command, i.e., there is
|
127
|
-
# no more synchronous response data to receive for this command.
|
128
|
-
def completed_by?(packet)
|
129
|
-
return true if not waits_for_events?
|
130
|
-
return false if not packet.is_event?
|
131
|
-
packet.event.downcase == "#{@action}complete"
|
132
|
-
end
|
133
|
-
|
134
|
-
# Return true if this packet completes the matching asynchronous
|
135
|
-
# events for this command.
|
136
|
-
def completed_by_async?(packet)
|
137
|
-
return false if not async?
|
138
|
-
return false if not packet.is_event?
|
139
|
-
statuses = %w(success failure).collect { |status| "#{@action}#{status}" }
|
140
|
-
statuses.include?(packet.event.downcase)
|
141
|
-
end
|
142
|
-
|
143
|
-
def complete_sync!
|
144
|
-
@sync_complete = true
|
145
|
-
end
|
146
|
-
|
147
|
-
def complete_async!
|
148
|
-
@async_completion_callback.call(self.packets!) if @async_completion_callback
|
149
|
-
complete!
|
150
|
-
end
|
151
|
-
|
152
|
-
def complete!
|
153
|
-
Action[@action_id] = nil
|
154
|
-
end
|
155
|
-
|
156
|
-
# Return true if the packet should be included in the response. Raw and
|
157
|
-
# synchronous responses are kept. Some event responses are rejected.
|
158
|
-
def keep?(packet)
|
159
|
-
return true if not waits_for_events?
|
160
|
-
return false if not packet.is_event?
|
161
|
-
return keep_event?(packet)
|
162
|
-
end
|
163
|
-
|
164
|
-
# By default, we keep any event packet, unless it is the completion
|
165
|
-
# packet for a 'follows' command. These are just marker packets that
|
166
|
-
# signify the end of the event stream for the response.
|
167
|
-
# TODO: They do contain a count of the events generated, which perhaps
|
168
|
-
# we want to verify matches the number we think we have received?
|
169
|
-
def keep_event?(packet)
|
170
|
-
return false if (follows? and completed_by?(packet))
|
171
|
-
true
|
172
|
-
end
|
173
|
-
|
174
|
-
def to_s
|
175
|
-
__args_to_str
|
176
|
-
end
|
177
|
-
|
178
|
-
private
|
179
|
-
|
180
|
-
# Immediate commands do not return response headers, so there is no
|
181
|
-
# chance (or need) to get an action id. We'll make those packets
|
182
|
-
# action ids to be 0 artificially.
|
183
|
-
def __action_id
|
184
|
-
immediate? ? 0 : Time.now.to_f.to_s
|
185
|
-
end
|
186
|
-
|
187
|
-
def __args_to_str
|
188
|
-
action = ""
|
189
|
-
action << "action: #{@action}\r\n"
|
190
|
-
action << "actionid: #{@action_id}\r\n"
|
191
|
-
@arguments.keys.sort { |a,b| a.to_s <=> b.to_s }.each { |k| action << "#{k}: #{@arguments[k]}\r\n" }
|
192
|
-
action << "\r\n"
|
193
|
-
end
|
194
|
-
end
|
195
|
-
|
196
|
-
class OriginateAction < Action
|
197
|
-
# Return true if this action will return events, i.e. it is asynchronous.
|
198
|
-
# This is controlled by the 'Async' argument to the command.
|
199
|
-
def async?
|
200
|
-
@arguments['async'] == true
|
201
|
-
end
|
202
|
-
end
|
203
|
-
|
204
|
-
class DBGetAction < Action
|
205
|
-
# Needed only because this asynchronous response (when the
|
206
|
-
# command succeeds) does not return a response with the
|
207
|
-
# name "DBGetComplete".
|
208
|
-
def completed_by?(packet)
|
209
|
-
return true if not waits_for_events?
|
210
|
-
return false if not packet.is_event?
|
211
|
-
packet.event == "DBGetResponse"
|
212
|
-
end
|
213
|
-
end
|
214
|
-
|
215
|
-
class SIPpeersAction < Action
|
216
|
-
# Sigh. The only reason for this is that the naming
|
217
|
-
# convention differs.
|
218
|
-
def completed_by?(packet)
|
219
|
-
return true if not waits_for_events?
|
220
|
-
return false if not packet.is_event?
|
221
|
-
packet.event == "PeerlistComplete"
|
222
|
-
end
|
223
|
-
end
|
224
|
-
|
225
|
-
class EventsAction < Action
|
226
|
-
# Again, this is a command that is subclassed due to interface
|
227
|
-
# inconsistency. If the command turns on events with the mask
|
228
|
-
# of "On", there is no response. If it is "Off" or set on for
|
229
|
-
# specific events, there is a reponse. Ugly.
|
230
|
-
def has_response?
|
231
|
-
@arguments['eventmask'] !~ /^on$/i
|
232
|
-
end
|
233
|
-
end
|
234
|
-
end
|
235
|
-
end
|
236
|
-
end
|
237
|
-
end
|
238
|
-
end
|
@@ -1,871 +0,0 @@
|
|
1
|
-
# line 1 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
2
|
-
module Adhearsion
|
3
|
-
module VoIP
|
4
|
-
module Asterisk
|
5
|
-
class AMI
|
6
|
-
module Machine
|
7
|
-
# line 76 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
8
|
-
|
9
|
-
|
10
|
-
class << self
|
11
|
-
def extended(base)
|
12
|
-
# Rename the Ragel variables. Not strictly necessary if
|
13
|
-
# we were to make accessors for them.
|
14
|
-
base.instance_eval do
|
15
|
-
|
16
|
-
# line 17 "lib/adhearsion/voip/asterisk/ami/machine.rb"
|
17
|
-
class << self
|
18
|
-
attr_accessor :_ami_actions
|
19
|
-
private :_ami_actions, :_ami_actions=
|
20
|
-
end
|
21
|
-
self._ami_actions = [
|
22
|
-
0, 1, 0, 1, 1, 1, 2, 1,
|
23
|
-
3, 1, 4, 1, 5, 1, 6, 1,
|
24
|
-
7, 1, 8, 1, 9, 1, 10, 1,
|
25
|
-
11, 1, 12, 1, 13, 1, 21, 1,
|
26
|
-
23, 1, 24, 1, 25, 1, 26, 1,
|
27
|
-
27, 1, 28, 1, 29, 1, 30, 1,
|
28
|
-
31, 1, 32, 1, 33, 1, 34, 1,
|
29
|
-
42, 1, 43, 1, 44, 1, 45, 1,
|
30
|
-
46, 1, 47, 1, 48, 1, 49, 2,
|
31
|
-
0, 11, 2, 2, 3, 2, 21, 22,
|
32
|
-
2, 24, 2, 3, 24, 14, 35, 3,
|
33
|
-
24, 15, 36, 3, 24, 16, 37, 3,
|
34
|
-
24, 17, 38, 3, 24, 18, 39, 3,
|
35
|
-
24, 19, 40, 3, 24, 20, 41
|
36
|
-
]
|
37
|
-
|
38
|
-
class << self
|
39
|
-
attr_accessor :_ami_key_offsets
|
40
|
-
private :_ami_key_offsets, :_ami_key_offsets=
|
41
|
-
end
|
42
|
-
self._ami_key_offsets = [
|
43
|
-
0, 0, 1, 2, 4, 5, 6, 7,
|
44
|
-
8, 10, 12, 14, 16, 18, 20, 22,
|
45
|
-
24, 26, 28, 30, 32, 34, 36, 38,
|
46
|
-
40, 42, 44, 46, 48, 50, 52, 54,
|
47
|
-
56, 58, 60, 62, 64, 69, 74, 76,
|
48
|
-
81, 83, 85, 87, 89, 91, 93, 95,
|
49
|
-
97, 99, 104, 107, 109, 111, 113, 114,
|
50
|
-
116, 118, 120, 122, 124, 126, 128, 131,
|
51
|
-
133, 134, 136, 137, 139, 141, 143, 145,
|
52
|
-
147, 149, 150, 152, 154, 156, 158, 159,
|
53
|
-
161, 163, 165, 167, 169, 171, 173, 174,
|
54
|
-
176, 177, 178, 184, 190, 191, 192, 193,
|
55
|
-
195, 196, 197, 199, 201, 203, 205, 207,
|
56
|
-
209, 211, 213, 215, 217, 219, 221, 223,
|
57
|
-
225, 227, 228, 229, 231, 233, 235, 237,
|
58
|
-
239, 241, 243, 245, 247, 249, 251, 252,
|
59
|
-
254, 256, 258, 260, 262, 264, 266, 268,
|
60
|
-
270, 272, 274, 276, 278, 280, 281, 283,
|
61
|
-
285, 289, 290, 291, 292, 293, 294, 295,
|
62
|
-
296, 299, 301, 303, 309, 313, 314, 315
|
63
|
-
]
|
64
|
-
|
65
|
-
class << self
|
66
|
-
attr_accessor :_ami_trans_keys
|
67
|
-
private :_ami_trans_keys, :_ami_trans_keys=
|
68
|
-
end
|
69
|
-
self._ami_trans_keys = [
|
70
|
-
13, 13, 10, 13, 13, 10, 13, 10,
|
71
|
-
10, 13, 13, 115, 13, 116, 13, 101,
|
72
|
-
13, 114, 13, 105, 13, 115, 13, 107,
|
73
|
-
13, 32, 13, 67, 13, 97, 13, 108,
|
74
|
-
13, 108, 13, 32, 13, 77, 13, 97,
|
75
|
-
13, 110, 13, 97, 13, 103, 13, 101,
|
76
|
-
13, 114, 13, 47, 13, 118, 13, 101,
|
77
|
-
13, 110, 13, 116, 13, 58, 13, 32,
|
78
|
-
13, 65, 90, 97, 122, 13, 65, 90,
|
79
|
-
97, 122, 10, 13, 13, 65, 90, 97,
|
80
|
-
122, 13, 101, 13, 115, 13, 112, 13,
|
81
|
-
111, 13, 110, 13, 115, 13, 101, 13,
|
82
|
-
58, 13, 32, 13, 69, 70, 80, 83,
|
83
|
-
13, 114, 118, 13, 114, 13, 111, 13,
|
84
|
-
114, 13, 10, 13, 13, 101, 13, 110,
|
85
|
-
13, 116, 13, 115, 13, 32, 13, 79,
|
86
|
-
13, 102, 110, 13, 102, 13, 10, 13,
|
87
|
-
13, 13, 111, 13, 108, 13, 108, 13,
|
88
|
-
111, 13, 119, 13, 115, 13, 10, 13,
|
89
|
-
13, 111, 13, 110, 13, 103, 13, 10,
|
90
|
-
13, 13, 117, 13, 99, 13, 99, 13,
|
91
|
-
101, 13, 115, 13, 115, 13, 10, 13,
|
92
|
-
10, 10, 45, 58, 65, 90, 97, 122,
|
93
|
-
45, 58, 65, 90, 97, 122, 32, 13,
|
94
|
-
13, 10, 13, 10, 10, 10, 45, 10,
|
95
|
-
69, 10, 78, 10, 68, 10, 32, 10,
|
96
|
-
67, 10, 79, 10, 77, 10, 77, 10,
|
97
|
-
65, 10, 78, 10, 68, 10, 45, 10,
|
98
|
-
45, 10, 13, 10, 10, 10, 99, 10,
|
99
|
-
116, 10, 105, 10, 111, 10, 110, 10,
|
100
|
-
73, 10, 68, 10, 58, 10, 32, 10,
|
101
|
-
13, 10, 13, 13, 10, 13, 10, 13,
|
102
|
-
10, 114, 10, 105, 10, 118, 10, 105,
|
103
|
-
10, 108, 10, 101, 10, 103, 10, 101,
|
104
|
-
10, 58, 10, 32, 10, 13, 10, 13,
|
105
|
-
13, 10, 13, 10, 13, 13, 65, 69,
|
106
|
-
82, 13, 13, 13, 13, 13, 13, 13,
|
107
|
-
13, 33, 126, 33, 126, 33, 126, 13,
|
108
|
-
45, 65, 90, 97, 122, 10, 45, 65,
|
109
|
-
80, 13, 13, 13, 0
|
110
|
-
]
|
111
|
-
|
112
|
-
class << self
|
113
|
-
attr_accessor :_ami_single_lengths
|
114
|
-
private :_ami_single_lengths, :_ami_single_lengths=
|
115
|
-
end
|
116
|
-
self._ami_single_lengths = [
|
117
|
-
0, 1, 1, 2, 1, 1, 1, 1,
|
118
|
-
2, 2, 2, 2, 2, 2, 2, 2,
|
119
|
-
2, 2, 2, 2, 2, 2, 2, 2,
|
120
|
-
2, 2, 2, 2, 2, 2, 2, 2,
|
121
|
-
2, 2, 2, 2, 1, 1, 2, 1,
|
122
|
-
2, 2, 2, 2, 2, 2, 2, 2,
|
123
|
-
2, 5, 3, 2, 2, 2, 1, 2,
|
124
|
-
2, 2, 2, 2, 2, 2, 3, 2,
|
125
|
-
1, 2, 1, 2, 2, 2, 2, 2,
|
126
|
-
2, 1, 2, 2, 2, 2, 1, 2,
|
127
|
-
2, 2, 2, 2, 2, 2, 1, 2,
|
128
|
-
1, 1, 2, 2, 1, 1, 1, 2,
|
129
|
-
1, 1, 2, 2, 2, 2, 2, 2,
|
130
|
-
2, 2, 2, 2, 2, 2, 2, 2,
|
131
|
-
2, 1, 1, 2, 2, 2, 2, 2,
|
132
|
-
2, 2, 2, 2, 2, 2, 1, 2,
|
133
|
-
2, 2, 2, 2, 2, 2, 2, 2,
|
134
|
-
2, 2, 2, 2, 2, 1, 2, 2,
|
135
|
-
4, 1, 1, 1, 1, 1, 1, 1,
|
136
|
-
1, 0, 0, 2, 4, 1, 1, 1
|
137
|
-
]
|
138
|
-
|
139
|
-
class << self
|
140
|
-
attr_accessor :_ami_range_lengths
|
141
|
-
private :_ami_range_lengths, :_ami_range_lengths=
|
142
|
-
end
|
143
|
-
self._ami_range_lengths = [
|
144
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
145
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
146
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
147
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
148
|
-
0, 0, 0, 0, 2, 2, 0, 2,
|
149
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
150
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
151
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
152
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
153
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
154
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
155
|
-
0, 0, 2, 2, 0, 0, 0, 0,
|
156
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
157
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
158
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
159
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
160
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
161
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
162
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
163
|
-
1, 1, 1, 2, 0, 0, 0, 0
|
164
|
-
]
|
165
|
-
|
166
|
-
class << self
|
167
|
-
attr_accessor :_ami_index_offsets
|
168
|
-
private :_ami_index_offsets, :_ami_index_offsets=
|
169
|
-
end
|
170
|
-
self._ami_index_offsets = [
|
171
|
-
0, 0, 2, 4, 7, 9, 11, 13,
|
172
|
-
15, 18, 21, 24, 27, 30, 33, 36,
|
173
|
-
39, 42, 45, 48, 51, 54, 57, 60,
|
174
|
-
63, 66, 69, 72, 75, 78, 81, 84,
|
175
|
-
87, 90, 93, 96, 99, 103, 107, 110,
|
176
|
-
114, 117, 120, 123, 126, 129, 132, 135,
|
177
|
-
138, 141, 147, 151, 154, 157, 160, 162,
|
178
|
-
165, 168, 171, 174, 177, 180, 183, 187,
|
179
|
-
190, 192, 195, 197, 200, 203, 206, 209,
|
180
|
-
212, 215, 217, 220, 223, 226, 229, 231,
|
181
|
-
234, 237, 240, 243, 246, 249, 252, 254,
|
182
|
-
257, 259, 261, 266, 271, 273, 275, 277,
|
183
|
-
280, 282, 284, 287, 290, 293, 296, 299,
|
184
|
-
302, 305, 308, 311, 314, 317, 320, 323,
|
185
|
-
326, 329, 331, 333, 336, 339, 342, 345,
|
186
|
-
348, 351, 354, 357, 360, 363, 366, 368,
|
187
|
-
371, 374, 377, 380, 383, 386, 389, 392,
|
188
|
-
395, 398, 401, 404, 407, 410, 412, 415,
|
189
|
-
418, 423, 425, 427, 429, 431, 433, 435,
|
190
|
-
437, 440, 442, 444, 449, 454, 456, 458
|
191
|
-
]
|
192
|
-
|
193
|
-
class << self
|
194
|
-
attr_accessor :_ami_trans_targs_wi
|
195
|
-
private :_ami_trans_targs_wi, :_ami_trans_targs_wi=
|
196
|
-
end
|
197
|
-
self._ami_trans_targs_wi = [
|
198
|
-
3, 2, 3, 2, 4, 3, 2, 5,
|
199
|
-
144, 6, 144, 7, 144, 144, 144, 0,
|
200
|
-
3, 2, 3, 10, 2, 3, 11, 2,
|
201
|
-
3, 12, 2, 3, 13, 2, 3, 14,
|
202
|
-
2, 3, 15, 2, 3, 16, 2, 3,
|
203
|
-
17, 2, 3, 18, 2, 3, 19, 2,
|
204
|
-
3, 20, 2, 3, 21, 2, 3, 22,
|
205
|
-
2, 3, 23, 2, 3, 24, 2, 3,
|
206
|
-
25, 2, 3, 26, 2, 3, 27, 2,
|
207
|
-
3, 28, 2, 3, 29, 2, 3, 145,
|
208
|
-
2, 3, 31, 2, 3, 32, 2, 3,
|
209
|
-
33, 2, 3, 34, 2, 3, 35, 2,
|
210
|
-
3, 36, 2, 3, 37, 37, 2, 38,
|
211
|
-
39, 39, 2, 146, 3, 2, 38, 39,
|
212
|
-
39, 2, 3, 41, 2, 3, 42, 2,
|
213
|
-
3, 43, 2, 3, 44, 2, 3, 45,
|
214
|
-
2, 3, 46, 2, 3, 47, 2, 3,
|
215
|
-
48, 2, 3, 49, 2, 3, 50, 67,
|
216
|
-
75, 80, 2, 3, 51, 56, 2, 3,
|
217
|
-
52, 2, 3, 53, 2, 3, 54, 2,
|
218
|
-
55, 2, 147, 3, 2, 3, 57, 2,
|
219
|
-
3, 58, 2, 3, 59, 2, 3, 60,
|
220
|
-
2, 3, 61, 2, 3, 62, 2, 3,
|
221
|
-
63, 66, 2, 3, 64, 2, 65, 2,
|
222
|
-
148, 3, 2, 65, 2, 3, 68, 2,
|
223
|
-
3, 69, 2, 3, 70, 2, 3, 71,
|
224
|
-
2, 3, 72, 2, 3, 73, 2, 74,
|
225
|
-
2, 149, 3, 2, 3, 76, 2, 3,
|
226
|
-
77, 2, 3, 78, 2, 79, 2, 150,
|
227
|
-
3, 2, 3, 81, 2, 3, 82, 2,
|
228
|
-
3, 83, 2, 3, 84, 2, 3, 85,
|
229
|
-
2, 3, 86, 2, 87, 2, 151, 3,
|
230
|
-
2, 152, 0, 155, 0, 91, 92, 91,
|
231
|
-
91, 0, 91, 92, 91, 91, 0, 93,
|
232
|
-
0, 95, 94, 95, 94, 155, 95, 94,
|
233
|
-
156, 97, 156, 97, 156, 99, 97, 156,
|
234
|
-
100, 97, 156, 101, 97, 156, 102, 97,
|
235
|
-
156, 103, 97, 156, 104, 97, 156, 105,
|
236
|
-
97, 156, 106, 97, 156, 107, 97, 156,
|
237
|
-
108, 97, 156, 109, 97, 156, 110, 97,
|
238
|
-
156, 111, 97, 156, 112, 97, 156, 113,
|
239
|
-
97, 157, 97, 156, 156, 156, 116, 97,
|
240
|
-
156, 117, 97, 156, 118, 97, 156, 119,
|
241
|
-
97, 156, 120, 97, 156, 121, 97, 156,
|
242
|
-
122, 97, 156, 123, 97, 156, 124, 97,
|
243
|
-
158, 128, 125, 158, 128, 125, 127, 126,
|
244
|
-
156, 127, 126, 156, 128, 125, 156, 130,
|
245
|
-
97, 156, 131, 97, 156, 132, 97, 156,
|
246
|
-
133, 97, 156, 134, 97, 156, 135, 97,
|
247
|
-
156, 136, 97, 156, 137, 97, 156, 138,
|
248
|
-
97, 156, 139, 97, 159, 143, 140, 159,
|
249
|
-
143, 140, 142, 141, 156, 142, 141, 156,
|
250
|
-
143, 140, 8, 9, 30, 40, 1, 3,
|
251
|
-
2, 5, 144, 5, 144, 5, 144, 5,
|
252
|
-
144, 5, 144, 5, 144, 88, 153, 0,
|
253
|
-
154, 152, 154, 152, 89, 90, 90, 90,
|
254
|
-
0, 0, 98, 115, 129, 96, 114, 156,
|
255
|
-
127, 126, 142, 141, 0
|
256
|
-
]
|
257
|
-
|
258
|
-
class << self
|
259
|
-
attr_accessor :_ami_trans_actions_wi
|
260
|
-
private :_ami_trans_actions_wi, :_ami_trans_actions_wi=
|
261
|
-
end
|
262
|
-
self._ami_trans_actions_wi = [
|
263
|
-
0, 0, 0, 0, 0, 0, 0, 27,
|
264
|
-
69, 0, 69, 0, 69, 55, 69, 0,
|
265
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
266
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
267
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
268
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
269
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
270
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
271
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
272
|
-
0, 0, 0, 0, 0, 0, 0, 83,
|
273
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
274
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
275
|
-
0, 0, 0, 0, 9, 9, 0, 11,
|
276
|
-
0, 0, 0, 99, 0, 0, 11, 0,
|
277
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
278
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
279
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
280
|
-
0, 0, 0, 0, 0, 0, 15, 17,
|
281
|
-
13, 13, 0, 0, 0, 0, 0, 0,
|
282
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
283
|
-
0, 0, 95, 0, 0, 0, 0, 0,
|
284
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
285
|
-
0, 0, 0, 0, 0, 13, 0, 0,
|
286
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
287
|
-
103, 0, 0, 0, 0, 0, 0, 0,
|
288
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
289
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
290
|
-
0, 107, 0, 0, 0, 0, 0, 0,
|
291
|
-
0, 0, 0, 0, 0, 0, 0, 91,
|
292
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
293
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
294
|
-
0, 0, 0, 0, 0, 0, 87, 0,
|
295
|
-
0, 35, 0, 41, 0, 0, 3, 0,
|
296
|
-
0, 0, 0, 3, 0, 0, 0, 0,
|
297
|
-
0, 74, 5, 7, 0, 39, 7, 0,
|
298
|
-
47, 0, 47, 0, 47, 0, 0, 47,
|
299
|
-
0, 0, 47, 0, 0, 47, 0, 0,
|
300
|
-
47, 0, 0, 47, 0, 0, 47, 0,
|
301
|
-
0, 47, 0, 0, 47, 0, 0, 47,
|
302
|
-
0, 0, 47, 0, 0, 47, 0, 0,
|
303
|
-
47, 0, 0, 47, 0, 0, 47, 0,
|
304
|
-
0, 33, 0, 49, 53, 47, 0, 0,
|
305
|
-
47, 0, 0, 47, 0, 0, 47, 0,
|
306
|
-
0, 47, 0, 0, 47, 0, 0, 47,
|
307
|
-
0, 0, 47, 3, 0, 47, 0, 0,
|
308
|
-
80, 74, 5, 33, 7, 0, 7, 0,
|
309
|
-
45, 7, 0, 45, 7, 0, 47, 0,
|
310
|
-
0, 47, 0, 0, 47, 0, 0, 47,
|
311
|
-
0, 0, 47, 0, 0, 47, 0, 0,
|
312
|
-
47, 0, 0, 47, 0, 0, 47, 3,
|
313
|
-
0, 47, 0, 0, 80, 74, 5, 33,
|
314
|
-
7, 0, 7, 0, 43, 7, 0, 43,
|
315
|
-
7, 0, 25, 25, 25, 25, 25, 0,
|
316
|
-
0, 27, 63, 27, 61, 27, 65, 27,
|
317
|
-
67, 27, 59, 27, 57, 21, 19, 0,
|
318
|
-
0, 37, 0, 37, 0, 1, 1, 1,
|
319
|
-
0, 0, 23, 71, 71, 23, 0, 51,
|
320
|
-
7, 0, 7, 0, 0
|
321
|
-
]
|
322
|
-
|
323
|
-
class << self
|
324
|
-
attr_accessor :_ami_to_state_actions
|
325
|
-
private :_ami_to_state_actions, :_ami_to_state_actions=
|
326
|
-
end
|
327
|
-
self._ami_to_state_actions = [
|
328
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
329
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
330
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
331
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
332
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
333
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
334
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
335
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
336
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
337
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
338
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
339
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
340
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
341
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
342
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
343
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
344
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
345
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
346
|
-
77, 0, 0, 0, 0, 0, 0, 0,
|
347
|
-
29, 0, 0, 29, 29, 0, 0, 0
|
348
|
-
]
|
349
|
-
|
350
|
-
class << self
|
351
|
-
attr_accessor :_ami_from_state_actions
|
352
|
-
private :_ami_from_state_actions, :_ami_from_state_actions=
|
353
|
-
end
|
354
|
-
self._ami_from_state_actions = [
|
355
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
356
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
357
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
358
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
359
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
360
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
361
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
362
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
363
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
364
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
365
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
366
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
367
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
368
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
369
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
370
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
371
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
372
|
-
0, 0, 0, 0, 0, 0, 0, 0,
|
373
|
-
31, 0, 0, 0, 0, 0, 0, 0,
|
374
|
-
31, 0, 0, 31, 31, 0, 0, 0
|
375
|
-
]
|
376
|
-
|
377
|
-
class << self
|
378
|
-
attr_accessor :ami_start
|
379
|
-
end
|
380
|
-
self.ami_start = 144;
|
381
|
-
class << self
|
382
|
-
attr_accessor :ami_error
|
383
|
-
end
|
384
|
-
self.ami_error = 0;
|
385
|
-
|
386
|
-
class << self
|
387
|
-
attr_accessor :ami_en_prompt
|
388
|
-
end
|
389
|
-
self.ami_en_prompt = 152;
|
390
|
-
class << self
|
391
|
-
attr_accessor :ami_en_response_normal
|
392
|
-
end
|
393
|
-
self.ami_en_response_normal = 155;
|
394
|
-
class << self
|
395
|
-
attr_accessor :ami_en_response_follows
|
396
|
-
end
|
397
|
-
self.ami_en_response_follows = 156;
|
398
|
-
class << self
|
399
|
-
attr_accessor :ami_en_main
|
400
|
-
end
|
401
|
-
self.ami_en_main = 144;
|
402
|
-
|
403
|
-
# line 92 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
404
|
-
|
405
|
-
end
|
406
|
-
end
|
407
|
-
end
|
408
|
-
|
409
|
-
private
|
410
|
-
def ragel_init
|
411
|
-
|
412
|
-
# line 413 "lib/adhearsion/voip/asterisk/ami/machine.rb"
|
413
|
-
begin
|
414
|
-
@__ragel_p ||= 0
|
415
|
-
@__ragel_pe ||= @__ragel_data.length
|
416
|
-
@__ragel_cs = ami_start
|
417
|
-
@__ragel_tokstart = nil
|
418
|
-
@__ragel_tokend = nil
|
419
|
-
@__ragel_act = 0
|
420
|
-
end
|
421
|
-
# line 100 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
422
|
-
end
|
423
|
-
|
424
|
-
def ragel_exec
|
425
|
-
|
426
|
-
# line 427 "lib/adhearsion/voip/asterisk/ami/machine.rb"
|
427
|
-
begin
|
428
|
-
_klen, _trans, _keys, _acts, _nacts = nil
|
429
|
-
if @__ragel_p != @__ragel_pe
|
430
|
-
if @__ragel_cs != 0
|
431
|
-
while true
|
432
|
-
_break_resume = false
|
433
|
-
begin
|
434
|
-
_break_again = false
|
435
|
-
_acts = _ami_from_state_actions[ @__ragel_cs]
|
436
|
-
_nacts = _ami_actions[_acts]
|
437
|
-
_acts += 1
|
438
|
-
while _nacts > 0
|
439
|
-
_nacts -= 1
|
440
|
-
_acts += 1
|
441
|
-
case _ami_actions[_acts - 1]
|
442
|
-
when 23:
|
443
|
-
# line 1 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
444
|
-
begin
|
445
|
-
@__ragel_tokstart = @__ragel_p
|
446
|
-
end
|
447
|
-
# line 1 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
448
|
-
# line 449 "lib/adhearsion/voip/asterisk/ami/machine.rb"
|
449
|
-
end # from state action switch
|
450
|
-
end
|
451
|
-
break if _break_again
|
452
|
-
_keys = _ami_key_offsets[ @__ragel_cs]
|
453
|
-
_trans = _ami_index_offsets[ @__ragel_cs]
|
454
|
-
_klen = _ami_single_lengths[ @__ragel_cs]
|
455
|
-
_break_match = false
|
456
|
-
|
457
|
-
begin
|
458
|
-
if _klen > 0
|
459
|
-
_lower = _keys
|
460
|
-
_upper = _keys + _klen - 1
|
461
|
-
|
462
|
-
loop do
|
463
|
-
break if _upper < _lower
|
464
|
-
_mid = _lower + ( (_upper - _lower) >> 1 )
|
465
|
-
|
466
|
-
if @__ragel_data[ @__ragel_p] < _ami_trans_keys[_mid]
|
467
|
-
_upper = _mid - 1
|
468
|
-
elsif @__ragel_data[ @__ragel_p] > _ami_trans_keys[_mid]
|
469
|
-
_lower = _mid + 1
|
470
|
-
else
|
471
|
-
_trans += (_mid - _keys)
|
472
|
-
_break_match = true
|
473
|
-
break
|
474
|
-
end
|
475
|
-
end # loop
|
476
|
-
break if _break_match
|
477
|
-
_keys += _klen
|
478
|
-
_trans += _klen
|
479
|
-
end
|
480
|
-
_klen = _ami_range_lengths[ @__ragel_cs]
|
481
|
-
if _klen > 0
|
482
|
-
_lower = _keys
|
483
|
-
_upper = _keys + (_klen << 1) - 2
|
484
|
-
loop do
|
485
|
-
break if _upper < _lower
|
486
|
-
_mid = _lower + (((_upper-_lower) >> 1) & ~1)
|
487
|
-
if @__ragel_data[ @__ragel_p] < _ami_trans_keys[_mid]
|
488
|
-
_upper = _mid - 2
|
489
|
-
elsif @__ragel_data[ @__ragel_p] > _ami_trans_keys[_mid+1]
|
490
|
-
_lower = _mid + 2
|
491
|
-
else
|
492
|
-
_trans += ((_mid - _keys) >> 1)
|
493
|
-
_break_match = true
|
494
|
-
break
|
495
|
-
end
|
496
|
-
end # loop
|
497
|
-
break if _break_match
|
498
|
-
_trans += _klen
|
499
|
-
end
|
500
|
-
end while false
|
501
|
-
@__ragel_cs = _ami_trans_targs_wi[_trans]
|
502
|
-
break if _ami_trans_actions_wi[_trans] == 0
|
503
|
-
_acts = _ami_trans_actions_wi[_trans]
|
504
|
-
_nacts = _ami_actions[_acts]
|
505
|
-
_acts += 1
|
506
|
-
while _nacts > 0
|
507
|
-
_nacts -= 1
|
508
|
-
_acts += 1
|
509
|
-
case _ami_actions[_acts - 1]
|
510
|
-
when 0:
|
511
|
-
# line 13 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
512
|
-
begin
|
513
|
-
mark("key") end
|
514
|
-
# line 13 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
515
|
-
when 1:
|
516
|
-
# line 14 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
517
|
-
begin
|
518
|
-
set("key"); end
|
519
|
-
# line 14 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
520
|
-
when 2:
|
521
|
-
# line 15 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
522
|
-
begin
|
523
|
-
mark("value") end
|
524
|
-
# line 15 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
525
|
-
when 3:
|
526
|
-
# line 16 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
527
|
-
begin
|
528
|
-
set("value"); end
|
529
|
-
# line 16 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
530
|
-
when 4:
|
531
|
-
# line 21 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
532
|
-
begin
|
533
|
-
mark("event") end
|
534
|
-
# line 21 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
535
|
-
when 5:
|
536
|
-
# line 22 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
537
|
-
begin
|
538
|
-
set("event"); @current_packet = EventPacket.new(@__ragel_event) end
|
539
|
-
# line 22 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
540
|
-
when 6:
|
541
|
-
# line 25 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
542
|
-
begin
|
543
|
-
@current_packet = Packet.new; end
|
544
|
-
# line 25 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
545
|
-
when 7:
|
546
|
-
# line 26 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
547
|
-
begin
|
548
|
-
@current_packet = ErrorPacket.new; end
|
549
|
-
# line 26 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
550
|
-
when 8:
|
551
|
-
# line 33 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
552
|
-
begin
|
553
|
-
@current_packet = FollowsPacket.new; end
|
554
|
-
# line 33 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
555
|
-
when 9:
|
556
|
-
# line 40 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
557
|
-
begin
|
558
|
-
mark("version"); end
|
559
|
-
# line 40 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
560
|
-
when 10:
|
561
|
-
# line 41 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
562
|
-
begin
|
563
|
-
set("version"); @signal.signal end
|
564
|
-
# line 41 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
565
|
-
when 11:
|
566
|
-
# line 51 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
567
|
-
begin
|
568
|
-
mark_array("raw"); end
|
569
|
-
# line 51 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
570
|
-
when 12:
|
571
|
-
# line 54 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
572
|
-
begin
|
573
|
-
mark_array("raw") end
|
574
|
-
# line 54 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
575
|
-
when 13:
|
576
|
-
# line 54 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
577
|
-
begin
|
578
|
-
insert("raw") end
|
579
|
-
# line 54 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
580
|
-
when 14:
|
581
|
-
# line 65 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
582
|
-
begin
|
583
|
-
begin
|
584
|
-
@__ragel_cs = 152
|
585
|
-
_break_again = true
|
586
|
-
break
|
587
|
-
end
|
588
|
-
end
|
589
|
-
# line 65 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
590
|
-
when 15:
|
591
|
-
# line 66 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
592
|
-
begin
|
593
|
-
begin
|
594
|
-
@__ragel_cs = 155
|
595
|
-
_break_again = true
|
596
|
-
break
|
597
|
-
end
|
598
|
-
end
|
599
|
-
# line 66 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
600
|
-
when 16:
|
601
|
-
# line 67 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
602
|
-
begin
|
603
|
-
begin
|
604
|
-
@__ragel_cs = 155
|
605
|
-
_break_again = true
|
606
|
-
break
|
607
|
-
end
|
608
|
-
end
|
609
|
-
# line 67 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
610
|
-
when 17:
|
611
|
-
# line 68 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
612
|
-
begin
|
613
|
-
begin
|
614
|
-
@__ragel_cs = 155
|
615
|
-
_break_again = true
|
616
|
-
break
|
617
|
-
end
|
618
|
-
end
|
619
|
-
# line 68 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
620
|
-
when 18:
|
621
|
-
# line 69 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
622
|
-
begin
|
623
|
-
begin
|
624
|
-
@__ragel_cs = 155
|
625
|
-
_break_again = true
|
626
|
-
break
|
627
|
-
end
|
628
|
-
end
|
629
|
-
# line 69 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
630
|
-
when 19:
|
631
|
-
# line 70 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
632
|
-
begin
|
633
|
-
begin
|
634
|
-
@__ragel_cs = 155
|
635
|
-
_break_again = true
|
636
|
-
break
|
637
|
-
end
|
638
|
-
end
|
639
|
-
# line 70 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
640
|
-
when 20:
|
641
|
-
# line 71 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
642
|
-
begin
|
643
|
-
begin
|
644
|
-
@__ragel_cs = 156
|
645
|
-
_break_again = true
|
646
|
-
break
|
647
|
-
end
|
648
|
-
end
|
649
|
-
# line 71 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
650
|
-
when 24:
|
651
|
-
# line 1 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
652
|
-
begin
|
653
|
-
@__ragel_tokend = @__ragel_p+1
|
654
|
-
end
|
655
|
-
# line 1 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
656
|
-
when 25:
|
657
|
-
# line 41 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
658
|
-
begin
|
659
|
-
@__ragel_tokend = @__ragel_p+1
|
660
|
-
begin begin
|
661
|
-
@__ragel_cs = 144
|
662
|
-
_break_again = true
|
663
|
-
break
|
664
|
-
end
|
665
|
-
end
|
666
|
-
end
|
667
|
-
# line 41 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
668
|
-
when 26:
|
669
|
-
# line 40 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
670
|
-
begin
|
671
|
-
@__ragel_tokend = @__ragel_p
|
672
|
-
@__ragel_p = @__ragel_p - 1; end
|
673
|
-
# line 40 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
674
|
-
when 27:
|
675
|
-
# line 46 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
676
|
-
begin
|
677
|
-
@__ragel_tokend = @__ragel_p+1
|
678
|
-
begin pair; end
|
679
|
-
end
|
680
|
-
# line 46 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
681
|
-
when 28:
|
682
|
-
# line 47 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
683
|
-
begin
|
684
|
-
@__ragel_tokend = @__ragel_p+1
|
685
|
-
begin packet; begin
|
686
|
-
@__ragel_cs = 144
|
687
|
-
_break_again = true
|
688
|
-
break
|
689
|
-
end
|
690
|
-
end
|
691
|
-
end
|
692
|
-
# line 47 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
693
|
-
when 29:
|
694
|
-
# line 58 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
695
|
-
begin
|
696
|
-
@__ragel_tokend = @__ragel_p+1
|
697
|
-
begin pair; end
|
698
|
-
end
|
699
|
-
# line 58 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
700
|
-
when 30:
|
701
|
-
# line 59 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
702
|
-
begin
|
703
|
-
@__ragel_tokend = @__ragel_p+1
|
704
|
-
begin pair; end
|
705
|
-
end
|
706
|
-
# line 59 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
707
|
-
when 31:
|
708
|
-
# line 60 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
709
|
-
begin
|
710
|
-
@__ragel_tokend = @__ragel_p+1
|
711
|
-
begin insert("raw") end
|
712
|
-
end
|
713
|
-
# line 60 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
714
|
-
when 32:
|
715
|
-
# line 61 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
716
|
-
begin
|
717
|
-
@__ragel_tokend = @__ragel_p+1
|
718
|
-
begin packet; begin
|
719
|
-
@__ragel_cs = 144
|
720
|
-
_break_again = true
|
721
|
-
break
|
722
|
-
end
|
723
|
-
end
|
724
|
-
end
|
725
|
-
# line 61 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
726
|
-
when 33:
|
727
|
-
# line 60 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
728
|
-
begin
|
729
|
-
@__ragel_tokend = @__ragel_p
|
730
|
-
@__ragel_p = @__ragel_p - 1; begin insert("raw") end
|
731
|
-
end
|
732
|
-
# line 60 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
733
|
-
when 34:
|
734
|
-
# line 60 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
735
|
-
begin
|
736
|
-
begin @__ragel_p = (( @__ragel_tokend))-1; end
|
737
|
-
begin insert("raw") end
|
738
|
-
end
|
739
|
-
# line 60 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
740
|
-
when 35:
|
741
|
-
# line 65 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
742
|
-
begin
|
743
|
-
@__ragel_act = 9; end
|
744
|
-
# line 65 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
745
|
-
when 36:
|
746
|
-
# line 66 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
747
|
-
begin
|
748
|
-
@__ragel_act = 10; end
|
749
|
-
# line 66 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
750
|
-
when 37:
|
751
|
-
# line 67 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
752
|
-
begin
|
753
|
-
@__ragel_act = 11; end
|
754
|
-
# line 67 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
755
|
-
when 38:
|
756
|
-
# line 68 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
757
|
-
begin
|
758
|
-
@__ragel_act = 12; end
|
759
|
-
# line 68 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
760
|
-
when 39:
|
761
|
-
# line 69 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
762
|
-
begin
|
763
|
-
@__ragel_act = 13; end
|
764
|
-
# line 69 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
765
|
-
when 40:
|
766
|
-
# line 70 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
767
|
-
begin
|
768
|
-
@__ragel_act = 14; end
|
769
|
-
# line 70 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
770
|
-
when 41:
|
771
|
-
# line 71 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
772
|
-
begin
|
773
|
-
@__ragel_act = 15; end
|
774
|
-
# line 71 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
775
|
-
when 42:
|
776
|
-
# line 74 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
777
|
-
begin
|
778
|
-
@__ragel_tokend = @__ragel_p+1
|
779
|
-
begin @current_packet = ImmediatePacket.new; packet; end
|
780
|
-
end
|
781
|
-
# line 74 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
782
|
-
when 43:
|
783
|
-
# line 66 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
784
|
-
begin
|
785
|
-
@__ragel_tokend = @__ragel_p
|
786
|
-
@__ragel_p = @__ragel_p - 1; end
|
787
|
-
# line 66 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
788
|
-
when 44:
|
789
|
-
# line 67 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
790
|
-
begin
|
791
|
-
@__ragel_tokend = @__ragel_p
|
792
|
-
@__ragel_p = @__ragel_p - 1; end
|
793
|
-
# line 67 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
794
|
-
when 45:
|
795
|
-
# line 68 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
796
|
-
begin
|
797
|
-
@__ragel_tokend = @__ragel_p
|
798
|
-
@__ragel_p = @__ragel_p - 1; end
|
799
|
-
# line 68 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
800
|
-
when 46:
|
801
|
-
# line 69 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
802
|
-
begin
|
803
|
-
@__ragel_tokend = @__ragel_p
|
804
|
-
@__ragel_p = @__ragel_p - 1; end
|
805
|
-
# line 69 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
806
|
-
when 47:
|
807
|
-
# line 70 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
808
|
-
begin
|
809
|
-
@__ragel_tokend = @__ragel_p
|
810
|
-
@__ragel_p = @__ragel_p - 1; end
|
811
|
-
# line 70 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
812
|
-
when 48:
|
813
|
-
# line 71 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
814
|
-
begin
|
815
|
-
@__ragel_tokend = @__ragel_p
|
816
|
-
@__ragel_p = @__ragel_p - 1; end
|
817
|
-
# line 71 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
818
|
-
when 49:
|
819
|
-
# line 1 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
820
|
-
begin
|
821
|
-
case @__ragel_act
|
822
|
-
when 0:
|
823
|
-
begin begin
|
824
|
-
@__ragel_cs = 0
|
825
|
-
_break_again = true
|
826
|
-
break
|
827
|
-
end
|
828
|
-
end
|
829
|
-
end
|
830
|
-
end
|
831
|
-
# line 1 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
832
|
-
# line 833 "lib/adhearsion/voip/asterisk/ami/machine.rb"
|
833
|
-
end # action switch
|
834
|
-
end
|
835
|
-
end while false
|
836
|
-
break if _break_resume
|
837
|
-
_acts = _ami_to_state_actions[ @__ragel_cs]
|
838
|
-
_nacts = _ami_actions[_acts]
|
839
|
-
_acts += 1
|
840
|
-
while _nacts > 0
|
841
|
-
_nacts -= 1
|
842
|
-
_acts += 1
|
843
|
-
case _ami_actions[_acts - 1]
|
844
|
-
when 21
|
845
|
-
# line 1 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
846
|
-
begin
|
847
|
-
@__ragel_tokstart = nil; end
|
848
|
-
# line 1 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
849
|
-
when 22
|
850
|
-
# line 1 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
851
|
-
begin
|
852
|
-
@__ragel_act = 0
|
853
|
-
end
|
854
|
-
# line 1 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
855
|
-
# line 856 "lib/adhearsion/voip/asterisk/ami/machine.rb"
|
856
|
-
end # to state action switch
|
857
|
-
end
|
858
|
-
break if @__ragel_cs == 0
|
859
|
-
@__ragel_p += 1
|
860
|
-
break if @__ragel_p == @__ragel_pe
|
861
|
-
end
|
862
|
-
end
|
863
|
-
end
|
864
|
-
end
|
865
|
-
# line 104 "lib/adhearsion/voip/asterisk/ami/machine.rl"
|
866
|
-
end
|
867
|
-
end
|
868
|
-
end
|
869
|
-
end
|
870
|
-
end
|
871
|
-
end
|