<div dir="ltr">Hello,<div><br></div><div>Putting the complete path worked.  I honestly didn't think of that because they are in the same directory.</div><div><br></div><div>Thanks.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Dec 5, 2020 at 5:37 PM mayamatakeshi <<a href="mailto:mayamatakeshi@gmail.com">mayamatakeshi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 6, 2020 at 3:42 AM Joli Martinez <<a href="mailto:mrjoli021@gmail.com" target="_blank">mrjoli021@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hello,<div><br></div><div>It is not a permissions issue.  I have changed the permissions to rw for everyone and it will still not read the file.  </div><div><br></div><div>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  "<span style="color:rgb(202,51,35);font-family:Menlo;font-size:11px">attempt to index local 'file' (a nil value)</span>"</div><div><br></div><div>What else could I be missing?</div><div></div></div></div></div></blockquote><div> </div><div>Hi, </div><div>when I check the current folder inside the fs cli I get:</div><div><br></div><div><i>freeswitch@lab002> system pwd</i></div><i>/</i><br><br></div><div class="gmail_quote">So, if you use:</div><div class="gmail_quote"><br></div><div class="gmail_quote"><i>f = "password.json"<br>local file = io.open(f, "r")<br></i></div><div class="gmail_quote"><br></div><div class="gmail_quote">freeswitch would try to open "/password.json"</div><div class="gmail_quote">So I think you should pass the full file path:</div><div class="gmail_quote">f = "/usr/share/freeswitch/script/password.json"<br></div><div class="gmail_quote"><br></div></div>
_________________________________________________________________________<br>
<br>
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
Build your next product on our scalable cloud platform.<br>
<br>
Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div>