I need to call an http URL with some Post parameters from lua script and set some channel variables based on response data received. Which module will be best from performance point of view?
Interesting question. I would also like to know this information from experts. I use mod_curl because of syntax, because you can use same knowledge from FS dialplan. 2016-03-09 13:23 GMT+01:00 John Nash <john.nash778@gmail.com>:
I need to call an http URL with some Post parameters from lua script and set some channel variables based on response data received. Which module will be best from performance point of view?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
-- Gregor Nanger *CTO* t./f.: 00386 (0) 7 6000 308/309 • m:. 00386 (0)41 756485 • Infomedia d.o.o. • Jerebova 3, Novo mesto, Slovenia • www.infomedia.si
Those things aren't even alike, they solve different problems. Just call the http url yourself from your lua script then. On Wed, Mar 9, 2016 at 6:23 AM, John Nash <john.nash778@gmail.com> wrote:
I need to call an http URL with some Post parameters from lua script and set some channel variables based on response data received. Which module will be best from performance point of view?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
-- *Brian West* brian@freeswitch.org *Twitter: @FreeSWITCH , @briankwest* http://www.freeswitchbook.com http://www.freeswitchcookbook.com https://www.gofundme.com/freeswitch_ubuntu Got Bugs? Report them here <https://freeswitch.org/jira>! | Reddit: /r/freeswitch <https://www.reddit.com/r/freeswitch> *T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
well as per documentation mod_curl looks straight forward, what do you mean by "Just call the http url yourself from your lua script then"? On Wed, Mar 9, 2016 at 7:53 PM, Brian West <brian@freeswitch.org> wrote:
Those things aren't even alike, they solve different problems. Just call the http url yourself from your lua script then.
On Wed, Mar 9, 2016 at 6:23 AM, John Nash <john.nash778@gmail.com> wrote:
I need to call an http URL with some Post parameters from lua script and set some channel variables based on response data received. Which module will be best from performance point of view?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
--
*Brian West* brian@freeswitch.org
*Twitter: @FreeSWITCH , @briankwest* http://www.freeswitchbook.com http://www.freeswitchcookbook.com https://www.gofundme.com/freeswitch_ubuntu
Got Bugs? Report them here <https://freeswitch.org/jira>! | Reddit: /r/freeswitch <https://www.reddit.com/r/freeswitch>
*T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
mod_curl is perhaps a misleading name (the fact it uses curl internally is irrelevant). It’s better to think of it as mod_load_config_by_http. If you’re executing Lua code just perform the HTTP request directly from Lua, using Lua libraries and Lua code, then set variables, from Lua code. -Michael From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of John Nash Sent: Wednesday, 9 March, 2016 9:06 To: FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> Subject: Re: [Freeswitch-users] mod_curl or mod_httapi well as per documentation mod_curl looks straight forward, what do you mean by "Just call the http url yourself from your lua script then"? On Wed, Mar 9, 2016 at 7:53 PM, Brian West <brian@freeswitch.org<mailto:brian@freeswitch.org>> wrote: Those things aren't even alike, they solve different problems. Just call the http url yourself from your lua script then. On Wed, Mar 9, 2016 at 6:23 AM, John Nash <john.nash778@gmail.com<mailto:john.nash778@gmail.com>> wrote: I need to call an http URL with some Post parameters from lua script and set some channel variables based on response data received. Which module will be best from performance point of view? _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto: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 -- Brian West brian@freeswitch.org<mailto:brian@freeswitch.org> [http://billing.freeswitch.org/templates/default/img/whmcslogo.png] Twitter: @FreeSWITCH , @briankwest http://www.freeswitchbook.com http://www.freeswitchcookbook.com https://www.gofundme.com/freeswitch_ubuntu Got Bugs? Report them here<https://freeswitch.org/jira>! | Reddit: /r/freeswitch<https://www.reddit.com/r/freeswitch> T:+19184209001 | F:+19184209002 | M:+1918424WEST (9378) iNUM:+883 5100 1420 9001 | ISN:410*543 | Skype:briankwest _________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org<mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org<mailto: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
+1 For mod_load_config_by_http :) On Mar 9, 2016 11:58, "Michael Giagnocavo" <mgg@giagnocavo.net> wrote:
mod_curl is perhaps a misleading name (the fact it uses curl internally is irrelevant). It’s better to think of it as mod_load_config_by_http. If you’re executing Lua code just perform the HTTP request directly from Lua, using Lua libraries and Lua code, then set variables, from Lua code.
-Michael
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *John Nash *Sent:* Wednesday, 9 March, 2016 9:06 *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Subject:* Re: [Freeswitch-users] mod_curl or mod_httapi
well as per documentation mod_curl looks straight forward, what do you mean by "Just call the http url yourself from your lua script then"?
On Wed, Mar 9, 2016 at 7:53 PM, Brian West <brian@freeswitch.org> wrote:
Those things aren't even alike, they solve different problems. Just call the http url yourself from your lua script then.
On Wed, Mar 9, 2016 at 6:23 AM, John Nash <john.nash778@gmail.com> wrote:
I need to call an http URL with some Post parameters from lua script and set some channel variables based on response data received. Which module will be best from performance point of view?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
--
*Brian West* brian@freeswitch.org
*Twitter: @FreeSWITCH , @briankwest* http://www.freeswitchbook.com http://www.freeswitchcookbook.com https://www.gofundme.com/freeswitch_ubuntu
Got Bugs? Report them here <https://freeswitch.org/jira>! | Reddit: /r/freeswitch <https://www.reddit.com/r/freeswitch>
*T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
What exactly do you think mod_xml_curl is? LOL On Wed, Mar 9, 2016 at 11:22 AM, SamyGo <govoiper@gmail.com> wrote:
+1 For mod_load_config_by_http :) On Mar 9, 2016 11:58, "Michael Giagnocavo" <mgg@giagnocavo.net> wrote:
mod_curl is perhaps a misleading name (the fact it uses curl internally is irrelevant). It’s better to think of it as mod_load_config_by_http. If you’re executing Lua code just perform the HTTP request directly from Lua, using Lua libraries and Lua code, then set variables, from Lua code.
-Michael
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *John Nash *Sent:* Wednesday, 9 March, 2016 9:06 *To:* FreeSWITCH Users Help <freeswitch-users@lists.freeswitch.org> *Subject:* Re: [Freeswitch-users] mod_curl or mod_httapi
well as per documentation mod_curl looks straight forward, what do you mean by "Just call the http url yourself from your lua script then"?
On Wed, Mar 9, 2016 at 7:53 PM, Brian West <brian@freeswitch.org> wrote:
Those things aren't even alike, they solve different problems. Just call the http url yourself from your lua script then.
On Wed, Mar 9, 2016 at 6:23 AM, John Nash <john.nash778@gmail.com> wrote:
I need to call an http URL with some Post parameters from lua script and set some channel variables based on response data received. Which module will be best from performance point of view?
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
--
*Brian West* brian@freeswitch.org
*Twitter: @FreeSWITCH , @briankwest* http://www.freeswitchbook.com http://www.freeswitchcookbook.com https://www.gofundme.com/freeswitch_ubuntu
Got Bugs? Report them here <https://freeswitch.org/jira>! | Reddit: /r/freeswitch <https://www.reddit.com/r/freeswitch>
*T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
-- *Brian West* brian@freeswitch.org *Twitter: @FreeSWITCH , @briankwest* http://www.freeswitchbook.com http://www.freeswitchcookbook.com https://www.gofundme.com/freeswitch_ubuntu Got Bugs? Report them here <https://freeswitch.org/jira>! | Reddit: /r/freeswitch <https://www.reddit.com/r/freeswitch> *T:*+19184209001 | *F:*+19184209002 | *M:*+1918424WEST (9378) *iNUM:*+883 5100 1420 9001 | *ISN:*410*543 | *Skype:*briankwest
participants (5)
-
Brian West
-
Gregor Nanger
-
John Nash
-
Michael Giagnocavo
-
SamyGo