Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

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

[Freeswitch-users] system call inside lua


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





PostPosted: Mon Oct 04, 2021 9:47 am    Post subject: [Freeswitch-users] system call inside lua Reply with quote

Hi
I can run this query on linux cli:
mssql-cli -S 192.168.69.60 -d IVR_SH -U IVRSH1 -P IVRSH -Q "SELECT * FROM "dbo"."IVR_REQEST" "
but the same query inside lua script with os.execute does not work.
Itried:
-os.execute(' mssql-cli -S 192.168.69.60 -d IVR_SH -U IVRSH1 -P IVRSH -Q "SELECT * FROM "dbo"."IVR_REQEST" " ');
-os.execute([[ mssql-cli -S 192.168.69.60 -d IVR_SH -U IVRSH1 -P IVRSH -Q "SELECT * FROM "dbo"."IVR_REQEST" " ]]);


...

Please help.
Regards
M.Shirazi
Back to top
avi at avimarcus.net
Guest





PostPosted: Mon Oct 04, 2021 10:16 am    Post subject: [Freeswitch-users] system call inside lua Reply with quote

As far as I know, these are forked system calls. Freeswitch doesn't wait for a response.

Can you use an odbc handle for a Lua db query?

(I worked around it by having the results written to a file and using an api to read that file.)



On Mon, Oct 4, 2021, 5:27 PM Mehdi Shirazi <m.shirazi@gmail.com (m.shirazi@gmail.com)> wrote:

Quote:
Hi
I can run this query on linux cli:
mssql-cli -S 192.168.69.60 -d IVR_SH -U IVRSH1 -P IVRSH -Q "SELECT * FROM "dbo"."IVR_REQEST" "
but the same query inside lua script with os.execute does not work.
Itried:
-os.execute(' mssql-cli -S 192.168.69.60 -d IVR_SH -U IVRSH1 -P IVRSH -Q "SELECT * FROM "dbo"."IVR_REQEST" " ');
-os.execute([[ mssql-cli -S 192.168.69.60 -d IVR_SH -U IVRSH1 -P IVRSH -Q "SELECT * FROM "dbo"."IVR_REQEST" " ]]);


...

Please help.
Regards
M.Shirazi




_________________________________________________________________________

The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.
Build your next product on our scalable cloud platform.

Join our online community to chat in real time https://signalwire.community

Professional FreeSWITCH Services
sales@freeswitch.com (sales@freeswitch.com)
https://freeswitch.com

Official FreeSWITCH Sites
https://freeswitch.com/oss
https://freeswitch.org/confluence
https://cluecon.com

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
https://freeswitch.com
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