Hi, Does anyone have a short guide or blog post on using the mod_httapi. The wiki page is a bit sparse on details of how to actually use this new module, and have not been able to make much progress with it. One of my main questions is what is the "action" property of the work element for. The wiki says it "Change the new target url." http://wiki.freeswitch.org/wiki/Mod_httapi But what does that mean? Thanks Tom
This is a critical need. I have had very little time to tinker with httapi and I never actually got that far into building an app. We definitely need people to offer example applications with comments and a blog post/tutorial would be a godsend. I know of someone who is working on httapi for a commercial operation and when he's done I'm hoping to look at his work for some inspiration so that I can add more complete examples. If anyone has used mod_httapi and can answer Tom's question please do so. I'm sure he'll wikify the knowledge you present. :) -MC On Sun, Apr 22, 2012 at 9:46 AM, Tom Parrott <tomp@tomp.co.uk> wrote:
Hi,
Does anyone have a short guide or blog post on using the mod_httapi.
The wiki page is a bit sparse on details of how to actually use this new module, and have not been able to make much progress with it.
One of my main questions is what is the "action" property of the work element for.
The wiki says it "Change the new target url."
http://wiki.freeswitch.org/wiki/Mod_httapi
But what does that mean?
Thanks Tom
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list 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
Not having touched it, it sounds like that means "change the URL that future httpapi requests [for this channel?] go to." Give that a shot? (Of note, unlike EVERY other dialplan app, lua, and other means of controlling the dialplan, mod_httapi has security settings profiles, limiting the permissions of what responses are possible. That means this can be exposed to users and they can do all sorts of crazy things like pass off who controls the script without (many) security concerns.) -Avi On Sun, Apr 22, 2012 at 8:30 PM, Michael Collins <msc@freeswitch.org> wrote:
This is a critical need. I have had very little time to tinker with httapi and I never actually got that far into building an app. We definitely need people to offer example applications with comments and a blog post/tutorial would be a godsend. I know of someone who is working on httapi for a commercial operation and when he's done I'm hoping to look at his work for some inspiration so that I can add more complete examples.
If anyone has used mod_httapi and can answer Tom's question please do so. I'm sure he'll wikify the knowledge you present. :)
-MC
On Sun, Apr 22, 2012 at 9:46 AM, Tom Parrott <tomp@tomp.co.uk> wrote:
Hi,
Does anyone have a short guide or blog post on using the mod_httapi.
The wiki page is a bit sparse on details of how to actually use this new module, and have not been able to make much progress with it.
One of my main questions is what is the "action" property of the work element for.
The wiki says it "Change the new target url."
http://wiki.freeswitch.org/wiki/Mod_httapi
But what does that mean?
Thanks Tom
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list 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
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list 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
Thanks Michael, yes will certainly help keep the page updated if any more info comes to light. Thanks Avi, when you say "future httpapi requests" do you think that is when the httapi application is executed again, or is it a type of 'callback' so that when that step in the dialplan is finished the HTTP API being called can instruct Freeswitch to perform another step in the dialplan. Tom On 22/04/12 17:46, Tom Parrott wrote:
Hi,
Does anyone have a short guide or blog post on using the mod_httapi.
The wiki page is a bit sparse on details of how to actually use this new module, and have not been able to make much progress with it.
One of my main questions is what is the "action" property of the work element for.
The wiki says it "Change the new target url."
http://wiki.freeswitch.org/wiki/Mod_httapi
But what does that mean?
Thanks Tom
mod_httapi works by querying a url to obtain the xml code to run. An example of such code is <document type="xml/freeswitch-httapi"> <params></params> <work> <execute application="info"></execute> <execute application="set" data="Kyle_test=Rock_on"></execute> <execute application="info"></execute> <execute application="transfer" data="9888"></execute> </work> </document> Where FreeSWITCH would fist run 'info' then (if permissions are set) set a new variable of 'Kyle_test' to the value of 'Rock_on'. FreeSWITCH would then run 'info' again and transfer to 9888. Just replace the execute with the action you want and confirm it is in the proper syntax according to http://wiki.freeswitch.org/wiki/Mod_httapi If I misunderstood stood your question and you were in fact asking how to call this from the dial plan, then use <action application="httapi" data="http://192.168.100.197/cgi-bin/test.cgi"/> where the url in data is the url that will provide the xml file. Kyle A. King Quentus Technologies, INC Cell: 703-635-9512 Work: 253-218-6030 Fax: 206-462-1861 Email: kyle.king@quentustech.com On 04/22/2012 10:51 AM, Tom Parrott wrote:
Thanks Michael, yes will certainly help keep the page updated if any more info comes to light.
Thanks Avi, when you say "future httpapi requests" do you think that is when the httapi application is executed again, or is it a type of 'callback' so that when that step in the dialplan is finished the HTTP API being called can instruct Freeswitch to perform another step in the dialplan.
Tom
On 22/04/12 17:46, Tom Parrott wrote:
Hi,
Does anyone have a short guide or blog post on using the mod_httapi.
The wiki page is a bit sparse on details of how to actually use this new module, and have not been able to make much progress with it.
One of my main questions is what is the "action" property of the work element for.
The wiki says it "Change the new target url."
http://wiki.freeswitch.org/wiki/Mod_httapi
But what does that mean?
Thanks Tom
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list 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
Hi Kyle, Thanks for your response. I wasn't being clear though. I understand that <action application="httapi" data="http://192.168.100.197/cgi-bin/test.cgi"/> in the dialplan will cause Freeswitch to retrieve the XML to perform work in the dialplan. However in the wiki http://wiki.freeswitch.org/wiki/Mod_httapi under the "Work Tag" section, each type of work describes two attributes: action and temp-action, described as "change the new target url" and "change url to submit to just for the next loop". What is the "loop" it is describing here, and is this a kind of 'callback' to the test.cgi allowing the application to keep control of the dialplan after it has sent the initial response? Thanks again Tom On 22/04/12 18:51, Tom Parrott wrote:
Thanks Michael, yes will certainly help keep the page updated if any more info comes to light.
Thanks Avi, when you say "future httpapi requests" do you think that is when the httapi application is executed again, or is it a type of 'callback' so that when that step in the dialplan is finished the HTTP API being called can instruct Freeswitch to perform another step in the dialplan.
Tom
On 22/04/12 17:46, Tom Parrott wrote:
Hi,
Does anyone have a short guide or blog post on using the mod_httapi.
The wiki page is a bit sparse on details of how to actually use this new module, and have not been able to make much progress with it.
One of my main questions is what is the "action" property of the work element for.
The wiki says it "Change the new target url."
http://wiki.freeswitch.org/wiki/Mod_httapi
But what does that mean?
Thanks Tom
It changes the url queried. The temp-action changes for that use only ie: that call. the action will change the url queried for a permanent (as long as freeswitch is up) basis. Does this answer your question? Kyle A. King Quentus Technologies, INC Cell: 703-635-9512 Work: 253-218-6030 Fax: 206-462-1861 Email: kyle.king@quentustech.com On 04/23/2012 09:21 AM, Tom Parrott wrote:
Hi Kyle,
Thanks for your response. I wasn't being clear though.
I understand that
<action application="httapi" data="http://192.168.100.197/cgi-bin/test.cgi"/> in the dialplan will cause Freeswitch to retrieve the XML to perform work in the dialplan.
However in the wiki http://wiki.freeswitch.org/wiki/Mod_httapi under the "Work Tag" section, each type of work describes two attributes:
action and temp-action, described as "change the new target url" and "change url to submit to just for the next loop".
What is the "loop" it is describing here, and is this a kind of 'callback' to the test.cgi allowing the application to keep control of the dialplan after it has sent the initial response?
Thanks again Tom
On 22/04/12 18:51, Tom Parrott wrote:
Thanks Michael, yes will certainly help keep the page updated if any more info comes to light.
Thanks Avi, when you say "future httpapi requests" do you think that is when the httapi application is executed again, or is it a type of 'callback' so that when that step in the dialplan is finished the HTTP API being called can instruct Freeswitch to perform another step in the dialplan.
Tom
On 22/04/12 17:46, Tom Parrott wrote:
Hi,
Does anyone have a short guide or blog post on using the mod_httapi.
The wiki page is a bit sparse on details of how to actually use this new module, and have not been able to make much progress with it.
One of my main questions is what is the "action" property of the work element for.
The wiki says it "Change the new target url."
http://wiki.freeswitch.org/wiki/Mod_httapi
But what does that mean?
Thanks Tom
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list 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
On Mon, Apr 23, 2012 at 10:03 AM, Kyle King <kyle.king@quentustech.com>wrote:
It changes the url queried. The temp-action changes for that use only ie: that call. the action will change the url queried for a permanent (as long as freeswitch is up) basis. Does this answer your question?
"that call" - does that mean "phone call" or "next HTTP request" or something else? :) -MC
Hi, I am also confused. Under what circumstances if the URL queried again? Is it initiated from another request from the "work" section or does it happen after the "work" section has been completed, then auto-changing the request url from the original request from the XML dialplan? Eg to execute an application it's stated: <execute application data action>*DATA*</execute> : Execute a FreeSWITCH app. ATTRS: application : The app to run action : Change url to submit to. temp-action : Change url to submit to. just for the next loop. data : Alternate source for app data *DATA* : The app data But what is meant by "the url to submit to" and "the next loop"? IE what submits a request (and what is submitted) and what is the loop? Does the loop in fact continue hitting the webserver until the CGI returns a <break> in its <work> Tag? Regards Alex On 23/04/12 18:03, Kyle King wrote:
It changes the url queried. The temp-action changes for that use only ie: that call. the action will change the url queried for a permanent (as long as freeswitch is up) basis. Does this answer your question?
Kyle A. King Quentus Technologies, INC Cell: 703-635-9512 Work: 253-218-6030 Fax: 206-462-1861 Email: kyle.king@quentustech.com
On 04/23/2012 09:21 AM, Tom Parrott wrote:
Hi Kyle,
Thanks for your response. I wasn't being clear though.
I understand that
<action application="httapi" data="http://192.168.100.197/cgi-bin/test.cgi"/> in the dialplan will cause Freeswitch to retrieve the XML to perform work in the dialplan.
However in the wiki http://wiki.freeswitch.org/wiki/Mod_httapi under the "Work Tag" section, each type of work describes two attributes:
action and temp-action, described as "change the new target url" and "change url to submit to just for the next loop".
What is the "loop" it is describing here, and is this a kind of 'callback' to the test.cgi allowing the application to keep control of the dialplan after it has sent the initial response?
Thanks again Tom
On 22/04/12 18:51, Tom Parrott wrote:
Thanks Michael, yes will certainly help keep the page updated if any more info comes to light.
Thanks Avi, when you say "future httpapi requests" do you think that is when the httapi application is executed again, or is it a type of 'callback' so that when that step in the dialplan is finished the HTTP API being called can instruct Freeswitch to perform another step in the dialplan.
Tom
On 22/04/12 17:46, Tom Parrott wrote:
Hi,
Does anyone have a short guide or blog post on using the mod_httapi.
The wiki page is a bit sparse on details of how to actually use this new module, and have not been able to make much progress with it.
One of my main questions is what is the "action" property of the work element for.
The wiki says it "Change the new target url."
http://wiki.freeswitch.org/wiki/Mod_httapi
But what does that mean?
Thanks Tom
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list 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
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list 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
-- This message is intended only for the addressee and may contain confidential information. Unless you are that person, you may not disclose its contents or use it in any way and are requested to delete the message along with any attachments and notify us immediately. "Transact" is operated by Integrated Financial Arrangements plc Domain House, 5-7 Singer Street, London EC2A 4BQ Tel: (020) 7608 4900 Fax: (020) 7608 5300 (Registered office: as above; Registered in England and Wales under number: 3727592) Authorised and regulated by the Financial Services Authority (entered on the FSA Register; number: 190856)
Every time the cgi returns work, once its completed, if the channel is still alive it resubmits to the url again endlessly looking for more work till you tell it to transfer away or hangup. If the tmp-action is present it submits to that url one time and subsequently goes back to the original. On Mon, Apr 23, 2012 at 12:43 PM, Alex Crow <acrow@integrafin.co.uk> wrote:
Hi,
I am also confused. Under what circumstances if the URL queried again? Is it initiated from another request from the "work" section or does it happen after the "work" section has been completed, then auto-changing the request url from the original request from the XML dialplan? Eg to execute an application it's stated:
<execute application data action>*DATA*</execute> : Execute a FreeSWITCH app. ATTRS: application : The app to run action : Change url to submit to. temp-action : Change url to submit to. just for the next loop. data : Alternate source for app data *DATA* : The app data
But what is meant by "the url to submit to" and "the next loop"? IE what submits a request (and what is submitted) and what is the loop? Does the loop in fact continue hitting the webserver until the CGI returns a <break> in its <work> Tag?
Regards
Alex
On 23/04/12 18:03, Kyle King wrote:
It changes the url queried. The temp-action changes for that use only ie: that call. the action will change the url queried for a permanent (as long as freeswitch is up) basis. Does this answer your question?
Kyle A. King Quentus Technologies, INC Cell: 703-635-9512 Work: 253-218-6030 Fax: 206-462-1861 Email: kyle.king@quentustech.com
On 04/23/2012 09:21 AM, Tom Parrott wrote:
Hi Kyle,
Thanks for your response. I wasn't being clear though.
I understand that
<action application="httapi" data="http://192.168.100.197/cgi-bin/test.cgi"/> in the dialplan will cause Freeswitch to retrieve the XML to perform work in the dialplan.
However in the wiki http://wiki.freeswitch.org/wiki/Mod_httapi under the "Work Tag" section, each type of work describes two attributes:
action and temp-action, described as "change the new target url" and "change url to submit to just for the next loop".
What is the "loop" it is describing here, and is this a kind of 'callback' to the test.cgi allowing the application to keep control of the dialplan after it has sent the initial response?
Thanks again Tom
On 22/04/12 18:51, Tom Parrott wrote:
Thanks Michael, yes will certainly help keep the page updated if any more info comes to light.
Thanks Avi, when you say "future httpapi requests" do you think that is when the httapi application is executed again, or is it a type of 'callback' so that when that step in the dialplan is finished the HTTP API being called can instruct Freeswitch to perform another step in the dialplan.
Tom
On 22/04/12 17:46, Tom Parrott wrote:
Hi,
Does anyone have a short guide or blog post on using the mod_httapi.
The wiki page is a bit sparse on details of how to actually use this new module, and have not been able to make much progress with it.
One of my main questions is what is the "action" property of the work element for.
The wiki says it "Change the new target url."
http://wiki.freeswitch.org/wiki/Mod_httapi
But what does that mean?
Thanks Tom
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list 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
Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list 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
-- This message is intended only for the addressee and may contain confidential information. Unless you are that person, you may not disclose its contents or use it in any way and are requested to delete the message along with any attachments and notify us immediately.
"Transact" is operated by Integrated Financial Arrangements plc Domain House, 5-7 Singer Street, London EC2A 4BQ Tel: (020) 7608 4900 Fax: (020) 7608 5300 (Registered office: as above; Registered in England and Wales under number: 3727592) Authorised and regulated by the Financial Services Authority (entered on the FSA Register; number: 190856)
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server http://www.cudatel.com
Official FreeSWITCH Sites http://www.freeswitch.org http://wiki.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list 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/ Twitter: http://twitter.com/FreeSWITCH_wire AIM: anthm MSN:anthony_minessale@hotmail.com GTALK/JABBER/PAYPAL:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@conference.freeswitch.org googletalk:conf+888@conference.freeswitch.org pstn:+19193869900
Antony, that is awesome. I was hoping it worked like that. That means that my app can make dynamic decisions (like time routing with with timezone support) by it requesting for more work at the end of the initial dialplan. Cheers Tom
Hi Kyle,
Thanks for your response. I wasn't being clear though.
I understand that
<action application="httapi" data="http://192.168.100.197/cgi-bin/test.cgi"/> in the dialplan will cause Freeswitch to retrieve the XML to perform work in the dialplan.
However in the wiki http://wiki.freeswitch.org/wiki/Mod_httapi under the "Work Tag" section, each type of work describes two attributes:
action and temp-action, described as "change the new target url" and "change url to submit to just for the next loop".
What is the "loop" it is describing here, and is this a kind of 'callback' to the test.cgi allowing the application to keep control of the dialplan after it has sent the initial response?
Thanks again Tom
On 22/04/12 18:51, Tom Parrott wrote:
Thanks Michael, yes will certainly help keep the page updated if any more info comes to light.
Thanks Avi, when you say "future httpapi requests" do you think that is when the httapi application is executed again, or is it a type of 'callback' so that when that step in the dialplan is finished the HTTP API being called can instruct Freeswitch to perform another step in the dialplan.
Tom
On 22/04/12 17:46, Tom Parrott wrote:
Hi,
Does anyone have a short guide or blog post on using the mod_httapi.
The wiki page is a bit sparse on details of how to actually use this new module, and have not been able to make much progress with it.
One of my main questions is what is the "action" property of the work element for.
The wiki says it "Change the new target url."
http://wiki.freeswitch.org/wiki/Mod_httapi
But what does that mean?
Thanks Tom
participants (6)
-
Alex Crow
-
Anthony Minessale
-
Avi Marcus
-
Kyle King
-
Michael Collins
-
Tom Parrott