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

nextime at nexlab.it nextime at nexlab.it
Fri Jun 15 02:23:01 CDT 2007


> The problem is, since its not an "asterisk" config file, it does not have contexts
> that can be easily parsed and sent through manager. I end up getting a "file does not
> exist". I do not want to edit asterisk yet, because then we will have yet another revision
> of asterisk, that makes all previous versions not work with that feature of the GUI.
> ( We have enough of this as it is. )
> 
> If I add [default] at the top, or [contextwhatever], it works fine, and I can see
> all the options, and maybe even update and edit them for digital card support in the GUI.
> 
> Then of course, ztcfg, gets mad at the brackets ([]s) 

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.

It's really an hack, but it work.
-- 

Franco (nextime) Lanza
Busto Arsizio - Italy
SIP://casa@casa.nexlab.it

NO TCPA: http://www.no1984.org
you can download my public key at:
http://danex.nexlab.it/nextime.asc || Key Servers
Key ID = D6132D50
Key fingerprint = 66ED 5211 9D59 DA53 1DF7  4189 DFED F580 D613 2D50
-----------------------------------
echo 16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D212153574F444E49572045535520454D20454B414D204F54204847554F4E452059415020544F4E4E4143205345544147204C4C4942snlbxq | dc
-----------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20070615/b511ef4f/attachment.pgp 


More information about the asterisk-dev mailing list