Passing credentials when invoking "curl"
I am trying to use curl from a lua script to get data from a webservice and need to pass user/password information. Can someone help me with this? Here is what I am doing, which does not seem to work. api = freeswitch.API() agent_status_url = "-u userid:password http://mywebservice.com:8080/status/agent/test" response = api:execute("curl", agent_status_url) freeswitch.consoleLog("INFO", response) Thanks
Hi If it is a basic authentication, you can try http://userid:password@mywebservice.com:8080/status/agent/test not sure it works try first a direct from command line : curl "http://userid:password@mywebservice.com:8080/status/agent/test" Gilbert From: freeswitch-users-bounces@lists.freeswitch.org [mailto:freeswitch-users-bounces@lists.freeswitch.org] On Behalf Of JP Sent: Thursday, January 24, 2013 11:50 AM To: FreeSWITCH Users Help Subject: [Freeswitch-users] Passing credentials when invoking "curl" I am trying to use curl from a lua script to get data from a webservice and need to pass user/password information. Can someone help me with this? Here is what I am doing, which does not seem to work. api = freeswitch.API() agent_status_url = "-u userid:password http://mywebservice.com:8080/status/agent/test" response = api:execute("curl", agent_status_url) freeswitch.consoleLog("INFO", response) Thanks
Thanks Gilbert. That worked for me. -JP On Thu, Jan 24, 2013 at 12:04 PM, Gilbert Amar <gamar@center.com> wrote:
Hi ****
If it is a basic authentication, you can try ****
http://userid:password@mywebservice.com:8080/status/agent/test****
** **
not sure it works try first a direct from command line :****
** **
curl "http://userid:password@mywebservice.com:8080/status/agent/test" ****
** **
Gilbert****
** **
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *JP *Sent:* Thursday, January 24, 2013 11:50 AM *To:* FreeSWITCH Users Help *Subject:* [Freeswitch-users] Passing credentials when invoking "curl"****
** **
I am trying to use curl from a lua script to get data from a webservice and need to pass user/password information. Can someone help me with this? Here is what I am doing, which does not seem to work.****
** **
api = freeswitch.API()****
agent_status_url = "-u userid:password http://mywebservice.com:8080/status/agent/test"****
response = api:execute("curl", agent_status_url)****
freeswitch.consoleLog("INFO", response)****
** **
Thanks****
** **
_________________________________________________________________________ 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
Awesome! Now it's time to pay the wiki tax! :) -MC On Thu, Jan 24, 2013 at 1:45 PM, JP <jaykris@gmail.com> wrote:
Thanks Gilbert. That worked for me. -JP
On Thu, Jan 24, 2013 at 12:04 PM, Gilbert Amar <gamar@center.com> wrote:
Hi ****
If it is a basic authentication, you can try ****
http://userid:password@mywebservice.com:8080/status/agent/test****
** **
not sure it works try first a direct from command line :****
** **
curl "http://userid:password@mywebservice.com:8080/status/agent/test" *** *
** **
Gilbert****
** **
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *JP *Sent:* Thursday, January 24, 2013 11:50 AM *To:* FreeSWITCH Users Help *Subject:* [Freeswitch-users] Passing credentials when invoking "curl"*** *
** **
I am trying to use curl from a lua script to get data from a webservice and need to pass user/password information. Can someone help me with this? Here is what I am doing, which does not seem to work.****
** **
api = freeswitch.API()****
agent_status_url = "-u userid:password http://mywebservice.com:8080/status/agent/test"****
response = api:execute("curl", agent_status_url)****
freeswitch.consoleLog("INFO", response)****
** **
Thanks****
** **
_________________________________________________________________________ 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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
MC, I sure am willing to pay the wiki tax :-). Since I am pretty new to this stuff, can you point me to some place that explains what I need to do? Thanks JP On Fri, Jan 25, 2013 at 12:29 PM, Michael Collins <msc@freeswitch.org>wrote:
Awesome! Now it's time to pay the wiki tax! :)
-MC
On Thu, Jan 24, 2013 at 1:45 PM, JP <jaykris@gmail.com> wrote:
Thanks Gilbert. That worked for me. -JP
On Thu, Jan 24, 2013 at 12:04 PM, Gilbert Amar <gamar@center.com> wrote:
Hi ****
If it is a basic authentication, you can try ****
http://userid:password@mywebservice.com:8080/status/agent/test****
** **
not sure it works try first a direct from command line :****
** **
curl "http://userid:password@mywebservice.com:8080/status/agent/test" ** **
** **
Gilbert****
** **
*From:* freeswitch-users-bounces@lists.freeswitch.org [mailto: freeswitch-users-bounces@lists.freeswitch.org] *On Behalf Of *JP *Sent:* Thursday, January 24, 2013 11:50 AM *To:* FreeSWITCH Users Help *Subject:* [Freeswitch-users] Passing credentials when invoking "curl"** **
** **
I am trying to use curl from a lua script to get data from a webservice and need to pass user/password information. Can someone help me with this? Here is what I am doing, which does not seem to work.****
** **
api = freeswitch.API()****
agent_status_url = "-u userid:password http://mywebservice.com:8080/status/agent/test"****
response = api:execute("curl", agent_status_url)****
freeswitch.consoleLog("INFO", response)****
** **
Thanks****
** **
_________________________________________________________________________ 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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.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
On Fri, Jan 25, 2013 at 1:56 PM, JP <jaykris@gmail.com> wrote:
I sure am willing to pay the wiki tax :-). Since I am pretty new to this stuff, can you point me to some place that explains what I need to do?
Go to http://www.freeswitch.org/ and click on the "Donate" button. -- Steve
Also, wiki.freeswitch.org Sign up for an account. Then go to the page where you were looking for this information and edit the page to include this information. Let me know if you have any questions. -MC On Fri, Jan 25, 2013 at 2:38 PM, Steven Schoch < schoch+freeswitch.org@xwin32.com> wrote:
On Fri, Jan 25, 2013 at 1:56 PM, JP <jaykris@gmail.com> wrote:
I sure am willing to pay the wiki tax :-). Since I am pretty new to this stuff, can you point me to some place that explains what I need to do?
Go to http://www.freeswitch.org/ and click on the "Donate" button.
-- Steve
_________________________________________________________________________ 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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
Thanks, I have requested for an account. As soon as I get it I will update the mod-curl page with this info. -JP On Fri, Jan 25, 2013 at 3:27 PM, Michael Collins <msc@freeswitch.org> wrote:
Also,
wiki.freeswitch.org
Sign up for an account. Then go to the page where you were looking for this information and edit the page to include this information.
Let me know if you have any questions.
-MC
On Fri, Jan 25, 2013 at 2:38 PM, Steven Schoch < schoch+freeswitch.org@xwin32.com> wrote:
On Fri, Jan 25, 2013 at 1:56 PM, JP <jaykris@gmail.com> wrote:
I sure am willing to pay the wiki tax :-). Since I am pretty new to this stuff, can you point me to some place that explains what I need to do?
Go to http://www.freeswitch.org/ and click on the "Donate" button.
-- Steve
_________________________________________________________________________ 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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.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
Okay, go for it! Thanks, MC On Fri, Jan 25, 2013 at 3:40 PM, JP <jaykris@gmail.com> wrote:
Thanks, I have requested for an account. As soon as I get it I will update the mod-curl page with this info.
-JP
On Fri, Jan 25, 2013 at 3:27 PM, Michael Collins <msc@freeswitch.org>wrote:
Also,
wiki.freeswitch.org
Sign up for an account. Then go to the page where you were looking for this information and edit the page to include this information.
Let me know if you have any questions.
-MC
On Fri, Jan 25, 2013 at 2:38 PM, Steven Schoch < schoch+freeswitch.org@xwin32.com> wrote:
On Fri, Jan 25, 2013 at 1:56 PM, JP <jaykris@gmail.com> wrote:
I sure am willing to pay the wiki tax :-). Since I am pretty new to this stuff, can you point me to some place that explains what I need to do?
Go to http://www.freeswitch.org/ and click on the "Donate" button.
-- Steve
_________________________________________________________________________ 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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.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
_________________________________________________________________________ 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
-- Michael S Collins Twitter: @mercutioviz http://www.FreeSWITCH.org http://www.ClueCon.com http://www.OSTAG.org
participants (4)
-
Gilbert Amar
-
JP
-
Michael Collins
-
Steven Schoch