<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:courier,monaco,monospace,sans-serif;font-size:12pt">Hi,<br><br>It's necessary to pay attention to the modularity of the system and overall scoping concerns when making this type of decision.<br><br>The XMLRPC is a loadable module loaded by the core at runtime.<br>"show" is an API command registered by mod_commands.so<br><br><br>Because of this, it is not possible to extend the knowledge of XMLRPC <br>to the 'show' command because there is no guarantee either module will be loaded.<br><br><br>So, it's the API interface that is designed with a [string-in / string-out]<br>prototype and the XMLRPC is only providing an interface to the API interface<br>of freeswitch.&nbsp; This independance is mandatory and a fundamental of my design principle and anything else must be abandoned despite how tempting because the API interface is called from other methods such as a direct http
 connection, an event socket or from a scripting language such as javascript.<br><br>However,<br><br>It is completely possible to add support to the show command to parse a special input param and deliver that string-out as XML<br><br>for instance:<br><br>"show channels as xml"<br>"show channels as csv"<br><br>Each API command must provide it's own complete interpretation of the input<br>and decision about what to output and since the entire system only has one "show" command it is not very difficult to implement this and it would be happily accepted as a patch to mod_commands.c<br><br><br><br><br><br><div>&nbsp;</div><div>Anthony Minessale II<br><br><span>FreeSWITCH <a target="_blank" href="http://www.freeswitch.org/">http://www.freeswitch.org/</a></span><br><span>ClueCon <a target="_blank" href="http://www.cluecon.com/">http://www.cluecon.com/</a></span><br><br>AIM: anthm<br>MSN:anthony_minessale@hotmail.com<br>JABBER:anthony.minessale@gmail.com<br>IRC: irc.freenode.net
 #freeswitch</div><div><br>FreeSWITCH Developer Conference<br>sip:888@conference.freeswitch.org<br>iax:guest@conference.freeswitch.org/888<br>googletalk:conf+888@conference.freeswitch.org<br>pstn:213-799-1400</div><div style="font-family: courier,monaco,monospace,sans-serif; font-size: 12pt;"><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Jonas Gauffin &lt;jonas.gauffin@gmail.com&gt;<br>To: freeswitch-dev@lists.freeswitch.org<br>Sent: Tuesday, March 6, 2007 4:08:42 AM<br>Subject: Re: [Freeswitch-dev]
 XML-RPC<br><br><div>Correction:<br><br>&lt;array&gt;<br>&nbsp;&nbsp;&lt;data&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;value&gt;&lt;string&gt;0983de41-2562-fa44-8c0c-a6e5747b2c17,2007-03-06&lt;/string&gt;&lt;/value&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;value&gt;&lt;dateTime.iso8601&gt;20070306T10:42:01&lt;/dateTime.iso8601&gt;&lt;/value&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;value&gt;&lt;string&gt;PortAudio/1234&lt;/string&gt;&lt;/value&gt;<br>&nbsp;&nbsp;&lt;/data&gt;<br>&lt;/array&gt;<br><br>You can also use the &lt;struct&gt; tag to be able to assign names to each value.<br><br>More info: <a target="_blank" href="http://www.xmlrpc.com/spec/">http://www.xmlrpc.com/spec/</a><br><br>On 3/6/07, Jonas Gauffin &lt;jonas.gauffin@gmail.com&gt; wrote:<br>&gt; Hello<br>&gt;<br>&gt; I've played around with the XML-RPC implementation and I have some<br>&gt; suggestions. The output of all commands are now simple text strings.<br>&gt; That makes the result parsing quite hard for applications that
 would<br>&gt; like to use the interface (and it's really telnet commands wrapped<br>&gt; into a xmlrpc body).<br>&gt;<br>&gt; For instance, take the "show channels" result. It currently looks like<br>&gt; this (have removed the xml rpc body):<br>&gt;<br>&gt;<br>&gt; uuid,created,name,state,cid_name,cid_num,ip_addr,dest,application,application_data,read_codec,read_rate,write_codec,write_rate<br>&gt; 0983de41-2562-fa44-8c0c-a6e5747b2c17,2007-03-06<br>&gt; 10:42:01,PortAudio/1234,CS_EXECUTE,FreeSwitch,5555551212,,1234,bridge,sofia/mydomain.com/1234@conference.freeswitch.org,L16,8000,L16,8000<br>&gt; 37138427-cdb7-324c-b200-7123c063d473,2007-03-06<br>&gt; 10:42:02,sofia/mydomain.com/1234@conference.freeswitch.org,CS_LOOPBACK,FreeSwitch,5555551212,,mydomain.com/1234@conference.freeswitch.org,,,PCMU,8000,PCMU,8000<br>&gt;<br>&gt; 2 total.<br>&gt;<br>&gt; That should have been wrapped into xml instead:<br>&gt;<br>&gt; &lt;channels count="2"&gt;<br>&gt; &lt;channel&gt;<br>&gt;
 &lt;uuid&gt;0983de41-2562-fa44-8c0c-a6e5747b2c17,2007-03-06&lt;/uuid&gt;<br>&gt; &lt;created&gt;2007-03-06 10:42:01&lt;/created&gt;<br>&gt; &lt;name&gt;PortAudio/1234&lt;/name&gt;<br>&gt; [... and all other information ...]<br>&gt; &lt;/channel&gt;<br>&gt; &lt;/channels&gt;<br>&gt;<br>&gt; Same goes for all other commands implemented in XML-RPC.<br>&gt;<br>&gt; Best regards,<br>&gt;&nbsp;&nbsp; Jonas<br>&gt;<br><br>_______________________________________________<br>Freeswitch-dev mailing list<br>Freeswitch-dev@lists.freeswitch.org<br><a target="_blank" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev">http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev</a><br>UNSUBSCRIBE:<a target="_blank" href="http://lists.freeswitch.org/mailman/options/freeswitch-dev">http://lists.freeswitch.org/mailman/options/freeswitch-dev</a><br><a target="_blank" href="http://www.freeswitch.org">http://www.freeswitch.org</a><br></div></div><br></div></div><br>


 <hr size=1>Looking for earth-friendly autos? <br> <a href="http://autos.yahoo.com/green_center/;_ylc=X3oDMTE4MGw4Z2hlBF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDZ3JlZW5jZW50ZXI-">Browse Top Cars by "Green Rating"</a> at Yahoo! Autos' Green Center.  </body></html>