Re: [asterisk-users] Question on AMI and ChanIsAvail

2012-10-18 Thread Aldo Bergamini
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,
> 
> Jerry


You 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


--
_
-- 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


Re: [asterisk-users] Question on AMI and ChanIsAvail

2012-10-18 Thread Danny Nicholas
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-boun...@lists.digium.com
[mailto:asterisk-users-boun...@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


--
_
-- 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


Re: [asterisk-users] Question on AMI

2011-05-17 Thread Jerry Geis

Jerry Geis wrote:

I am using asterisk 1.4.41 and the AMI

I am trying to execute a command over AMI, specifically "core show 
channels concise"

"sometimes" I get this back:
asterisk_command_show_channels() execute failed. 'Response: Follows[CR 
][LF ]Privilege: Command[CR ][LF 
]OutgoingSpoolFailed!smvoice-dialout!failed!1!Down!AGI!smvoice|-digium_failed!!!3!0!(None)[LF 
]'


I'm not expecting to see that...

My manager.conf file section is:
[]
secret=YES
permit=127.0.0.1/255.255.255.0
read = system,call,command,agent,user
write = system,call,command,agent,user,originate
;read = system,call,log,verbose,command,agent,user
;write = system,call,log,verbose,command,agent,user

Is there something not configured right?
At the time I get the above error I had PREVIOUSLY tryied to dispatch 
a call to an invalid extension. Which is correct (I am testing that).
however I am not expecting to see the above error over the interface 
when I am asking for show channels. Certainly the AGI smvoice will 
execute about that is fine.
I just dont want to see that particular message come over the AMI when 
I am asking for show channels result.


How do I disable that?

Thanks,

Jerry

One thing I forgot to add was that when I login the AMI I have "Events: 
off".


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