<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-8-i">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Awesome, trying Make Install on the libphonenumber source did help me to complete the phonenum.so build, I've copied it into the lib64/kamailio/modules and added it into my config file.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
But... the Kamailio service fails to start now. <span style="color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt;">I'm getting the following error logs:</span></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span>Apr 20 13:00:35 kamaillioegress kamailio[920]: ERROR: <core> [core/sr_module.c:582]: load_module(): could not open module </usr/local/kamailio-5.1/lib64/kamailio/modules/phonenum.so>: libphonenumber.so.8: cannot open shared object file:<br>
</span>
<div>Apr 20 13:00:35 kamaillioegress kamailio[920]: CRITICAL: <core> [core/cfg.y:3488]: yyerror_at(): parse error in config file /usr/local/kamailio-5.1/etc/kamailio/kamailio.cfg, line 241, column 12-24: failed to load module<br>
</div>
<div><br>
</div>
<div>Did anyone meet with this error before?</div>
<div>Should I even bother with building the libphonenumber sources, or maybe switch to the 'libphonenumber7' package that seems to be available for installation on my Ubuntu machine?</div>
<div><br>
</div>
<div>Edward</div>
<span></span><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Daniel-Constantin Mierla <miconda@gmail.com><br>
<b>Sent:</b> Monday, April 20, 2020 12:19 PM<br>
<b>To:</b> Edward Romanenco <edward@telemessage.com>; Kamailio (SER) - Users Mailing List <sr-users@lists.kamailio.org>; sr-users@lists.sip-router.org <sr-users@lists.sip-router.org><br>
<b>Subject:</b> Re: [SR-Users] How to install the PHONENUM module?</font>
<div> </div>
</div>
<div>
<p><br>
</p>
<div class="x_moz-cite-prefix">On 20.04.20 08:47, Edward Romanenco wrote:<br>
</div>
<blockquote type="cite">
<meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
<style>
<!--
@font-face
        {font-family:"Cambria Math"}
@font-face
        {font-family:Calibri}
p.x_MsoNormal, li.x_MsoNormal, div.x_MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        text-align:right;
        direction:rtl;
        unicode-bidi:embed;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif}
a:link, span.x_MsoHyperlink
        {color:blue;
        text-decoration:underline}
pre
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New"}
span.x_HTML
        {font-family:"Courier New"}
.x_MsoChpDefault
        {}
@page WordSection1
        {margin:72.0pt 90.0pt 72.0pt 90.0pt}
div.x_WordSection1
        {}
-->
</style>
<div class="x_WordSection1">
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
Ubuntu 16.04, doesn't seem like it, any idea on how should I be verifying it?</p>
</div>
</blockquote>
<p><br>
</p>
<p>Did you wanted to say that "doesn't seem to have it"? Referring to libphonenumber? Use "apt-cache search" to find out what packages are available. Ubuntu 16.04 is quite old, so I am not sure what is available there.<br>
</p>
<blockquote type="cite">
<div class="x_WordSection1">
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
 </p>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
As for the installation, I followed the process as it was written in their README page, what additional steps should I take to finalize the installation?</p>
</div>
</blockquote>
<p><br>
</p>
<p>I installed it from packages so far, but with the usual unix/linux way there should be a "make install" for proper installation.</p>
<p>Cheers,<br>
Daniel</p>
<p><br>
</p>
<blockquote type="cite">
<div class="x_WordSection1">
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
 </p>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
Edward</p>
<p class="x_MsoNormal" dir="RTL"><span dir="LTR"> </span></p>
<div style="border:none; border-top:solid
          #E1E1E1 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="x_MsoNormal" dir="RTL" style="border:none; padding:0cm"><b><span lang="HE" style="font-family:"Arial",sans-serif">מאת:
