Lua not working when FS start with background mode[freeswitch -nc]
Debian 8 FreeSWITCH (Version 1.6.15 -32-bec4538 64bit) 1. Login Debian with root. 2. Install the FS by apt-get. wget -O - https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub| apt-key add - echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/jessie main" > /etc/apt/sources.list.d/freeswitch.list apt-get update && apt-get install -y freeswitch-meta-all 3. Run fs_cli after install. 4. I add a gateway in Freeswitch Portal. It will run a run lua script [create_gateway.lua]. This lua script is from source code [/usr/src/freeswitch/scripts/lua/portal/create_gateway.lua].I get an error message in fs_cli: 2017-03-24 10:32:46.006528 [ERR] mod_lua.cpp:203 /usr/share/freeswitch/scripts/portal/create_gateway.lua:13: attempt to index global 'conf_file' (a nil value) stack traceback: /usr/share/freeswitch/scripts/portal/create_gateway.lua:13: in main chunk 5. Stop the FS with [systemctl stop freeswitch.service] command. 6. Run [freeswitch -c] command set the FS in the foreground. 7. I add a gateway in Freeswitch Portal again and get the correct result. 8. I also try this after FS startup in the background ([freeswitch -nc] and [freeswitch -ncwait]). Get the same error as before. Who can tell me why the lua script does not working when FS startup with service mode and background mode? Thanks a lot!
file permission issue maybe (starting as different user)? On Fri, Mar 24, 2017 at 10:36 AM, zzy <zzyroy@qq.com> wrote:
Debian 8 FreeSWITCH (Version 1.6.15 -32-bec4538 64bit)
1. Login Debian with root. 2. Install the FS by apt-get. wget -O - https://files.freeswitch.org/repo/deb/debian/ freeswitch_archive_g0.pub| apt-key add - echo "deb http://files.freeswitch.org/repo/deb/freeswitch-1.6/jessie main" > /etc/apt/sources.list.d/freeswitch.list apt-get update && apt-get install -y freeswitch-meta-all 3. Run fs_cli after install. 4. I add a gateway in Freeswitch Portal. It will run a run lua script [create_gateway.lua]. This lua script is from source code [/usr/src/freeswitch/scripts/lua/portal/create_gateway.lua]. I get an error message in fs_cli:
2017-03-24 10:32:46.006528 [ERR] mod_lua.cpp:203 /usr/share/freeswitch/scripts/portal/create_gateway.lua:13: attempt to index global 'conf_file' (a nil value) stack traceback: /usr/share/freeswitch/scripts/portal/create_gateway.lua:13: in main chunk
5. Stop the FS with [systemctl stop freeswitch.service] command. 6. Run [freeswitch -c] command set the FS in the foreground. 7. I add a gateway in Freeswitch Portal again and get the correct result. 8. I also try this after FS startup in the background ([freeswitch -nc] and [freeswitch -ncwait]). Get the same error as before.
Who can tell me why the lua script does not working when FS startup with service mode and background mode?
Thanks a lot!
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.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
participants (2)
-
Abaci B
-
zzy