[Freeswitch-users] HTTP methods
Anthony Minessale
anthony.minessale at gmail.com
Wed Oct 15 06:17:07 PDT 2008
are you talking about *doing* requests? like you GET something? that is
mod_xml_curl and other such curl interfaces scattered into the code. There
is more on the wiki than you think, look around =D
On Wed, Oct 15, 2008 at 1:54 AM, Gayatri Kulkarni <xtpl.gayatri at gmail.com>wrote:
> Hey Michael,
> Thanks :) that's insightful!
> I will document it surely
>
> I was hoping to know if Freeswitch implements the HTTP methods like GET,
> POST etc. If yes, which ones?
> Looks like it doesn't though
>
> Can I open input-output streams at {prefix}/freeswitch/htdocs ?
>
>
> --
> Regards,
> Gayatri Kulkarni
>
>
> On Wed, Oct 15, 2008 at 12:09 PM, Michael Collins <mcollins at fcnetwork.com>wrote:
>
>> It's all in mod_xml_rpc.
>>
>>
>>
>> I've been trying to get it all doc'd but I'm way behind… J 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:
>>
>>
>>
>> http://wiki.freeswitch.org/wiki/Mod_xml_rpc
>>
>>
>>
>> If you can wikify some of this knowledge that would be great. Here are
>> some quick tips regarding the built-in Abyss web server:
>>
>> HTTP only, no HTTPS; use port 8080
>>
>> Accessed via URL like so: http://192.168.1.1:8080/
>>
>> Need username/password (typical HTTP authentication I believe)
>>
>> Username/password can be modified in
>> conf/autoload_configs/xml_rpc.conf.xml
>>
>> The "webroot" on a typical *nix install is /usr/local/freeswitch/htdocs
>>
>> http://192.168.1.1:8080/ will give a directory listing of
>> /usr/local/freeswitch/htdocs
>>
>> Other HTML/JavaScript/etc. files in htdocs will get served up as
>> requested
>>
>>
>>
>> There are various API access methods: api, webapi, txtapi
>>
>> Each does something a little different depending upon the scenario
>>
>>
>>
>> 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
>>
>> (See examples below)
>>
>>
>>
>> Try these different combos on your own install; be sure to enable
>> mod_xml_rpc in modules.conf.xml!
>>
>> Replace the sample IP address (192.168.1.1) with your actual FS IP
>> address.
>>
>>
>>
>> http://192.168.1.1:8080/api/version
>>
>> http://192.168.1.1:8080/webapi/version
>>
>> http://192.168.1.1:8080/txtapi/version
>>
>>
>>
>> http://192.168.1.1:8080/api/show?channels
>>
>> http://192.168.1.1:8080/webapi/show?channels
>>
>> http://192.168.1.1:8080/txtapi/show?channels
>>
>>
>>
>> http://192.168.1.1:8080/api/sofia?status%20profile%20internal
>>
>> http://192.168.1.1:8080/webapi/sofia?status%20profile%20internal
>>
>> http://192.168.1.1:8080/txtapi/sofia?status%20profile%20internal
>>
>>
>>
>> For kicks, try these:
>>
>> http://192.168.1.1:8080/api/help
>>
>> http://192.168.1.1:8080/webapi/help
>>
>> http://192.168.1.1:8080/txtapi/help
>>
>>
>>
>> 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.
>>
>>
>>
>> You can access just about anything you could otherwise type at the FS CLI:
>>
>> http://192.168.1.1:8080/webapi/<insert-your-commands-here>
>>
>>
>>
>> If you like it, doc it! J
>>
>>
>>
>> -MC
>>
>>
>>
>> P.S. – for extra fun try this one:
>> http://192.168.1.1:8080/api/voicemail/web
>>
>>
>>
>>
>> ------------------------------
>>
>> *From:* freeswitch-users-bounces at lists.freeswitch.org [mailto:
>> freeswitch-users-bounces at lists.freeswitch.org] *On Behalf Of *Gayatri
>> Kulkarni
>> *Sent:* Tuesday, October 14, 2008 10:49 PM
>> *To:* freeswitch-users at lists.freeswitch.org
>> *Subject:* Re: [Freeswitch-users] HTTP methods
>>
>>
>>
>> great! I found an occurece of "webapi" in the documentation for mod_perl
>>
>> but, is this share generated when we install FS, or when we enable
>> mod_xm_rpc or something, because i can't find it created on my system. If
>> yes, what is it's default path?
>> Or, do I have to create it and implement the HTTP methods myself??
>>
>>
>> --
>> Regards,
>> Gayatri Kulkarni
>>
>> On Tue, Oct 14, 2008 at 6:49 PM, Anthony Minessale <
>> anthony.minessale at gmail.com> wrote:
>>
>> there is a special /api /webapi and /textapi share on the site that will
>> point at any api command doing GET or POST
>>
>> for instance:
>> /webapi/status
>>
>> I'm pretty sure it's documented somewhere.
>>
>> On Tue, Oct 14, 2008 at 6:57 AM, Gayatri Kulkarni <
>> xtpl.gayatri at gmail.com> wrote:
>>
>> Hi Guys,
>>
>> The XmlRpc is implemented from the web port - 8080
>> Can we also specify which HTTP methods FS implements - like GET, POST,
>> PUT, DELETE, etc ??
>> in xml_rpc.conf.xml or some place ....?
>> Is there a way to implement these?
>>
>> --
>> Regards,
>> Gayatri Kulkarni
>>
>>
>>
>> _______________________________________________
>> Freeswitch-users mailing list
>> Freeswitch-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>>
>>
>> --
>> Anthony Minessale II
>>
>> FreeSWITCH http://www.freeswitch.org/
>> ClueCon http://www.cluecon.com/
>>
>> AIM: anthm
>> MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
>> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
>> IRC: irc.freenode.net #freeswitch
>>
>> FreeSWITCH Developer Conference
>> sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
>> iax:guest at conference.freeswitch.org/888
>> googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
>> pstn:213-799-1400
>>
>>
>> _______________________________________________
>> Freeswitch-users mailing list
>> Freeswitch-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>>
>> _______________________________________________
>> Freeswitch-users mailing list
>> Freeswitch-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
--
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/
AIM: anthm
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20081015/a9fc39b3/attachment-0002.html
More information about the FreeSWITCH-users
mailing list