[asterisk-users] pyAsterisk: how to gracefully exit from event loop

Olivier oza.4h07 at gmail.com
Wed Feb 12 03:43:53 CST 2014


I'm using py-Asterisk 0.5.3.
I'm trying to use it along a Tkinter-based GUI so I've dedicated a thread
for reading incoming AMI events.

Which is the preferred way to gracefully exit from an event loop ?
More precisely:

This thread is waiting for input events with Manager._read_packet() method.
Doc (see [1]) says:
"... infinite loop running BaseManager.read() until an exception occurs
(for example, SystemExit is raised) or until sys.exit() is called"

The best method I could find is to close Manager connection and catch

Any advice ?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20140212/d8de5424/attachment.html>

More information about the asterisk-users mailing list