Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[Freeswitch-users] HTTP methods


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users
View previous topic :: View next topic  
Author Message
xtpl.gayatri at gmail.com
Guest





PostPosted: Tue Oct 14, 2008 7:12 am    Post subject: [Freeswitch-users] HTTP methods Reply with quote

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
Back to top
anthony.minessale at g...
Guest





PostPosted: Tue Oct 14, 2008 8:33 am    Post subject: [Freeswitch-users] HTTP methods Reply with quote

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@gmail.com (xtpl.gayatri@gmail.com)> wrote:
Quote:
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@lists.freeswitch.org (Freeswitch-users@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@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
xtpl.gayatri at gmail.com
Guest





PostPosted: Wed Oct 15, 2008 12:58 am    Post subject: [Freeswitch-users] HTTP methods Reply with quote

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@gmail.com (anthony.minessale@gmail.com)> wrote:
Quote:
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@gmail.com (xtpl.gayatri@gmail.com)> wrote:


Quote:

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@lists.freeswitch.org (Freeswitch-users@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@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Back to top
mcollins at fcnetwork.com
Guest





PostPosted: Wed Oct 15, 2008 1:41 am    Post subject: [Freeswitch-users] HTTP methods Reply with quote

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@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of Gayatri Kulkarni
Sent: Tuesday, October 14, 2008 10:49 PM
To: freeswitch-users@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@gmail.com (anthony.minessale@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@gmail.com (xtpl.gayatri@gmail.com)> wrote:

Quote:

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@lists.freeswitch.org (Freeswitch-users@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@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org
Back to top
xtpl.gayatri at gmail.com
Guest





PostPosted: Wed Oct 15, 2008 2:02 am    Post subject: [Freeswitch-users] HTTP methods Reply with quote

Hey Michael,
Thanks Smile 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@fcnetwork.com (mcollins@fcnetwork.com)> wrote:
Quote:

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@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org) [mailto:freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)] On Behalf Of Gayatri Kulkarni
Sent: Tuesday, October 14, 2008 10:49 PM
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@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@gmail.com (anthony.minessale@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@gmail.com (xtpl.gayatri@gmail.com)> wrote:

Quote:

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@lists.freeswitch.org (Freeswitch-users@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@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@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@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Back to top
anthony.minessale at g...
Guest





PostPosted: Wed Oct 15, 2008 8:36 am    Post subject: [Freeswitch-users] HTTP methods Reply with quote

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@gmail.com (xtpl.gayatri@gmail.com)> wrote:
Quote:
Hey Michael,
Thanks Smile 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@fcnetwork.com (mcollins@fcnetwork.com)> wrote:
Quote:

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@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org) [mailto:freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)] On Behalf Of Gayatri Kulkarni
Sent: Tuesday, October 14, 2008 10:49 PM
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@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@gmail.com (anthony.minessale@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@gmail.com (xtpl.gayatri@gmail.com)> wrote:

Quote:

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@lists.freeswitch.org (Freeswitch-users@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@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@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@lists.freeswitch.org (Freeswitch-users@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@lists.freeswitch.org (Freeswitch-users@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@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400
Back to top
xtpl.gayatri at gmail.com
Guest





PostPosted: Thu Oct 16, 2008 1:11 am    Post subject: [Freeswitch-users] HTTP methods Reply with quote

cool!
Thanks a lot guys, I had found a work around yesterday Smile
Using my work around also doesnt make things config specific!


--
Regards,
Gayatri Kulkarni

On Wed, Oct 15, 2008 at 6:47 PM, Anthony Minessale <anthony.minessale@gmail.com (anthony.minessale@gmail.com)> wrote:
Quote:
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@gmail.com (xtpl.gayatri@gmail.com)> wrote:
Quote:
Hey Michael,
Thanks Smile 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@fcnetwork.com (mcollins@fcnetwork.com)> wrote:
Quote:

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@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org) [mailto:freeswitch-users-bounces@lists.freeswitch.org (freeswitch-users-bounces@lists.freeswitch.org)] On Behalf Of Gayatri Kulkarni
Sent: Tuesday, October 14, 2008 10:49 PM
To: freeswitch-users@lists.freeswitch.org (freeswitch-users@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@gmail.com (anthony.minessale@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@gmail.com (xtpl.gayatri@gmail.com)> wrote:

Quote:

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@lists.freeswitch.org (Freeswitch-users@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@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400


_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@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@lists.freeswitch.org (Freeswitch-users@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@lists.freeswitch.org (Freeswitch-users@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@hotmail.com ([email]MSN%3Aanthony_minessale@hotmail.com[/email])
GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com ([email]PAYPAL%3Aanthony.minessale@gmail.com[/email])
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888@conference.freeswitch.org ([email]sip%3A888@conference.freeswitch.org[/email])
iax:guest@conference.freeswitch.org/888
googletalk:conf+888@conference.freeswitch.org ([email]googletalk%3Aconf%2B888@conference.freeswitch.org[/email])
pstn:213-799-1400




_______________________________________________
Freeswitch-users mailing list
Freeswitch-users@lists.freeswitch.org (Freeswitch-users@lists.freeswitch.org)
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> freeSWITCH Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services