<div dir="ltr">file permission issue maybe (starting as different user)?<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 24, 2017 at 10:36 AM, zzy <span dir="ltr"><<a href="mailto:zzyroy@qq.com" target="_blank">zzyroy@qq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">Debian 8 </span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">FreeSWITCH (Version 1.6.15 -32-bec4538 64bit) </span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">1. Login Debian with root. </span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">2. Install the FS by apt-get. </span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">wget -O - </span><a href="https://files.freeswitch.org/repo/deb/debian/freeswitch_archive_g0.pub" style="color:rgb(59,115,175);text-decoration:none;font-family:Arial,sans-serif" target="_blank">https://files.freeswitch.<wbr>org/repo/deb/debian/<wbr>freeswitch_archive_g0.pub</a><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">| apt-key add - </span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">echo "deb </span><a href="http://files.freeswitch.org/repo/deb/freeswitch-1.6/" style="color:rgb(59,115,175);text-decoration:none;font-family:Arial,sans-serif" target="_blank">http://files.freeswitch.<wbr>org/repo/deb/freeswitch-1.6/</a><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">je<wbr>ssie main" > /etc/apt/sources.list.d/<wbr>freeswitch.list </span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">apt-get update && apt-get install -y freeswitch-meta-all </span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">3. Run fs_cli after install. </span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">4. </span><font face="Arial, sans-serif" color="#333333">I add a gateway in Freeswitch Portal. It will run a </font><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">run lua script [create_gateway.lua]. </span><font face="Arial, sans-serif" color="#333333">This lua script is from source code [/usr/src/freeswitch/scripts/<wbr>lua/portal/create_gateway.lua]<wbr>.</font><div><font face="Arial, sans-serif" color="#333333">I get an error message in fs_cli: </font></div><div><font face="Arial, sans-serif" color="#333333"><br></font></div><div><font face="Arial, sans-serif" color="#333333">2017-03-24 10:32:46.006528 [ERR] mod_lua.cpp:203 /usr/share/freeswitch/scripts/<wbr>portal/create_gateway.lua:13: attempt to index global 'conf_file' (a nil value) </font></div><div><font face="Arial, sans-serif" color="#333333">stack traceback: </font></div><div><font face="Arial, sans-serif" color="#333333"> /usr/share/freeswitch/scripts/<wbr>portal/create_gateway.lua:13: in main chunk</font></div><div><font face="Arial, sans-serif" color="#333333"><br></font></div><div><img src="cid:30FC8C7F@02E20D6E.E92ED558"></div><div><br></div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">5. Stop the FS with [systemctl stop freeswitch.service] command. </span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">6. Run [freeswitch -c] command set the FS in the foreground. </span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">7. </span><font face="Arial, sans-serif" color="#333333">I add a gateway in Freeswitch Portal</font><span style="color:rgb(51,51,51);font-family:Arial,sans-serif"> again</span><span style="color:rgb(51,51,51);font-family:Arial,sans-serif"> and get the correct result. </span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">8. I also try this</span><span style="color:rgb(51,51,51);font-family:Arial,sans-serif"> </span><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">after FS startup in the background ([freeswitch -nc] and [freeswitch -ncwait]). Get the same error as before. </span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">Who can tell me why the lua script does not working when FS startup with service mode and background mode? </span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><br style="color:rgb(51,51,51);font-family:Arial,sans-serif"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif">Thanks a lot! <br></span><br>______________________________<wbr>______________________________<wbr>_____________<br>
Professional FreeSWITCH Consulting Services:<br>
<a href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a href="http://www.freeswitchsolutions.com" rel="noreferrer" target="_blank">http://www.<wbr>freeswitchsolutions.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br>
<a href="http://confluence.freeswitch.org" rel="noreferrer" target="_blank">http://confluence.freeswitch.<wbr>org</a><br>
<a href="http://www.cluecon.com" rel="noreferrer" target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.<wbr>freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/<wbr>mailman/listinfo/freeswitch-<wbr>users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.<wbr>freeswitch.org/mailman/<wbr>options/freeswitch-users</a><br>
<a href="http://www.freeswitch.org" rel="noreferrer" target="_blank">http://www.freeswitch.org</a><br></blockquote></div><br></div>