Добрый день, ребят подскажите пожалуйста как правильно выполнить скрипт через dialplan?
[call-777]
exten => 99,1,Answer()
exten => 99,n,System(/var/lib/asterisk/ssh.sh)
exten => 99,n,Hangup()
скрипт:
#!bin/bash
ssh root@192.168.1.4 'init 0'
sleep 5
exit 0
права:
-rwxrwxrwx 1 asterisk asterisk 56 Jul 26 14:44 /var/lib/asterisk/ssh.sh*
вывод консоли:
Using SIP RTP CoS mark 5
> 0x5634874ca700 -- Strict RTP learning after remote address set to: 192.168.1.2:40018
-- Executing [99@call-777:1] Answer("SIP/777-00000022", "") in new stack
-- Executing [99@call-777:2] System("SIP/777-00000022", "/var/lib/asterisk/ssh.sh") in new stack
[Jul 26 15:35:40] WARNING[7657][C-00000024]: app_system.c:146 system_exec_helper: Unable to execute '/var/lib/asterisk/ssh.sh'
== Spawn extension (call-777, 99, 2) exited non-zero on 'SIP/777-00000022'