$ ahn start .
[Fri May 2 12:32:59 2008] Starting FreeSwitch OES Server
INFO ahn: Adhearsion initialized!
[Fri May 2 12:33:03 2008] Incoming call on the FreeSwitch outbound
event socket...
[Fri May 2 12:33:03 2008] Connected to Freeswitch. Waiting for answer state.
[Fri May 2 12:33:03 2008] Loading cached dialplan
[Fri May 2 12:33:03 2008] Checking whether the contexts should be reloaded
[Fri May 2 12:33:03 2008] Getting the contexts
[Fri May 2 12:33:03 2008] Creating a new OesDispatcher
[Fri May 2 12:33:03 2008] Done creating it
[Fri May 2 12:33:03 2008] Finished loading cached dialplans
[Fri May 2 12:33:03 2008] Found context default from call variables.
#<NoMethodError: undefined method `extension' for
#<Adhearsion::VoIP::FreeSwitch::FreeSwitchDialplanCommandFactory:0xb7cc1750>>
...
I'm a ruby beginner, but if I could help in some way to make this
work, I'd really like to contribute!
--
Nicolás Brenner
Medularis SpA
website: www.medularis.com
def extension
.. do stuff ..
end
The right syntax is
extension {
.. do stuff ..
}
2008/5/2 Nicolas Brenner <nic...@medularis.com>:
default {
case extension
when 777
puts "hello"
end
[Fri May 16 08:38:09 2008] Done creating it
INFO oes: Finished loading cached dialplans
INFO oes: Found context default from call variables.
method missing [bridge]
INFO oes: Not a noop. Sending bridge(sofia/sip.ipcorp.cl/005622360310)
#<NoMethodError: private method `chomp' called for nil:NilClass>
/usr/local/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/freeswitch/basic_connection_manager.rb:23:in
`get_raw_header'
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/core_ext/object/misc.rb:28:in
`returning'
/usr/local/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/freeswitch/basic_connection_manager.rb:21:in
`get_raw_header'
/usr/local/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/freeswitch/basic_connection_manager.rb:17:in
`get_header'
/usr/local/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/freeswitch/oes_server.rb:161:in
`dispatch!'
/usr/local/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/freeswitch/oes_server.rb:159:in
`call'
/usr/local/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/freeswitch/oes_server.rb:159:in
`dispatch!'
/usr/local/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/dsl/dialplan/dispatcher.rb:80:in
`method_missing'
/usr/local/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/dsl/dialplan/dispatcher.rb:76:in
`map'
/usr/local/lib/ruby/gems/1.8/gems/adhearsion-0.7.999/lib/adhearsion/voip/dsl/dialplan/dispatcher.rb:76:in
`method_missing'
(eval):5:in `get_contexts'
And after I fix the chomp thing on line 23 of
adhearsion-0.7.999/lib/adhearsion/voip/freeswitch/basic_connection_manager.rb,
adding 'unless line.nil?' to the end of that line, I still get:
[Fri May 16 08:39:23 2008] Done creating it
INFO oes: Finished loading cached dialplans
INFO oes: Found context default from call variables.
method missing [bridge]
INFO oes: Not a noop. Sending bridge(sofia/sip.provider.com/xxxxxxx)
Weird thing is, I get a notice saying the method is missing, but it
still executes the method. Nonetheless, the original call is dropped,
so the bridge doesn't work.
Nico