<div dir="ltr">Hey Michael,<br>Thanks :) that&#39;s insightful!<br>I will document it surely<br><br>I was hoping to know if Freeswitch implements the HTTP methods like GET, POST etc. If yes, which ones?<br>Looks like it doesn&#39;t though<br>
<br>Can I open input-output streams at {prefix}/freeswitch/htdocs ?<br><br clear="all"><br>-- <br>Regards,<br>Gayatri Kulkarni<br><br><div class="gmail_quote">On Wed, Oct 15, 2008 at 12:09 PM, Michael Collins <span dir="ltr">&lt;<a href="mailto:mcollins@fcnetwork.com">mcollins@fcnetwork.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div link="blue" vlink="blue" lang="EN-US">

<div>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">It's all in mod_xml_rpc.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">I've been trying to get it all doc'd
but I'm way behind… </span></font><font color="navy" face="Wingdings" size="2"><span style="font-size: 10pt; font-family: Wingdings; color: navy;">J</span></font><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp; Of course, I'm the guilty party for putting "webapi"
in the mod_perl page on the wiki. Sadly, "webapi" shows up only on
this page which means I'm slacking. This page needs some love:</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><a href="http://wiki.freeswitch.org/wiki/Mod_xml_rpc" target="_blank">http://wiki.freeswitch.org/wiki/Mod_xml_rpc</a></span></font></p>


<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">If you can wikify some of this knowledge
that would be great. Here are some quick tips regarding the built-in Abyss web
server:</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">HTTP only, no HTTPS; use port 8080</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Accessed via URL like so: <a href="http://192.168.1.1:8080/" target="_blank">http://192.168.1.1:8080/</a></span></font></p>


<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Need username/password (typical HTTP
authentication I believe)</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp; Username/password can be modified
in conf/autoload_configs/xml_rpc.conf.xml</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">The "webroot" on a typical
*nix install is /usr/local/freeswitch/htdocs</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp; <a href="http://192.168.1.1:8080/" target="_blank">http://192.168.1.1:8080/</a>
will give a directory listing of /usr/local/freeswitch/htdocs</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp; Other HTML/JavaScript/etc. files in
htdocs will get served up as requested</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">There are various API access methods: api,
webapi, txtapi</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp; Each does something a little
different depending upon the scenario</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">When using an API command that has more
than one word, use a question mark to separate the first and second words, then
a space for the rest</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp; (See examples below)</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Try these different combos on your own
install; be sure to enable mod_xml_rpc in modules.conf.xml!</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Replace the sample IP address (<a href="http://192.168.1.1" target="_blank">192.168.1.1</a>)
with your actual FS IP address.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><a href="http://192.168.1.1:8080/api/version" target="_blank">http://192.168.1.1:8080/api/version</a></span></font></p>


<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><a href="http://192.168.1.1:8080/webapi/version" target="_blank">http://192.168.1.1:8080/webapi/version</a></span></font></p>


<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><a href="http://192.168.1.1:8080/txtapi/version" target="_blank">http://192.168.1.1:8080/txtapi/version</a></span></font></p>


<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><a href="http://192.168.1.1:8080/api/show?channels" target="_blank">http://192.168.1.1:8080/api/show?channels</a></span></font></p>


<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><a href="http://192.168.1.1:8080/webapi/show?channels" target="_blank">http://192.168.1.1:8080/webapi/show?channels</a></span></font></p>


<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><a href="http://192.168.1.1:8080/txtapi/show?channels" target="_blank">http://192.168.1.1:8080/txtapi/show?channels</a></span></font></p>


<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><a href="http://192.168.1.1:8080/api/sofia?status%20profile%20internal" target="_blank">http://192.168.1.1:8080/api/sofia?status%20profile%20internal</a>
</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><a href="http://192.168.1.1:8080/webapi/sofia?status%20profile%20internal" target="_blank">http://192.168.1.1:8080/webapi/sofia?status%20profile%20internal</a>
</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><a href="http://192.168.1.1:8080/txtapi/sofia?status%20profile%20internal" target="_blank">http://192.168.1.1:8080/txtapi/sofia?status%20profile%20internal</a>
</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">For kicks, try these:</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><a href="http://192.168.1.1:8080/api/help" target="_blank">http://192.168.1.1:8080/api/help</a></span></font></p>


<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><a href="http://192.168.1.1:8080/webapi/help" target="_blank">http://192.168.1.1:8080/webapi/help</a></span></font></p>


<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><a href="http://192.168.1.1:8080/txtapi/help" target="_blank">http://192.168.1.1:8080/txtapi/help</a></span></font></p>


<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">Depending upon the API command being used,
the api/webapi/txtapi choice will differ. I recommend playing with it to figure
out which one works best for you. Sometimes you'll like the way that
webapi wraps your output in nice tables w/ alternating background colors. Sometimes
the output of the API command doesn't support that fancy wrapping. As you
tinker you'll see which method works best for the commands you want to
use.</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">You can access just about anything you
could otherwise type at the FS CLI:</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"><a href="http://192.168.1.1:8080/webapi/" target="_blank">http://192.168.1.1:8080/webapi/</a>&lt;insert-your-commands-here&gt;</span></font></p>