</span></b><span lang="HE" style="font-family:"Arial",sans-serif"><a href="mailto:miconda@gmail.com"><span dir="LTR" lang="EN-US" style="font-family:"Calibri",sans-serif">Daniel-Constantin Mierla</span></a><br>
<b>נשלח: </b>יום שני 20 אפריל 2020 09:45<br>
<b>אל: </b><a href="mailto:sr-users@lists.kamailio.org"><span dir="LTR" lang="EN-US" style="font-family:"Calibri",sans-serif">Kamailio (SER) - Users Mailing List</span></a><span dir="RTL"></span><span dir="RTL"></span>;
<a href="mailto:edward@telemessage.com"><span dir="LTR" lang="EN-US" style="font-family:"Calibri",sans-serif">Edward Romanenco</span></a><span dir="RTL"></span><span dir="RTL"></span>;
<a href="mailto:sr-users@lists.sip-router.org"><span dir="LTR" lang="EN-US" style="font-family:"Calibri",sans-serif">sr-users@lists.sip-router.org</span></a><br>
<b>נושא: </b></span><span dir="LTR">Re: [SR-Users] How to install the PHONENUM module</span><span dir="RTL"></span><span lang="HE" style="font-family:"Arial",sans-serif"><span dir="RTL"></span>?</span></p>
</div>
<p class="x_MsoNormal" dir="RTL"><span dir="LTR"> </span></p>
<p>Hello,</p>
<p> </p>
<p>what operating system do you use? Isn't the libphonenumber packaged there? Should be easier if you install from packages.</p>
<p> </p>
<p>Otherwise, have you installed the libphonenumber in the system? The commands shown suggest only compilation and testing in the source code library.</p>
<p> </p>
<p>On the other hand, not that kamailio 5.1 is out of maintenance time frame, you better start with 5.3 at this moment.</p>
<p> </p>
<p>Cheers,<br>
Daniel</p>
<p> </p>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
On 19.04.20 17:46, Edward Romanenco wrote:</p>
</div>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<span style="font-size:12.0pt; color:black">Hi, I'm trying to add the PHONENUM module into my Kamailio installation. For this, I've cloned the main branch of
<a href="https://github.com/google/libphonenumber/tree/master/cpp" title="https://github.com/google/libphonenumber/tree/master/cpp">
Libphonenumber</a> and followed the installation rules as they appear in the relevant README file:</span></p>
</div>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<i><span style="font-size:12.0pt; color:black">Building and testing the library</span></i><span style="font-size:12.0pt; color:black"></span></p>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<i><span style="font-size:12.0pt; color:black">--------------------------------</span></i><span style="font-size:12.0pt; color:black"></span></p>
</div>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<i><span style="font-size:12.0pt; color:black">  $ cd libphonenumber/cpp</span></i><span style="font-size:12.0pt; color:black"></span></p>
</div>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<i><span style="font-size:12.0pt; color:black">  $ mkdir build</span></i><span style="font-size:12.0pt; color:black"></span></p>
</div>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<i><span style="font-size:12.0pt; color:black">  $ cd build</span></i><span style="font-size:12.0pt; color:black"></span></p>
</div>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<i><span style="font-size:12.0pt; color:black">  $ cmake ..</span></i><span style="font-size:12.0pt; color:black"></span></p>
</div>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<i><span style="font-size:12.0pt; color:black">  $ make</span></i><span style="font-size:12.0pt; color:black"></span></p>
</div>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<i><span style="font-size:12.0pt; color:black">  $ ./libphonenumber_test</span></i><span style="font-size:12.0pt; color:black"></span></p>
</div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<span style="font-size:12.0pt; color:black">It all went through and the library was created, but when I try to make and install the module itself, I'm getting the following error. Looks like the library wasn't included in the building context, can you please
 lend me a hand and tell me how do I include it?</span></p>
