Chris you seem to like the things I hate the most! LOL
About the only thing I hate worse then XML for config
files is using M4 for any-e-thing at all!!! <grin> Your
a sick man, you just seem to love needless steps in editing
a config file!  I'll stick to Macros, myself.

Chris Albertson wrote:

Parcers running even on older PC hardware can parce XML faster
than the characters can pass under the read/write head of the
disk. The speed difference between XML and non-XML is due only
t the extra character count. Modern parcers are very good.
CPU cycles are not a good argument.


Where XML is usfull is where you have several programs that need
to read the same data files and do different things with the same
data.  And the data is non-triveal complexity And the programs
that read the data are maintained by different organizations.

XML has pretty much taken over B2B e-commerce.  XML formatted
invoices and so on...  One program might apply a style to the
invoice so it can be printed an other might log it to a database


Ok, I admit .conf files that descibe telephony hardware connected to a PC don't need to be XML. What else but Asterisk would read these files?

The dail plan is different.  IMO data about users, their phone
extension(s) physical location, name, authenication info (passwords)
and other personal data needs to go in an on-line data storage system.
Call it a RDBMS, LDAP server or even an NIS map.

Sepporate from the above is the flow of control that a call takes.
(ring phone(s), answer or go to voice mail or secritary) You should only have to define how a "type-D' phone flows once then
in the above on-line database simple note that the extension
is of "type-D"


extensions.conf combines the above two types of information.
A typical medium sized company would have many repeted blocks
difering only by extension number in extensions.conf


The best thing might be to seporate the two types of data.
The simple thing to do is use a preprocessor like M4.
Defin a macro for a "type-D" phone and then have lines like

  extn-type_D(6578)
  extn-type_D(6579)

Then to change the flw of control for all 100 extension you
only have to change the macro definition.  Still you are keeping
two diferent kinds of data in the same file but at least you've
"factored out" the redundent information


--- Peter Brown <[EMAIL PROTECTED]> wrote:


Hi,

XML may be the latest but it also adds latency to the whole process -
for
what benefit?

It looks better, we are using the latest technology? If a wheel
barrow will
do the job why get a D9 Tractor?

No flame wars pls, just my 2cents worth.

Peter

At 19:00 17/03/2003 -0500, you wrote:


I hate to say do it Microsoft's way; but they FINALLY came around


with


Win2003 to storing the web server config in XML; and after revisions


of


registry storage (basically param=value format), then metabase with
inheritance issues (custom format, no tools to edit) and now they


went XML.


I've always liked the apache layout (although I make a living on


IIS) - This


new XML one, although I haven't played with it much yet, looks like


the way


*ALL* configs should be. Not that IIS config is the way - but XML.

As was said, other editors can do it, there's components (windows


and *nix


based) to parse xml readily available, etc.

I've said for a long time xml is NOT the be all and end all like


people


profess, and it's ended up doing things that there's no reason to do


-


however for config files it looks like a great answer.

Steve Radich - Colocation / Virtual Dedicated / Dedicated Servers BitShop, Inc. - http://www.bitshop.com - $149/month colo special


-----Original Message-----
From: Chris Albertson [mailto:[EMAIL PROTECTED] Sent: Monday, March 17, 2003 5:23 PM
To: [EMAIL PROTECTED]
Subject: Re: [Asterisk-Users] PHP Gui for Asterisk (AGI questions)



I think the way to go with conf. file for Asterisk is XML.


When I first saw the Asterisk conf files I wondered if Eric Allman had found a new job working on Asterisk. (That's
a joke for those of you who have had to maintain a sendmail
installation. sendmail.cf is the definition of cryptic)


Some advantages of XML:

1) Parsers and file editors already exist for XML. Users could
edit files with ready made GUI tools, programmers can use
XML with XML libraries. There are even web-based tools for
maintaining XML data.


2) Parsers and file editors can perform file validation.  Making
 it not-possible to save an invalid file.

3) (some) Database systems can gobble up XML and spit it back
 out.  Yes, I think the DBMS idea was resonable for a large
 installation.  Overkill if less then say a few hundred
 extensions.  Large sites like to manage phone extension and,
 extension to physical location maping and other stuff in a DBMS.

4) XML (with addition of a style sheet) can be directly displayed
 in a web browser

5) Without a GUI and/or wrb front end the system will remain only "geek usable". (Your average "phone guy" doesn't know
how to use vi.)


6) XML readers can ignor parts of the XML file they don't


understand.


 This allows one file to carry information for multiple readers
 ad for new additions too the file not to break older readers.

--- Steven Critchfield <[EMAIL PROTECTED]> wrote:


On Mon, 2003-03-17 at 11:36, Stefano Finetti wrote:


I was wondering about a little php-based GUI to manage Asterisk


Extensions.


Many way to obtain this, but i think that implementing in a php


script the


AGI Commands should obtain the best results (more, the best


result


would


come with AGI+Mysql instead of a text file like extensions.conf


but...).

Text files would be better than a database since you could comment


on


what you are trying to do with a text file. Also a text file can


be


munged easier than a database when a change in argument format


comes


out
such as the function style of calling apps in asterisk. Maybe if


you


need webbased configuration you could make a script that held your
working copy either in a flat file or text file , then generated a
new
extensions.conf file as you commit changes. Once commited, you


make a


call to asterisk to reload via the manager port.



The problem is that I've tried to understand *where* and *how*


apply AGI


commands, without, of course, any good result.

In which way AGI commands are passed to asterisk?
Into the console?
Executing applications via extensions.conf?


AGI commands come from a script invoked by asterisk itself, and
communicate via STDIN/STDOUT with asterisk.


-- Steven Critchfield <[EMAIL PROTECTED]>

_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users


=====
Chris Albertson
Home:   310-376-1029  [EMAIL PROTECTED]
Cell:   310-990-7550
Office: 310-336-5189  [EMAIL PROTECTED]
KG6OMK

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your


desktop!


http://platinum.yahoo.com
_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users
_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users




_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users




=====
Chris Albertson
 Home:   310-376-1029  [EMAIL PROTECTED]
 Cell:   310-990-7550
 Office: 310-336-5189  [EMAIL PROTECTED]
 KG6OMK

__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users




_______________________________________________
Asterisk-Users mailing list
[EMAIL PROTECTED]
http://lists.digium.com/mailman/listinfo/asterisk-users

Reply via email to