Finding Out If Channels Is Up

Home » Asterisk Users » Finding Out If Channels Is Up
Asterisk Users No Comments

Hi,

I wrote some code that connects to the Asterisk AMI to see if the channel is up by doing an Action status followed by a “Channel: $CHANNEL”. Most of the time if the channel is *NOT* up I will get:
line9: Response: Error line10: Message: No such channel

And if the channels is up I get in line 15 the channel I am looking for. The issue I am having is every so often in the AMI I will see other calls. In manager.conf I do have:
eventfilter=Status

However every so often I do get other events for example “Event: Dialend”. AmI doing something wrong? I wanted to use core show channels concise and parse that however as per http://lists.digium.com/pipermail/asterisk-dev/2012-January/053284.html that is deprecated.

Is that correct or am I facing a bug? I am using Asterisk 15.4.1.

EDIT: As per the docs it seems I need:
eventfilter=Event: Status

and NOT:
eventfilter=Status

TIA

Dovid