[asterisk-dev] zaptel disconnecting

Tzafrir Cohen tzafrir.cohen at xorcom.com
Fri Jun 2 06:36:46 MST 2006


Hi

I wrote a imple patch to chan_zap alng with an extra #define in
zaptel/zaptel.h :

http://bugs.digium.com/view.php?id=7256
[patch] destroy channel on ZT_EVENT_REMOVED

Basically it adds another event zaptel can send for a channel,
ZT_EVENT_REMOVED . It is sent when the hardware connected to that
channel has been disconnected but in the case the channel is still in
use, and hints Asterisk to destroy that channel.


Upon recieving that event, chan_zap will destroy that channel (in a
rather brutal way: I basically call the code from 'zap destroy channel'
in the CLI. The patch split the function into two to allow that call).


What I would like:
1. Is it possible to apply the patch to zaptel.h ? It is harmless on its
own. But will guarantee that nobody will define another signal to 20.

2. I believe that this should be of interest to users of ztdynamic
(ztd-eth, ztd-loc). However I don't know those. Comments are welcome.

3. The patch is made with channel-based devices. However PRI/BRI have a
special dchan whose disconnection is probably a special case. As I don't
have the hardware to test that with, I'd appreciate your comments on the
matter.

4. And any other comments.

-- 
Tzafrir Cohen      sip:tzafrir at local.xorcom.com
icq#16849755       iax:tzafrir at local.xorcom.com
+972-50-7952406           
tzafrir.cohen at xorcom.com  http://www.xorcom.com



More information about the asterisk-dev mailing list