Asterisk AGI Ruby Script does nothing - completed, returning 0

Hello,
Please forgive me if this is not the forum to discuss this topic.

We have Asterisk 12.1.1 built by root @ Digium2 on a x86_64 running
Centos 6.5. and ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]

Please help with the following:

a) In the Asterisk Dialplan I have:
same => n,AGI(/usr/lib64/ruby/xAgiScripts.rb)

b) AGI Ruby script has the following:
#!/usr/bin/env ruby
puts ‘NOOP Hello World’ (also puts “NOOP Hello World”)

c) When executed the Dialplan (from root user), on the CLI console I see
(not shown all the messages):

<PJSIP/801-00000005>AGI Tx >> agi_accountcode:
<PJSIP/801-00000005>AGI Tx >> agi_threadid: 139834460100352
<PJSIP/801-00000005>AGI Tx >>
<PJSIP/801-00000005>AGI Script /usr/lib64/ruby/xAgiScripts.rb completed,
returning 0
but the command was not executed!!

d) Verifications I made:

  • Script has 755 permissions
  • The path to the script file is OK, otherwise CGI complains
  • SELinux is disabled
    • I have change the script to other directory
      (/var/lib/asterisk/agi-bin with no luck
  • The ruby script runs OK in the Centos console
  • Same script in Bash works OK!!
  • I have read many, many related topics on google. Could not find any
    more clues. :frowning:

Appreciate your kind help
Thanks
Regards

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs