I have an extension in extensions.ael that when called, sends a system message to socat, which is listening on the network on a particular port.
So the client message is sent for Asterisk like this, for example:
System(echo “mycommand_with_arguments 291 234 199” | netcat localhost 7777 );
The system message passes quickly. I need to be able to keep the caller on the line until the caller him/herself hangs up and upon which, send another system message from Asterisk.
Here it is in pseudo AEL code:
201 => {
Answer();
System(echo "mycommand_with_arguments 291 234 199" | netcat localhost 7777 );
loopstart:
Wait(1);
goto loopstart label until the caller hangs up then continue on;
System(echo "my_other_command_with_argument 999" | netcat localhost 7777 );
Hangup();
}
Hope someone can help.
Thanks,