[asterisk-users] Channel kept busy when creating ssh tunnel via AGI

Giorgio Incantalupo gincantalupo at fgasoftware.com
Wed Sep 20 03:09:27 MST 2006


Hi,
I have a problem with Asterisk AGI command.
I wrote a script which  launches a shell command.
If I launch a normal command for example like "ll > /tmp/tmp.txt", the 
AGI command launches the shell commands and then exits.

The problem is when I launch THIS command to create an ssh tunnel in 
background:
*ssh -f -N -l asterisk -R 2050:localhost:22 192.168.0.1*

The tunnel command above works well if launched via shell but if I 
launch it using the AGI script, it opens the tunnel but leaves a (SIP or 
ZAP) channel  in use (I checked it typing SIP/ZAP SHOW CHANNELS).
The channel closes only when I kill the tunnel process. After killing 
the process Asterisk console shows:

-- AGI Script tunnel.py completed, returning 0

Is there anybody who knows why the channel remains busy?

TIA


Giorgio Incantalupo


More information about the asterisk-users mailing list