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?