On Tuesday 01 August 2006 16:46, Tim Miller WB0RXX wrote:
> Tobias Blomberg wrote:
> > Hi list!
> > I am planning to release a new version of SvxLink this month.
> I look forward to seeing it. The CVS versions have been most
> interesting, and very stable.
> > I'd like to hear
> > if you have any unreported bugs to report.
> I have one rather obscure bug and one feature addition...
> The obscure bug is more cosmetic in nature, and appears to have no
> effect on the operation of the main program. It has to do with passing
> variables from the config file to the Tcl modules. For example, if I
> add this line to /etc/svxlink.d/ModuleTclVoiceMail.conf:
> and add/change the corresponding lines in TclVoiceMail:
> #set cfg_etc "/etc/TclVoiceMail.conf";
> set cfg_etc $CFG_CFG_ETC;
> the module works fine. However, when starting svxlink, I get the
> following error:
> Tue Aug 01 08:03:26 2006: Starting logic: SimplexLogic
> Tue Aug 01 08:03:26 2006: /usr/share/svxlink/sounds/events.tcl: can't
> read "CFG_CFG_ETC": no such variable
> To add to the obscurity, I run two main modules here, Repeater and
> Simplex. The Simplex module does NOT have the TclVoiceMail module
> enabled, where the Repeater module does. If I enable the VM module in
> both sections, the problem goes away. Again, this is not a big deal,
> but I thought that you would like to know. :-)
Well, I would call this a design flaw rather than a bug. TCL modules is
implemented in an ugly way which I mean to change but probably not in this
release. I'll try to explain what is happening here.
The TCL code for the voice mail module gets loaded together with the event
scripts whether you use it or not. So it gets loaded in both the repeater and
simplex logics whether you list it in the MODULES config variable or not.
However, the CFG_xxx config variables will only be set if the module is
mentioned in the MODULES config variable for a specific logic core. So if you
don't specify "ModuleTclVoiceMail" in the simplex logic it will not find the
CFG_ETC variable. Hence the error message. If you remove the VM module from
the repeater logic as well I would guess you'll get two error messages.
What should be done about this is to not mix TCL modules with event scripts.
They should be separate. The voice mail TCL script should only be loaded if
the voice mail module is specified for that logic in the configuration. If
you want to get rid of the error message right now, access the $CFG_CFG_ETC
variable directly without using the cfg_etc variable or put an if-clause
around the "set cfg_etc $CFG_CFG_ETC;" row checking if the $CFG_CFG_ETC
variable is set or not.
The same goes for event scripts like EchoLink.tcl. The event script will be
loaded wheather the EchoLink module is used or not. In some perfect future
this will also be fixed.
> The feature addition has to do with the recent CVS change for the DTMF
> tone duration for LiTZ. I really appreciate your effort, but it needs
> one minor change for it to work in the proper manner. As I see it, and
> I apologize if this is not the case, the change only works under the Tcl
> modules. This is fine if the person punches up a module and then
> presses zero for a long duration, but does not help if no Tcl module is
> To make this work for LiTZ, the algorithm needs to be active even when a
> module is not active. Perhaps it could be added to the Repeater and/or
> Simplex module, which would be active whenever the program was running.
> This way, a ham in need of assistance would not need to activate a
> module to get attention.
Yes, I have not put much thought in how the DTMF tone length should be used. I
just threw it in since I was mucking around in the DTMF code anyway. I
actually need it myself very soon so I'll look at it then. I'll probably put
a dtmf_digit_received in the logic TCL scripts.
73 de SM0SVX / Tobias
> Thanks again Tobias for the great program, I really appreciate all that
> you have done.
> 73 de Tim