</div>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<i><span style="font-size:12.0pt; color:black"><a href="mailto:root@kamaillioegress:/usr/local/src/kamailio-5.1/kamailio/src/modules/phonenum">root@kamaillioegress:/usr/local/src/kamailio-5.1/kamailio/src/modules/phonenum#</a> make</span></i><span style="font-size:12.0pt; color:black"></span></p>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<i><span style="font-size:12.0pt; color:black">Compiling cphonenumber.cpp</span></i><span style="font-size:12.0pt; color:black"></span></p>
</div>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<i><span style="font-size:12.0pt; color:black">g++ -fPIC -DPIC -g -funroll-loops -Wcast-align -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -Wall -Wno-write-strings -Wno-deprecated -Wno-unused-function -Wno-sign-compare -Wno-strict-aliasing
 -fPIC -DPIC -g -funroll-loops -Wcast-align -m64 -minline-all-stringops -falign-loops -ftree-vectorize -fno-strict-overflow -Wall  -DNAME='"kamailio"' -DVERSION='"5.2.0-dev6"' -DARCH='"x86_64"' -DOS='linux_' -DOS_QUOTED='"linux"' -DCOMPILER='"gcc 5.4.0"' -D__CPU_x86_64
 -D__OS_linux -DVERSIONVAL=5002000 -DCFG_DIR='"/usr/local/kamailio-5.1/etc/kamailio/"' -DRUN_DIR='"/var/run/kamailio/"' -DPKG_MALLOC -DSHM_MEM -DSHM_MMAP -DDNS_IP_HACK -DUSE_MCAST -DUSE_TCP -DDISABLE_NAGLE -DHAVE_RESOLV_RES -DUSE_DNS_CACHE -DUSE_DNS_FAILOVER
 -DUSE_DST_BLACKLIST -DUSE_NAPTR -DWITH_XAVP -DMEM_JOIN_FREE -DF_MALLOC -DQ_MALLOC -DTLSF_MALLOC -DDBG_SR_MEMORY -DUSE_TLS -DTLS_HOOKS -DUSE_CORE_STATS -DSTATISTICS -DMALLOC_STATS -DWITH_AS_SUPPORT -DUSE_SCTP -DFAST_LOCK -DADAPTIVE_WAIT -DADAPTIVE_WAIT_LOOPS=1024
 -DCC_GCC_LIKE_ASM -DHAVE_GETHOSTBYNAME2 -DHAVE_UNION_SEMUN -DHAVE_SCHED_YIELD -DHAVE_MSG_NOSIGNAL -DHAVE_MSGHDR_MSG_CONTROL -DHAVE_ALLOCA_H -DHAVE_TIMEGM -DHAVE_SCHED_SETSCHEDULER -DHAVE_IP_MREQN -DUSE_RAW_SOCKS -DHAVE_EPOLL -DHAVE_SIGIO_RT -DSIGINFO64_WORKARROUND
 -DUSE_FUTEX -DHAVE_SELECT  -I/opt/local/include -DKAMAILIO_MOD_INTERFACE -DMOD_NAME='"phonenum"' -c cphonenumber.cpp -o cphonenumber.o</span></i><span style="font-size:12.0pt; color:black"></span></p>
</div>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<i><span style="font-size:12.0pt; color:black">cphonenumber.cpp:24:65: fatal error: phonenumbers/geocoding/phonenumber_offline_geocoder.h: No such file or directory</span></i><span style="font-size:12.0pt; color:black"></span></p>
</div>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<i><span style="font-size:12.0pt; color:black">compilation terminated.</span></i><span style="font-size:12.0pt; color:black"></span></p>
</div>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<i><span style="font-size:12.0pt; color:black">Makefile:22: recipe for target 'cphonenumber.o' failed</span></i><span style="font-size:12.0pt; color:black"></span></p>
</div>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<i><span style="font-size:12.0pt; color:black">make: *** [cphonenumber.o] Error 1</span></i><span style="font-size:12.0pt; color:black"></span></p>
</div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<span style="font-size:12.0pt; color:black"> </span></p>
</div>
<div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<span style="font-size:12.0pt; color:black">Edward</span></p>
</div>
<p class="x_MsoNormal" style="text-align:left; direction:ltr; unicode-bidi:embed">
<br>
<br>
</p>
<pre>_______________________________________________</pre>
<pre>Kamailio (SER) - Users Mailing List</pre>
<pre><a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a></pre>
<pre><a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a></pre>
</blockquote>
<pre>-- </pre>
<pre>Daniel-Constantin Mierla -- <a href="http://www.asipto.com">www.asipto.com</a></pre>
<pre><a href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a></pre>
<p class="x_MsoNormal" dir="RTL"><span dir="LTR" style="font-size:10.0pt; font-family:"Courier New""> </span></p>
</div>
</blockquote>
<pre class="x_moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a class="x_moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
<a class="x_moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="x_moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a></pre>
</div>
</body>
</html>