Hello, Putting the complete path worked. I honestly didn't think of that because they are in the same directory. Thanks. On Sat, Dec 5, 2020 at 5:37 PM mayamatakeshi <mayamatakeshi@gmail.com> wrote:
On Sun, Dec 6, 2020 at 3:42 AM Joli Martinez <mrjoli021@gmail.com> wrote:
Hello,
It is not a permissions issue. I have changed the permissions to rw for everyone and it will still not read the file.
The password.json file is in the same directory as the script /usr/share/freeswitch/script. I am using lua 5.2.3 and again, the same code works in my home directory. I just copied the password.json file over and pasted the function into my code. When I place the call freeswitch prints "Inside the function", so I know it gets there, but then freeswitch spits out "attempt to index local 'file' (a nil value)"
What else could I be missing?
Hi, when I check the current folder inside the fs cli I get:
*freeswitch@lab002> system pwd* */*
So, if you use:
*f = "password.json"local file = io.open(f, "r")*
freeswitch would try to open "/password.json" So I think you should pass the full file path: f = "/usr/share/freeswitch/script/password.json"
_________________________________________________________________________
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 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 http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users https://freeswitch.com