I have an issue with executing ruby script from my dial plan.
While my dial plan executing I want to call ruby script where I doing ssh connection to remote.
My ruby script executes SSH connection to remote server and executing other script on it.
This script is working fine when I run it manually from terminal:
[root@asterisk scripts]# ruby test.rb
it works fine when I executing it from asterisk console:
But my trubles starting when want do to the sane in dail plan.
This is try it
same => n,AGI(/srv/nfs/scripts/test.rb)
same => n,System(/srv/nfs/scripts/test.rb)
Please help me to understand what I am doing wrong or this is some asterisk bug issue.
HOST = ‘192.168.56.102’ #Remote server
USER = 'root’
PASS = 'xxxxxxx’
Net::SSH.start( HOST, USER, :password => PASS ) do|ssh|
result = ssh.exec!(command)