I was wanting to call ChanIsAvail from AMI. I logged in and issues command, Action: Command Command: ChanIsAvail DAHDI/1 my response was this: event_list=0 ret=158 Response: Follows[CR ][LF ]Privilege: Command[CR ][LF ]No such command 'ChanIsAvail DAHDI/1' Is there any way to tell if a channel is available through AMI? Did I format my request wrong? I am on 1.4.43. Thanks, Jerry
Using AMI you might want to use hints instead of ChanIsAvail since that command puts its' output back into the dialplan as variables. -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Jerry Geis Sent: Thursday, October 18, 2012 10:58 AM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] Question on AMI and ChanIsAvail I was wanting to call ChanIsAvail from AMI. I logged in and issues command, Action: Command Command: ChanIsAvail DAHDI/1 my response was this: event_list=0 ret=158 Response: Follows[CR ][LF ]Privilege: Command[CR ][LF ]No such command 'ChanIsAvail DAHDI/1' Is there any way to tell if a channel is available through AMI? Did I format my request wrong? I am on 1.4.43. Thanks, Jerry -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
On 18 Oct 2012, at 17:58, Jerry Geis wrote:> I was wanting to call ChanIsAvail from AMI. > > I logged in and issues command, > > Action: Command > Command: ChanIsAvail DAHDI/1 > > my response was this: > event_list=0 ret=158 Response: Follows[CR ][LF ]Privilege: Command[CR ][LF ]No such command 'ChanIsAvail DAHDI/1' > > Is there any way to tell if a channel is available through AMI? > Did I format my request wrong? > I am on 1.4.43. > > Thanks, > > JerryYou can get (on the CLI) the list of AMI commands supported by your Asterisk installation issuing "manager show commands". The AMI command that tells you what a terminal is doing at any time is "ExtensionState" (I guess it's available on 1.4..). But if you add hints to your dialplan, then Asterisk will send an AMI event whenever a terminal in the list of hints is changing state. You would need to listen to all such events and keep track of each line/extension; issuing a list of ExtensionState events only when you launch your tracking process. Cheers, Aldo