<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0cm;
        margin-right:0cm;
        margin-bottom:0cm;
        margin-left:36.0pt;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:13239465;
        mso-list-type:hybrid;
        mso-list-template-ids:-204018976 -388856368 201916419 201916421 201916417 201916419 201916421 201916417 201916419 201916421;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Wingdings;}
@list l1
        {mso-list-id:449978112;
        mso-list-type:hybrid;
        mso-list-template-ids:2094287300 201916433 201916441 201916443 201916431 201916441 201916443 201916431 201916441 201916443;}
@list l1:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-18.0pt;}
@list l1:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-AU" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">To FreeSWITCH users,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I just noticed that since upgrading to FreeSWITCH 1.6.5 (on CentOS 6.7 or CentOS 7) that the Lua version is 5.1.4 (since when running yum install lua-devel the version installed is 5.1.4).<o:p></o:p></p>
<p class="MsoNormal">Also when I type: lua -v {it returns 5.1.4}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">In order to try to upgrade Lua inside FreeSWITCH to version 5.2.4 I followed this procedure:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">First I uninstalled lua-devel by typing: yum -y remove lua-devel<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Then I then installed off lua.org a later version (in this case 5.2.4, even though they are up to 5.3.2 now):<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l1 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">1)<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>cd /usr/local/src<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l1 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">2)<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>curl -R -O <a href="http://www.lua.org/ftp/lua-5.2.4.tar.gz">
http://www.lua.org/ftp/lua-5.2.4.tar.gz</a><o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l1 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">3)<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>cd lua-5.2.4<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l1 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">4)<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>make linux test<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l1 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">5)<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>make linux install<o:p></o:p></p>
<p class="MsoListParagraph" style="text-indent:-18.0pt;mso-list:l1 level1 lfo1"><![if !supportLists]><span style="mso-list:Ignore">6)<span style="font:7.0pt "Times New Roman"">
</span></span><![endif]>Tested by typing: lua -v (to check the version number) – All OK now reports 5.2.4 correctly<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Next I followed the instructions below from (7) to (13) {first I made sure the freeswitch directory was removed by typing rm -rf freeswitch from the /usr/local/src directory}<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Unfortunately, I received this error message from the FreeSWITCH make command:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">making all mod_lua<o:p></o:p></p>
<p class="MsoNormal">make[4]: Entering directory `/usr/local/src/freeswitch/src/mod/languages/mod_lua'<o:p></o:p></p>
<p class="MsoNormal"> CXXLD mod_lua.la<o:p></o:p></p>
<p class="MsoNormal">/usr/bin/ld: /usr/local/lib/liblua.a(lapi.o): relocation R_X86_64_32 against `luaO_nilobject_' can not be used when making a shared object; recompile with -fPIC<o:p></o:p></p>
<p class="MsoNormal">/usr/local/lib/liblua.a: could not read symbols: Bad value<o:p></o:p></p>
<p class="MsoNormal">collect2: ld returned 1 exit status<o:p></o:p></p>
<p class="MsoNormal">make[4]: *** [mod_lua.la] Error 1<o:p></o:p></p>
<p class="MsoNormal">make[4]: Leaving directory `/usr/local/src/freeswitch/src/mod/languages/mod_lua'<o:p></o:p></p>
<p class="MsoNormal">make[3]: *** [mod_lua-all] Error 1<o:p></o:p></p>
<p class="MsoNormal">make[3]: Leaving directory `/usr/local/src/freeswitch/src/mod'<o:p></o:p></p>
<p class="MsoNormal">make[2]: *** [all-recursive] Error 1<o:p></o:p></p>
<p class="MsoNormal">make[2]: Leaving directory `/usr/local/src/freeswitch/src'<o:p></o:p></p>
<p class="MsoNormal">make[1]: *** [all-recursive] Error 1<o:p></o:p></p>
<p class="MsoNormal">make[1]: Leaving directory `/usr/local/src/freeswitch'<o:p></o:p></p>
<p class="MsoNormal">make: *** [all] Error 2<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I found this was fixed by re-installing lua-devel via: yum –y install lua-devel<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">However now when I continue on and complete the make && make install then start FreeSWITCH I get this error:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">2015-12-02 15:19:22.341356 [CRIT] switch_loadable_module.c:1520 Error Loading module /usr/local/freeswitch/mod/mod_lua.so<o:p></o:p></p>
<p class="MsoNormal">**/usr/local/freeswitch/mod/mod_lua.so: undefined symbol: lua_callk**<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I assume this issue is now related to the fact that lua-devel is version 5.1.4 and the installed system wide Lua is 5.2.4.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Can anyone assist me in upgrading Lua to run Lua version 5.2.x within FreeSWITCH 1.6.5?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Please note the procedure below works fine and runs Lua at version 5.1.4.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">FreeSWITCH 1.6.5 on CentOS 6.7 setup instructions:<o:p></o:p></p>
<p class="MsoNormal">========================================================<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">1) Make sure yum update is run and CentOS is up-to-date<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">2) {optional} Inside Terminal window select Edit Profile Preferences and select "Use custom default terminal size" and make it 160 x 60. Close terminal and re-open for the change to take effect.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">3) yum -y install epel-release<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">4) yum -y install git gcc-c++ autoconf automake libtool wget python ncurses-devel zlib-devel libjpeg-devel openssl-devel sqlite-devel libcurl-devel libxml2-devel libidn-devel<o:p></o:p></p>
<p class="MsoNormal">4.1) These should be already installed and up-to-date<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">5) yum -y install e2fsprogs-devel pcre-devel speex-devel ldns-devel libedit-devel libyuv-devel opus-devel libvpx-devel unbound-devel libuuid-devel lua-devel libsndfile-devel<o:p></o:p></p>
<p class="MsoNormal">5.1) These should install successfully<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">6) Note: No packages for: libvpx2*, libdb4* (so mod_vpx & mod_fsv will not be supported)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">7) cd /usr/local/src<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">8) git clone -b v1.6 <a href="https://freeswitch.org/stash/scm/fs/freeswitch.git">
https://freeswitch.org/stash/scm/fs/freeswitch.git</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">9) cd /usr/local/src/freeswitch<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">10) ./bootstrap.sh<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">11) vi modules.conf<o:p></o:p></p>
<p class="MsoNormal">11.1) comment out (ie. place '#' infront):<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-indent:36.0pt">mod_fsv<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-indent:36.0pt">mod_vpx<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:36.0pt">Save and close (<Esc> :wq!)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">12) ./configure<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">13) make<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">14) make install<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">15) make cd-sounds-install<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">16) make cd-moh-install<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">17) cd /usr/local/freeswitch/conf<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">18) vi vars.xml<o:p></o:p></p>
<p class="MsoNormal">18.1) change: <X-PRE-PROCESS cmd="set" data="default_password=1234"/> { !! set it to something different !! }<o:p></o:p></p>
<p class="MsoNormal"> Save and close (<Esc> :wq!)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">19) cd /usr/local/freeswitch/conf/autoload_configs<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">20) vi modules.conf.xml<o:p></o:p></p>
<p class="MsoNormal">20.1) comment out (ie. place '<!--' infront and '-->' at the end):<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-indent:36.0pt">mod_fsv<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-indent:36.0pt">mod_vpx<o:p></o:p></p>
<p class="MsoNormal" style="text-indent:36.0pt">Save and close (<Esc> :wq!)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">21) cd /usr/local/freeswitch/bin<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">22) ./freeswitch -nonat -nonatmap<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">23) ... to exit from the FreeSWITCH console<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-AU">Kind Regards,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-AU"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-AU">Andrew Keil<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>