Could anyone please help me to resolve the iisue?
I have migrated from Asterisk 1.6 to 1.8(1.8.0-1) and System application stops working.
This is part of my extensions.conf:
[100]
exten => 1,1,System(/etc/asterisk/scripts/script.sh "call from "${CALLERID(num)})
exten => 1,n,Noop(${SYSTEMSTATUS})
exten => 1,n,TrySystem(/etc/asterisk/scripts/script.sh "call from "${CALLERID(num)})
exten => 1,n,Noop(${SYSTEMSTATUS})
exten => 1,n,hangup
This is asterisk console messages:
sandCLI>
== Using SIP RTP CoS mark 5
– Executing [1@100:1] System(“SIP/100-00000002”, "/etc/asterisk/scripts/script.sh "call from “100”) in new stack
– Executing [1@100:2] NoOp(“SIP/100-00000002”, “APPERROR”) in new stack
– Executing [1@100:3] TrySystem(“SIP/100-00000002”, "/etc/asterisk/scripts/script.sh "call from “100”) in new stack
– Executing [1@100:4] NoOp(“SIP/100-00000002”, “APPERROR”) in new stack
– Executing [1@100:5] Hangup(“SIP/100-00000002”, “”) in new stack
== Spawn extension (100, 1, 5) exited non-zero on 'SIP/100-00000002’
sandCLI>
And this is script:
[k@sand ~]$ ls -al /etc/asterisk/scripts/script.sh
-rwxr-xr-x 1 root root 57 Dec 8 21:14 /etc/asterisk/scripts/script.sh
[k@sand ~]$ cat /etc/asterisk/scripts/script.sh
#!/bin/bash
/bin/echo date
$1 $2 >> /home/k/script.out
[k@sand ~]$ ls -al /home/k/script.out
-rwxrwxrwx 1 k k 4917 Dec 8 16:36 /home/k/script.out