I have a setup where I want to mute audio on an external system when a call is made via a shell script. Then start it back up when it ends
Using the g option it works fine, only if the called party hangs up ( as expected per the documentation). But how can I make it continue if the calling party hangs up 1st?
here is my config:
exten => 3001,1,TrySystem(/etc/asterisk/Scripts/3001.sh Mute_Room);
exten => 3001,2,DIAL(SIP/1001,20,g);
exten => 3001,3,WAIT(1);
exten => 3001,4,TrySystem(/etc/asterisk/Scripts/3001.sh Unmute_Room);
exten => 3001,5,Goto (macro-hangupcall,s,3);
I tried using the G option, but it triggers when the call is answered screwing everything up.
Should I be using something other than DIAL to connect the call?