Asterisk 11.21.0 installed in Raspberry 2
3G Huawei E173 works ok.
I am a noob in asterisk. Trying to make a call (Zero$ free of charge simple Beep), reject/busy/hangup, to the RPI and that call to trigger/execute a command/script (want to make Relay to open/close circuit but cannot even run a simple echo).
I understand that Hangup cannot be used as first the call must be answered and I do not want RPI to answer at all. So I tried to use the BUSY application. The busy application works OK and on the phone gets a busy tone in 0 seconds or whatever timeout I choose.
But after I get the busy tone and call is ended the command or script is not executed.
-in my chan_dongle I choose context dongle0
-in extensions_custom.conf I put
[dongle0]
exten => +40111111111,1,Busy(5)
exten => +40111111111,2,System(/var/lib/asterisk/agi-bin/echo)
exten => +40111111111,3,System(echo “test” >> /var/log/asterisk/test.log)
exten => +40111111111,4,AGI(/var/lib/asterisk/agi-bin/echo)
-phone number above is fake but in my config is the correct SIM number.
-if I do not put the PhoneNumber of the SIM plugged in 3G modem, I get answered, dunno why or what other context is responsible that makes the modem answer.
-tried with System and command, system and script, AGI and script but NO success.
-the script has the Executable bit set for everyone.
-in my log there are only two lines
[2016-05-22 18:14:25] VERBOSE[1876][C-00000000] pbx.c: – Executing [+40111111111@dongle0:1] Busy(“Dongle/dongle0-0100000000”, “5”) in new stack
[2016-05-22 18:14:30] VERBOSE[1876][C-00000000] pbx.c: == Spawn extension (dongle0, +40111111111, 1) exited non-zero on ‘Dongle/dongle0-0100000000’
-the command or script is just to place and echo TEST word in a file, but that is not done at all
echo script
#!/bin/bash
echo “TEST” >> /var/log/asterisk/TEST.txt
not even the command with System application is executed.
Please help me how to make a zero $ call but still trigger a command