<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16546" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hello, never posted to a mailing list before. I've
been trying to work out this problem for quite awhile now. I have a PHP script
which is run whenever an emergency situation happens. The script connects to the
AMI and originates calls to previously defined "emergency" extensions. I'm
looking for a way to disconnect all calls on a device if it is in use, in order
to deliver the message. I cannot use SoftHangup with the 'a' option within the
dial plan, because if the device that is called is busy, then the context is
never hit. It doesn't appear that their is a way within the AMI or using AGI or
even within the CLI to disconnect all calls on a device, only is you know the
entire channel name.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>For instance, from the CLI, running 'soft hangup
SIP/250-ab627038' will disconnect the channel successfully. But the problem is,
I have no way of finding out the full channel name from within my my script
using the AMI. The only possibility I see is running the "show channels" CLI
command via the AMI Command action, grabbing the resulting list and parsing the
Channel Name column before the script begins calling extensions. Then before
each extension is called, check to see if the extension exists in the retrieved
channel list. If so, disconnect it.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Anyways, it seems odd to me that the 'a' option is
available from within the dial plan, but not anywhere else. That would be the
simplest approach to this.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Any help is greatly appreciated.
Thanks.</FONT></DIV></BODY></HTML>