<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">If you like it, doc it! </span></font><font color="navy" face="Wingdings" size="2"><span style="font-size: 10pt; font-family: Wingdings; color: navy;">J</span></font><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;"></span></font></p>


<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">-MC</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">P.S. – for extra fun try this one: <a href="http://192.168.1.1:8080/api/voicemail/web" target="_blank">http://192.168.1.1:8080/api/voicemail/web</a></span></font></p>


<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<p><font color="navy" face="Arial" size="2"><span style="font-size: 10pt; font-family: Arial; color: navy;">&nbsp;</span></font></p>

<div style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0in 0in 0in 4pt;">

<div>

<div style="text-align: center;" align="center"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">

<hr align="center" size="2" width="100%">

</span></font></div>

<p><b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma; font-weight: bold;">From:</span></font></b><font face="Tahoma" size="2"><span style="font-size: 10pt; font-family: Tahoma;">
<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>
[mailto:<a href="mailto:freeswitch-users-bounces@lists.freeswitch.org" target="_blank">freeswitch-users-bounces@lists.freeswitch.org</a>] <b><span style="font-weight: bold;">On Behalf Of </span></b>Gayatri Kulkarni<br>
<b><span style="font-weight: bold;">Sent:</span></b> Tuesday, October 14, 2008
10:49 PM<br>
<b><span style="font-weight: bold;">To:</span></b>
<a href="mailto:freeswitch-users@lists.freeswitch.org" target="_blank">freeswitch-users@lists.freeswitch.org</a><br>
<b><span style="font-weight: bold;">Subject:</span></b> Re: [Freeswitch-users]
HTTP methods</span></font></p>

</div><div><div></div><div class="Wj3C7c">

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

<div>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">great! I found an
occurece of &quot;webapi&quot; in the documentation for mod_perl<br>
<br>
but, is this share generated when we install FS, or when we enable mod_xm_rpc
or something, because i can&#39;t find it created on my system. If yes, what is
it&#39;s default path?<br>
Or, do I have to create it and implement the HTTP methods myself??<br>
<br clear="all">
<br>
-- <br>
Regards,<br>
Gayatri Kulkarni</span></font></p>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">On Tue, Oct 14, 2008 at 6:49 PM, Anthony Minessale &lt;<a href="mailto:anthony.minessale@gmail.com" target="_blank">anthony.minessale@gmail.com</a>&gt;
wrote:</span></font></p>

<div>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">there is a special /api
/webapi and /textapi share on the site that will point at any api command doing
GET or POST<br>
<br>
for instance:<br>
/webapi/status<br>
<br>
I&#39;m pretty sure it&#39;s documented somewhere.<br>
<br>
</span></font></p>

<div>

<div>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">On Tue, Oct 14, 2008 at 6:57 AM, Gayatri Kulkarni &lt;<a href="mailto:xtpl.gayatri@gmail.com" target="_blank">xtpl.gayatri@gmail.com</a>&gt;
wrote:</span></font></p>

</div>

</div>

<blockquote style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204, 204, 204); border-width: medium medium medium 1pt; padding: 0in 0in 0in 6pt; margin-left: 4.8pt; margin-right: 0in;">


<div>

<div>

<div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">Hi Guys,<br>
<br>
The XmlRpc is implemented from the web port - 8080<br>
Can we also specify which HTTP methods FS implements - like GET, POST, PUT,
DELETE, etc ??<br>
in xml_rpc.conf.xml or some place ....?<br>
Is there a way to implement these?<br clear="all">
<br>
-- <br>
Regards,<br>
Gayatri Kulkarni</span></font></p>

</div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

</div>

</div>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span></font></p>

</blockquote>

</div>

<p><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
<br clear="all">
<br>
-- <br>
Anthony Minessale II<br>
<br>
FreeSWITCH <a href="http://www.freeswitch.org/" target="_blank">http://www.freeswitch.org/</a><br>
ClueCon <a href="http://www.cluecon.com/" target="_blank">http://www.cluecon.com/</a><br>
<br>
AIM: anthm<br>
<a href="mailto:MSN%3Aanthony_minessale@hotmail.com" target="_blank">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a href="mailto:PAYPAL%3Aanthony.minessale@gmail.com" target="_blank">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a href="http://irc.freenode.net" target="_blank">irc.freenode.net</a>
#freeswitch<br>
<br>
FreeSWITCH Developer Conference<br>
<a href="mailto:sip%3A888@conference.freeswitch.org" target="_blank">sip:888@conference.freeswitch.org</a><br>
<a href="http://iax:guest@conference.freeswitch.org/888" target="_blank">iax:guest@conference.freeswitch.org/888</a><br>
<a href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org" target="_blank">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:213-799-1400</span></font></p>

</div>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;"><br>
_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org" target="_blank">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a></span></font></p>

</div>

<p style="margin-bottom: 12pt;"><font face="Times New Roman" size="3"><span style="font-size: 12pt;">&nbsp;</span></font></p>

</div>

</div></div></div>

</div>

</div>


<br>_______________________________________________<br>
Freeswitch-users mailing list<br>
<a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" target="_blank">http://www.freeswitch.org</a><br>
<br></blockquote></div><br><br>
</div>