eric-adhearsion 0.7.999

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. data/CHANGELOG +3 -0
  2. data/LICENSE +456 -0
  3. data/Manifest.txt +149 -0
  4. data/README.txt +6 -0
  5. data/Rakefile +48 -0
  6. data/ahn_generators/component/USAGE +5 -0
  7. data/ahn_generators/component/component_generator.rb +57 -0
  8. data/ahn_generators/component/templates/configuration.rb +0 -0
  9. data/ahn_generators/component/templates/lib/lib.rb.erb +3 -0
  10. data/ahn_generators/component/templates/test/test.rb.erb +12 -0
  11. data/ahn_generators/component/templates/test/test_helper.rb +14 -0
  12. data/app_generators/ahn/USAGE +5 -0
  13. data/app_generators/ahn/ahn_generator.rb +76 -0
  14. data/app_generators/ahn/templates/.ahnrc +12 -0
  15. data/app_generators/ahn/templates/README +8 -0
  16. data/app_generators/ahn/templates/Rakefile +3 -0
  17. data/app_generators/ahn/templates/components/simon_game/configuration.rb +0 -0
  18. data/app_generators/ahn/templates/components/simon_game/lib/simon_game.rb +61 -0
  19. data/app_generators/ahn/templates/components/simon_game/test/test_helper.rb +14 -0
  20. data/app_generators/ahn/templates/components/simon_game/test/test_simon_game.rb +31 -0
  21. data/app_generators/ahn/templates/config/startup.rb +53 -0
  22. data/app_generators/ahn/templates/dialplan.rb +4 -0
  23. data/bin/ahn +28 -0
  24. data/bin/ahnctl +68 -0
  25. data/bin/jahn +32 -0
  26. data/lib/adhearsion/blank_slate.rb +5 -0
  27. data/lib/adhearsion/cli.rb +106 -0
  28. data/lib/adhearsion/component_manager.rb +277 -0
  29. data/lib/adhearsion/core_extensions/all.rb +9 -0
  30. data/lib/adhearsion/core_extensions/array.rb +0 -0
  31. data/lib/adhearsion/core_extensions/custom_daemonizer.rb +45 -0
  32. data/lib/adhearsion/core_extensions/global.rb +1 -0
  33. data/lib/adhearsion/core_extensions/guid.rb +5 -0
  34. data/lib/adhearsion/core_extensions/hash.rb +0 -0
  35. data/lib/adhearsion/core_extensions/metaprogramming.rb +17 -0
  36. data/lib/adhearsion/core_extensions/numeric.rb +4 -0
  37. data/lib/adhearsion/core_extensions/proc.rb +0 -0
  38. data/lib/adhearsion/core_extensions/pseudo_uuid.rb +11 -0
  39. data/lib/adhearsion/core_extensions/publishable.rb +73 -0
  40. data/lib/adhearsion/core_extensions/relationship_properties.rb +40 -0
  41. data/lib/adhearsion/core_extensions/string.rb +26 -0
  42. data/lib/adhearsion/core_extensions/thread.rb +13 -0
  43. data/lib/adhearsion/core_extensions/thread_safety.rb +7 -0
  44. data/lib/adhearsion/core_extensions/time.rb +0 -0
  45. data/lib/adhearsion/distributed/gateways/dbus_gateway.rb +0 -0
  46. data/lib/adhearsion/distributed/gateways/osa_gateway.rb +0 -0
  47. data/lib/adhearsion/distributed/gateways/rest_gateway.rb +9 -0
  48. data/lib/adhearsion/distributed/gateways/soap_gateway.rb +9 -0
  49. data/lib/adhearsion/distributed/gateways/xmlrpc_gateway.rb +9 -0
  50. data/lib/adhearsion/distributed/peer_finder.rb +0 -0
  51. data/lib/adhearsion/distributed/remote_cli.rb +0 -0
  52. data/lib/adhearsion/hooks.rb +57 -0
  53. data/lib/adhearsion/host_definitions.rb +63 -0
  54. data/lib/adhearsion/initializer/asterisk.rb +59 -0
  55. data/lib/adhearsion/initializer/configuration.rb +202 -0
  56. data/lib/adhearsion/initializer/database.rb +92 -0
  57. data/lib/adhearsion/initializer/drb.rb +25 -0
  58. data/lib/adhearsion/initializer/freeswitch.rb +22 -0
  59. data/lib/adhearsion/initializer/paths.rb +55 -0
  60. data/lib/adhearsion/initializer/rails.rb +40 -0
  61. data/lib/adhearsion/initializer.rb +217 -0
  62. data/lib/adhearsion/logging.rb +92 -0
  63. data/lib/adhearsion/services/scheduler.rb +5 -0
  64. data/lib/adhearsion/tasks/database.rb +5 -0
  65. data/lib/adhearsion/tasks/generating.rb +20 -0
  66. data/lib/adhearsion/tasks/lint.rb +4 -0
  67. data/lib/adhearsion/tasks/testing.rb +37 -0
  68. data/lib/adhearsion/tasks.rb +15 -0
  69. data/lib/adhearsion/version.rb +9 -0
  70. data/lib/adhearsion/voip/asterisk/agi_server.rb +78 -0
  71. data/lib/adhearsion/voip/asterisk/ami/actions.rb +238 -0
  72. data/lib/adhearsion/voip/asterisk/ami/machine.rb +871 -0
  73. data/lib/adhearsion/voip/asterisk/ami/machine.rl +109 -0
  74. data/lib/adhearsion/voip/asterisk/ami/parser.rb +262 -0
  75. data/lib/adhearsion/voip/asterisk/ami.rb +147 -0
  76. data/lib/adhearsion/voip/asterisk/commands.rb +1182 -0
  77. data/lib/adhearsion/voip/asterisk/config_generators/agents.conf.rb +140 -0
  78. data/lib/adhearsion/voip/asterisk/config_generators/config_generator.rb +101 -0
  79. data/lib/adhearsion/voip/asterisk/config_generators/queues.conf.rb +250 -0
  80. data/lib/adhearsion/voip/asterisk/config_generators/voicemail.conf.rb +240 -0
  81. data/lib/adhearsion/voip/asterisk/config_manager.rb +71 -0
  82. data/lib/adhearsion/voip/asterisk/special_dial_plan_managers.rb +80 -0
  83. data/lib/adhearsion/voip/asterisk.rb +4 -0
  84. data/lib/adhearsion/voip/call.rb +391 -0
  85. data/lib/adhearsion/voip/call_routing.rb +64 -0
  86. data/lib/adhearsion/voip/commands.rb +9 -0
  87. data/lib/adhearsion/voip/constants.rb +39 -0
  88. data/lib/adhearsion/voip/conveniences.rb +18 -0
  89. data/lib/adhearsion/voip/dial_plan.rb +205 -0
  90. data/lib/adhearsion/voip/dsl/dialing_dsl/dialing_dsl_monkey_patches.rb +37 -0
  91. data/lib/adhearsion/voip/dsl/dialing_dsl.rb +151 -0
  92. data/lib/adhearsion/voip/dsl/dialplan/control_passing_exception.rb +27 -0
  93. data/lib/adhearsion/voip/dsl/dialplan/dispatcher.rb +124 -0
  94. data/lib/adhearsion/voip/dsl/dialplan/parser.rb +75 -0
  95. data/lib/adhearsion/voip/dsl/dialplan/thread_mixin.rb +16 -0
  96. data/lib/adhearsion/voip/dsl/numerical_string.rb +117 -0
  97. data/lib/adhearsion/voip/freeswitch/basic_connection_manager.rb +48 -0
  98. data/lib/adhearsion/voip/freeswitch/event_handler.rb +58 -0
  99. data/lib/adhearsion/voip/freeswitch/freeswitch_dialplan_command_factory.rb +129 -0
  100. data/lib/adhearsion/voip/freeswitch/inbound_connection_manager.rb +38 -0
  101. data/lib/adhearsion/voip/freeswitch/oes_server.rb +195 -0
  102. data/lib/adhearsion/voip/menu_state_machine/calculated_match.rb +80 -0
  103. data/lib/adhearsion/voip/menu_state_machine/matchers.rb +123 -0
  104. data/lib/adhearsion/voip/menu_state_machine/menu_builder.rb +58 -0
  105. data/lib/adhearsion/voip/menu_state_machine/menu_class.rb +149 -0
  106. data/lib/adhearsion.rb +31 -0
  107. data/script/destroy +14 -0
  108. data/script/generate +14 -0
  109. data/spec/fixtures/dialplan.rb +3 -0
  110. data/spec/initializer/test_configuration.rb +267 -0
  111. data/spec/initializer/test_loading.rb +162 -0
  112. data/spec/initializer/test_paths.rb +43 -0
  113. data/spec/silence.rb +10 -0
  114. data/spec/test_ahn_command.rb +149 -0
  115. data/spec/test_code_quality.rb +87 -0
  116. data/spec/test_component_manager.rb +97 -0
  117. data/spec/test_constants.rb +8 -0
  118. data/spec/test_drb.rb +104 -0
  119. data/spec/test_helper.rb +94 -0
  120. data/spec/test_hooks.rb +37 -0
  121. data/spec/test_host_definitions.rb +79 -0
  122. data/spec/test_initialization.rb +105 -0
  123. data/spec/test_logging.rb +80 -0
  124. data/spec/test_relationship_properties.rb +54 -0
  125. data/spec/voip/asterisk/ami_response_definitions.rb +23 -0
  126. data/spec/voip/asterisk/config_file_generators/test_agents.rb +253 -0
  127. data/spec/voip/asterisk/config_file_generators/test_queues.rb +325 -0
  128. data/spec/voip/asterisk/config_file_generators/test_voicemail.rb +306 -0
  129. data/spec/voip/asterisk/menu_command/test_calculated_match.rb +111 -0
  130. data/spec/voip/asterisk/menu_command/test_matchers.rb +98 -0
  131. data/spec/voip/asterisk/mock_ami_server.rb +176 -0
  132. data/spec/voip/asterisk/test_agi_server.rb +451 -0
  133. data/spec/voip/asterisk/test_ami.rb +227 -0
  134. data/spec/voip/asterisk/test_commands.rb +2006 -0
  135. data/spec/voip/asterisk/test_config_manager.rb +129 -0
  136. data/spec/voip/dsl/dispatcher_spec_helper.rb +45 -0
  137. data/spec/voip/dsl/test_dialing_dsl.rb +268 -0
  138. data/spec/voip/dsl/test_dispatcher.rb +82 -0
  139. data/spec/voip/dsl/test_parser.rb +87 -0
  140. data/spec/voip/freeswitch/test_basic_connection_manager.rb +39 -0
  141. data/spec/voip/freeswitch/test_inbound_connection_manager.rb +39 -0
  142. data/spec/voip/freeswitch/test_oes_server.rb +9 -0
  143. data/spec/voip/test_call_routing.rb +127 -0
  144. data/spec/voip/test_dialplan_manager.rb +372 -0
  145. data/spec/voip/test_numerical_string.rb +48 -0
  146. data/spec/voip/test_phone_number.rb +36 -0
  147. data/test/test_ahn_generator.rb +59 -0
  148. data/test/test_component_generator.rb +52 -0
  149. data/test/test_generator_helper.rb +20 -0
  150. metadata +254 -0
@@ -0,0 +1,871 @@
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