[asterisk-dev] action: getconfig, what about zaptel.conf?

Tzafrir Cohen tzafrir.cohen at xorcom.com
Fri Jun 15 03:00:52 CDT 2007


On Fri, Jun 15, 2007 at 09:23:01AM +0200, nextime at nexlab.it wrote:

> I user a real *dirty hack* to get the same feature from my gui.
> 
> in /etc/asterisk/ i make a "myzaptel.conf" file with only 2 lines:
> 
> [zaptel]
> #include /etc/zaptel
> 
> In this way i can read zaptel.conf from the gui reading the file
> myzaptel.conf.
> 
> When i want to write it, i write a third file, let me say
> "myzaptel-new.conf" using the context [zaptel] followed by my options.
> 
> After write the new file, i launch i dialplan system() call that launch
> a "grep -v "\[zaptel\]" /etc/asterisk/myzaptel-new.conf > /etc/zaptel.conf"
> and a "sudo ztcfg" and voila', le jeux son fais.

While I don't like tht idea, as it strips comments as "directives", and
may actually expand them, I'll just note that as Asterisk has write
access to the zaptel device files it is permitted to run ztcfg .

So:  

  System(/sbin/ztcfg) 

will work.

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



More information about the asterisk-dev mailing list