XML + Asterisk (was Re: [Asterisk-Users] PHP Gui for Asterisk (AGI questions))

Mark Spencer markster at digium.com
Tue Mar 18 08:21:54 MST 2003


> If XML is important to your needs, why not write a translation script to
> parse XML and write the asterisk configs? Scripting languages abound and are
> appropriate to the task. Obviously, the transaltion script could grab your
> XML and write fresh asterisk configs every time you started asterisk.

I agree with the idea of translating other formats to create Asterisk
config files.

It is no accident that Asterisk's configuration syntax is so close to its
internal structure.  This gives the user the greatest flexibility in
configuring their system.  In practice, of course, a particular user is
likely only to use a subset of its features.  For example, although
Asterisk requires no association between the Caller*ID of a phone and its
extension, many users would not need them to be separated, and would find
it convenient to tie them together in a single location.

Where XML, or even just the use of an RDBMS potentially *could* be useful
is in representing a conventional PBX, for example.  Storing the PBX in
the form of an extension, channel, name which could then be used to build
a vanilla asterisk config.

I believe that any sort of meaningful XML syntax, however, will almost
certainly reduce the level of flexibility or will cause unreasonable extra
verbosity if it is done in an attempt to completely replace the
functionality of the existing configuration files.

Mark




More information about the asterisk-users mailing list