What I would like to see would be a configurable option the admin could enable a SOAP client in Asterisk that would make calls to a SOAP server requesting the various pieces of information he needs. The SOAP server would have the DB connection(s) (or other back ends) to store persistent data. This way one could have a SOAP server just for users and another SOAP server for extensions and yet another for Call Accounting (Rating and CDRs)
Also, one would never actually need to look at the SOAP output (XML) or hand create any actual SOAP files. SOAP is just the protocol, how we interact with it is just an object.
Here is a perl example of a SOAP client:
#!/usr/bin/perl -w
use SOAP::Lite;
my $s = SOAP::Lite
-> uri('urn:xmethods-Temperature')
-> proxy('http://services.xmethods.net:80/soap/servlet/rpcrouter')
;
$ZipCode = $ARGV[0] or die "Usage: $0 zipcode\n";
print "The temperature in Zip Code $ZipCode is " . $s
-> getTemp(SOAP::Data->name('zipcode')->type(string => $ZipCode))
-> result; . "F\n";
[EMAIL PROTECTED] root]# ./wx.pl 49332
The temperature in Zip Code 49332 is 43F
Just thinking out loud,
Jeremy McNamara
Chris Albertson wrote:
This topic is of interrest to me because I have to re-write the conf. file system on some software I'm working on. It's currently horible. (Just keyword=value pairs minus the keyword= part)SOAP looks to me like a message passing protocol. Configuration needs to be placed in a persistent storage like a file. Sometimes "db" tables, LDAP, or a DBMS is used. Either way it's "storage" SOAP looks like a way to send messages, not a way to store data. But SOAP is XML, So I'm glad you agree about the part. --- Jeremy McNamara <[EMAIL PROTECTED]> wrote:SOAP My 2 cents, Jeremy Chris Albertson wrote: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'tunderstand.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 AsteriskExtensions.Many way to obtain this, but i think that implementing in a phpscript theAGI Commands should obtain the best results (more, the best resultwouldcome with AGI+Mysql instead of a text file like extensions.confbut...). Text files would be better than a database since you could commentonwhat 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 formatcomesout such as the function style of calling apps in asterisk. Maybe ifyouneed 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 makeacall to asterisk to reload via the manager port.The problem is that I've tried to understand *where* and *how*apply AGIcommands, 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 yourdesktop!http://platinum.yahoo.com _______________________________________________ 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
