On Fri, Mar 03, 2006 at 09:30:08AM -0600, Tilghman Lesher wrote: > On Friday 03 March 2006 09:03, Tzafrir Cohen wrote: > > On Tue, Feb 21, 2006 at 01:09:23PM -0600, Kevin P. Fleming wrote: > > > Tzafrir Cohen wrote: > > > > Is a span a better object for such actions or does chan_zap > > > > (mainly/exclusivly) deals with channels? > > > > > > chan_zap does not really deal with Zaptel spans at all, just > > > channels (and groups of channels). > > > > > > Changing chan_zap to handle channel addition/removal will be > > > non-trivial, though; even handling non-contiguous channel > > > numbering is less than optimal right now (everything is done > > > using arrays). > > > > Your post has put me off for a while. Then I took a look at the > > code and noticed that it actually uses linked lists mostly. > > > > So I decided to just feel lucky and add two CLI commands: 'zap > > reload' to call setup_zap(1) and 'zap restart' to call setup_zap(0) > > How is your first command different than simply calling 'reload > chan_zap.so' ?
"zap reload" should have been the same, I guess. Only it segfaults. chan_zap has explicitly a different behaviour on startup and on reload. setup_zap gets a parameter called "reload" which is set to 0 when called at startup and to 1 when called on rload. *CLI> reload chan_zap.so -- Reloading module 'chan_zap.so' (Zapata Telephony w/PRI) Mar 3 10:36:35 WARNING[11623]: chan_zap.c:10916 setup_zap: Ignoring signalling -- Reconfigured channel 1, FXS Kewlstart signalling *CLI> zap restart -- Registered channel 1, FXS Kewlstart signalling -- Automatically generated pseudo channel However this still does not destroy existing channels: I have edited zapata.confand remmed-out the channel. And then: *CLI> zap restart -- Automatically generated pseudo channel *CLI> zap show channels Chan Extension Context Language MusicOnHold pseudo default 1 default An explicit "zap desroy channel 1" did the job there. All of this is only testing very simple functionality, of course. -- Tzafrir Cohen icq#16849755 +972-50-7952406 [EMAIL PROTECTED] http://www.xorcom.com _______________________________________________ --Bandwidth and Colocation provided by Easynews.com -- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev