[Freeswitch-users] building mod_opal and v1.2stable

Gilbert Amar gamar at center.com
Thu Jan 24 21:25:11 MSK 2013


Hello,

 

I succeeded in building mod_opal, but it crash FreeSWITCH (segmentation
default) after simple test.

 

Here are the steps on Debian "squeeze".

After getting all required packages including swig

 

Advice,  check that you do not have any version of ptlib or h323plus or opal
already somewhere.

use find /- name "*libpt*.so"

use find /- name "*libopal*.so"

 

 

 

My FreeSWITCH is in /usr/local/src/ and I am root when I build.

 

cd /usr/local/src/

svn co
https://opalvoip.svn.sourceforge.net/svnroot/opalvoip/ptlib/tags/v2_12_0/
ptlib-2.12.0

 

cd /usr/local/src/ptlib-2.12.0

./configure  --disable-plugins --disable-v4l2 --prefix=/opt/lib

make && make install

 

export PKG_CONFIG_PATH=/opt/lib/lib/pkgconfig 

 

 

cd /usr/local/src/

svn co
https://opalvoip.svn.sourceforge.net/svnroot/opalvoip/opal/tags/v3_12_0
opal-3.12.0

 

cd /usr/local/src/opal-3.12.0

./configure --disable-plugins --prefix=/opt/lib

make && make install

 

 

As the install fails to copy include/ep/

 

cd /usr/local/src/opal-3.12.0

mkdir -p /opt/lib/include/opal/ep ; chmod 755 /opt/lib/include/opal/ep ; (
for fn in include/ep/*.h ; do /usr/bin/install -c -m 644 $fn
/opt/lib/include/opal/ep ; done);

 

Please notice that the mkdir line is one long line.

 

Add mod_opal to your modules.conf

 

Go to your mod_opal src dir in my case 

cd /usr/local/src/freeswitch/src/mod/endpoints/mod_opal

 

Edit mod_opal.h

You need to change 2 lines

 

#include <opal/localep.h> 

to

#include <ep/localep.h>

 

then 

#define HAVE_T38 (OPAL_CHECK_VERSION(3,11,2) && OPAL_T38_CAPABILITY)

to

#define HAVE_T38 0

 

 

Now you can build mod_opal type make 

Go back to your FS dir and do make and make install to check all is ok.

Before launch FreeSWITCH you need to set LD_LIBRARY_PATH

 

export LD_LIBRARY_PATH=/opt/lib/lib

start your FreeSWITCH 

 

Then try to call extension 9197 it should work despite the errors lines like


2013-01-24 03:12:25.597058 [WARNING] switch_core_codec.c:802 Codec is not
initialized!

2013-01-24 03:12:25.597058 [WARNING] switch_core_codec.c:802 Codec is not
initialized!

2013-01-24 03:12:25.597058 [ERR] switch_core_timer.c:117 Timer is not
properly configured.

 

In my case I have a sip phone registered to FS at extension 1000

If I call from openphone this extension

the call get thru, I pick up but mod_opal isn't  aware of this and when I
hang up on the sip phone FreeSWITCH crash.

 

 

Segmentation fault      /opt/freeswitch-v1.2stable/bin/freeswitch -conf
/home/center/freeswitch/conf -log /home/center/freeswitch/log -db
/home/center/freeswitch/db -sounds /home/center/freeswitch/sounds -nonat
-nonatmap

 

 

Gilbert

 

From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Steven
Ayre
Sent: Wednesday, January 23, 2013 3:26 AM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] building mod_opal and v1.2stable

 

Do you mean you built opal in /root/opal? You shouldn't build things as
root, but that's not the reason for your troubles.

 

I have to say I'm a bit puzzled, it looks like you've installed opal to
multiple locations.

 

/usr/local/freeswitch/opal looks the best match (opal/localep.h) but it's in
the wrong location.

 

/usr/local/src/freeswitch/libs/opal/include/ep/localep.h

Not sure why it's installed here, opal isn't shipped under libs/

 

/usr/local/include/ep/localep.h

/usr/include/ep/localep.h

Close but the directory is wrong as it needs to be opal/localep.h, not
ep/localep.h

 

/usr/include/opal/localep.h

Should be the correct filename, but you don't have a copy.

 

It could be a change in the opal library but I find that unlikely since it'd
break apps using the library like FS. More likely there's a problem with the
prefixes given to opal's configure command.

 

-Steve

 

 

 

On 23 January 2013 10:46, Anton Rostotskiy <rostotskiy.a at gmail.com> wrote:

Search results:

 

/usr/local/freeswitch/opal/include/opal/localep.h

/usr/local/src/freeswitch/libs/opal/include/ep/localep.h

/usr/local/include/ep/localep.h

/usr/include/ep/localep.h

/root/opal/include/ep/localep.h

 

As I  said earlier, I installed ptlib and opal in /root directory.

 

2013/1/23 Steven Ayre <steveayre at gmail.com>

It's localep.h, not local.h:

/usr/local/src/freeswitch/src/mod/endpoints/mod_opal/mod_opal.h:41:26:
error: opal/localep.h: No such file or directory

 

find / -name localep.h

 

Sorry, seems my phone did an annoying autouncorrection!

 

-Steve

 

 

 

On 23 January 2013 08:16, Anton Rostotskiy <rostotskiy.a at gmail.com> wrote:

Thanks for reply, Steven!

Tried to search local.h file, but search returned nothing. That are all
local.h files in my system:

 

/usr/local/src/freeswitch/libs/spandsp/src/gsm0610_local.h

/usr/local/src/freeswitch/libs/spandsp/src/t30_local.h

/usr/local/src/freeswitch/libs/spandsp/src/t42_t43_local.h

 

About -devel packages - at first tried to install ptlib, opal and -devel
from yum but their versions have been too low for mod_opal.

 

2013/1/22 Steven Ayre <steveayre at gmail.com>

Run:

find / -name local.h

 

It's failing to include opal/local.h. All the other errors are because its
missing the definitions in that file.

 

Normally I would say to instal the -devel package, but since you built from
svn that doesn't apply. Perhaps it's not installed or installed to the wrong
place. The find command will tell us where that file is.


Steve on iPhone


On 22 Jan 2013, at 16:07, Anton Rostotskiy <rostotskiy.a at gmail.com> wrote:

Also tried to install mod_opal and also failed.

CentOS 6.3 x86_64

ptlib and opal are  the last version obtained from svn as it is said in wiki
<http://wiki.freeswitch.org/wiki/Mod_opal> .

but just a bunch of errors after make mod_opal http://pastebin.com/HHUPLCLV

 

2013/1/18 Steven Ayre <steveayre at gmail.com>

The latest version of opal in Debian (even in Sid) isn't new enough for
mod_opal. It needed various features added that are only only available in
the svn version.

 

The wiki page states you have to install ptlib and opal from svn - this is
why.

http://wiki.freeswitch.org/wiki/Mod_opal

Of course that can then cause conflicts unless you package it yourself or
install a dummy package, or problems with other libraries/apps that are
built against the libopal that's already packaged.

 

Ptlib and h323plus/opal are also notorious for having to get matching
versions. If you don't pair exactly the right version of ptlib with the
specific version of h323plus/opal you can get instability problems. So the
official Debian ptlib package probably wouldn't be good with opal from
svn...

 

As for mod_h323, it does compile and work, at least on Wheezy and possibly
Squeeze too. I've never had any luck getting mod_opal working but have got
mod_h323 working. I don't actively use it though - all my traffic is
currently SIP.

 

Another option is to run Yate as a SIP->H323 proxy. It only handles the
signalling, media still goes directly caller->FS. It worked quite well,
although it would occasionally crash - but at least that only dropped the
H323 calls and didn't take FS down with it, and Yate automatically
restarted. That was on Lenny so a long time ago...


Steve on iPhone

 

 


On 17 Jan 2013, at 20:54, "Gilbert Amar" <gamar at center.com> wrote:

Hi,

I am trying to build mod_opal in FS v1.2stable, using ptlib 2.10.7 and opal
3.10.7 on a debian 
Ptlib and opal get build with no error, but when trying mod_opal I get 

Compiling
/usr/local/src/freeswitch/src/mod/endpoints/mod_opal/mod_opal.cpp...
quiet_libtool: compile:  g++ -g -ggdb
-I/usr/local/src/freeswitch/libs/curl/include
-I/usr/local/src/freeswitch/src/include
-I/usr/local/src/freeswitch/src/include
-I/usr/local/src/freeswitch/libs/libteletone/src
-I/usr/local/src/freeswitch/libs/stfu -fPIC -fvisibility=hidden
-DSWITCH_API_VISIBILITY=1 -DHAVE_VISIBILITY=1 -g -O2 -D_GNU_SOURCE -DP_64BIT
-DPTRACING=1 -D_REENTRANT -D_GNU_SOURCE=1 -fno-exceptions
-I/usr/local/include -I/usr/local/include/opal -I/usr/include/SDL
-DHAVE_CONFIG_H -c
/usr/local/src/freeswitch/src/mod/endpoints/mod_opal/mod_opal.cpp  -fPIC
-DPIC -o .libs/mod_opal.o
/usr/local/src/freeswitch/src/mod/endpoints/mod_opal/mod_opal.cpp: In member
function 'switch_status_t FSConnection::read_frame(const OpalMediaType&,
switch_frame_t**, switch_io_flag_t)':
/usr/local/src/freeswitch/src/mod/endpoints/mod_opal/mod_opal.cpp:1208:
error: 'class OpalCall' has no member named 'IsSwitchingT38'
/usr/local/src/freeswitch/src/mod/endpoints/mod_opal/mod_opal.cpp: In member
function 'switch_status_t FSConnection::write_frame(const OpalMediaType&,
const switch_frame_t*, switch_io_flag_t)':
/usr/local/src/freeswitch/src/mod/endpoints/mod_opal/mod_opal.cpp:1225:
error: 'class OpalCall' has no member named 'IsSwitchingT38'
make[3]: *** [mod_opal.lo] Error 1
make[2]: *** [install] Error 1
make[1]: *** [mod_opal-install] Error 1
make: *** [mod_opal-install] Error 2


Has anyone succeded in building mod_opal ?

Should I go with mod_h323 instead ?

Thanks for your help





_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org
http://www.freeswitchsolutions.com




Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org
http://www.freeswitchsolutions.com




Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org





 

-- 
С уважением, Антон Ростоцкий 

_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org
http://www.freeswitchsolutions.com




Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org
http://www.freeswitchsolutions.com




Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org





 

-- 
С уважением, Антон Ростоцкий 


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org
http://www.freeswitchsolutions.com




Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

 


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org
http://www.freeswitchsolutions.com




Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org





 

-- 
С уважением, Антон Ростоцкий 


_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting at freeswitch.org
http://www.freeswitchsolutions.com




Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com

FreeSWITCH-users mailing list
FreeSWITCH-users at lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130124/a3a22f22/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: freeswitch.log.bz2
Type: application/octet-stream
Size: 19330 bytes
Desc: not available
Url : http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130124/a3a22f22/attachment-0001.obj 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list