[asterisk-dev] action: getconfig, what about zaptel.conf?
Brandon Kruse
bkruse at digium.com
Fri Jun 15 11:19:50 CDT 2007
Tzafrir,
The reason I need to do this is to read in the trunks, and give users
the basic way to setup their t1/e1.
Now that I am thinking about it more, I think I will just make it read
zapata.conf, and leave it up to the user to setup the cards.
This way digital cards, if already setup, can be used as trunks from the GUI.
-bkruse
----- Original Message -----
From: "Tzafrir Cohen" <tzafrir.cohen at xorcom.com>
To: asterisk-dev at lists.digium.com
Sent: Friday, June 15, 2007 1:00:52 AM (GMT-0800) America/Tijuana
Subject: Re: [asterisk-dev] action: getconfig, what about zaptel.conf?
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
_______________________________________________
--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
More information about the asterisk-dev
mailing list