[Asterisk-Users] Programming the Manager API

El Flynn el_flynn at lanvik-icu.com
Tue Mar 21 22:20:59 MST 2006


Douglas Garstang wrote:
> Yikes. Java. Yuck. I'll stick with Python... Thanks anyway.
> I just worked it out... you can supply an actionid to the request to know what reply to look for, although it will still be tricky filtering out the noise.
>  

Well, with the Asterisk java code it's pretty much cut and dried. Take a look at 
some of the examples and you'll be surprised how quickly you can come up with a 
workable app. It's as easy as:

if (event instanceof NewChannelEvent) {
	/* Change icon color from green to red */
}
else if (event instanceof HangupEvent) {
	/* Change the icon color from red to green */
}

The filtering bit is "kind of" done for you there so you won't have to muck 
around with parsing what is thrown back at you by *.

Although you might want to download the source code and see how that parsing is 
done.

Flynn





More information about the asterisk-users mailing list