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

Gilbert Amar gamar at center.com
Tue Feb 5 03:35:07 MSK 2013


Hello Steve and Anton

 

I re-test the whole thing on the current trunk of opal (opal and ptlib of
3.13.0 and 2.13.0)

After patching mod_opal.h for the ep directory

I still need to do 

#define HAVE_T38 0.

or mod_opal won't build.

 

I end up as Anton with 3.13.0 and 2.13.0 but when running FS and doing the
same call to a SIP extension I have a crash.

 

I added this info to jira too.

 

see below the crash:

 

2013-02-04 09:23:57.437000 [DEBUG] switch_core_session.c:975 Send signal
sofia/internal/sip:1000 at 192.168.1.159:5062 [BREAK]

2013-02-04 09:23:57.437000 [DEBUG] switch_core_session.c:975 Send signal
sofia/internal/sip:1000 at 192.168.1.159:5062 [BREAK]

2013-02-04 09:23:57.437000 [DEBUG] sofia.c:5574 Channel
sofia/internal/sip:1000 at 192.168.1.159:5062 entering state [proceeding][180]

2013-02-04 09:23:57.437000 [NOTICE] sofia.c:5666 Ring-Ready
sofia/internal/sip:1000 at 192.168.1.159:5062!

2013-02-04 09:23:57.437000 [INFO] call.cxx:569
{PExternalT...dcfa8cc700,0000000000003} Call     OpenSourceMediaStreams open
for audio session 1 on Call[C15f030215]-EP<fs>[L118812736]

2013-02-04 09:23:57.437000 [INFO] call.cxx:751
{PExternalT...dcfa8cc700,0000000000003} Call     Selected media formats
G.711-ALaw-64k -> G.711-ALaw-64k

2013-02-04 09:23:57.457007 [INFO] mod_opal.cpp:1340
{PExternalT...dcfa8cc700,0000000000003} mod_opal    opal/h323:1000
initialised write audio codec G.711-ALaw-64k for connection
FSMediaStream[0x2883900]-Source-G.711-ALaw-64k

2013-02-04 09:23:57.457007 [INFO] manager.cxx:991
{PExternalT...dcfa8cc700,0000000000003} OpalMan       OnOpenMediaStream
Call[C15f030215]-EP<fs>[L118812736],FSMediaStream[0x2883900]-Source-G.711-AL
aw-64k

2013-02-04 09:23:57.457007 [INFO] connection.cxx:756
{PExternalT...dcfa8cc700,0000000000003} OpalCon    Opened source stream
C15f030215_1 with format G.711-ALaw-64k

2013-02-04 09:23:57.457007 [INFO] h323caps.cxx:2447
{PExternalT...dcfa8cc700,0000000000003} H323        Found capability:
G.711-ALaw-64k <12>

2013-02-04 09:23:57.457007 [INFO] manager.cxx:983
{PExternalT...dcfa8cc700,0000000000003} OpalMan       Media transfer mode
set to forwarding for audio, from
Call[C15f030215]-EP<h323>[tcp$192.168.1.100:3232/27285] to
Call[C15f030215]-EP<fs>[L118812736]

2013-02-04 09:23:57.457007 [INFO] rtp_session.cxx:1931
{PExternalT...dcfa8cc700,0000000000003} RTP_UDP  Session 1, Set remote
control address, new=192.168.1.100:0, old=0.0.0.0:0-0, local=0.0.0.0:0-0

2013-02-04 09:23:57.457007 [INFO] rtp_session.cxx:1785
{PExternalT...dcfa8cc700,0000000000003} RTP_UDP  Session 1 opened:
192.168.1.11:5004-5005 ssrc=3991155494

2013-02-04 09:23:57.457007 [INFO] h323rtp.cxx:64
{PExternalT...dcfa8cc700,0000000000003} H323RTP        Transmitter created
using session 1

2013-02-04 09:23:57.457007 [ALERT] assert.cxx:113
{PExternalT...dcfa8cc700,0000000000003} PTLib Assertion fail: Null pointer
reference, file /usr/local/src/opaltrunk/src/h323/h323.cxx, line 4072,
Error=107

Assertion fail: Null pointer reference, file
/usr/local/src/opaltrunk/src/h323/h323.cxx, line 4072, Error=107

 

<A>bort, <C>ore dump, <I>gnore? 2013-02-04 09:23:59.277003 [DEBUG]
switch_core_session.c:975 Send signal
sofia/internal/sip:1000 at 192.168.1.159:5062 [BREAK]

2013-02-04 09:23:59.277003 [DEBUG] switch_core_session.c:975 Send signal
sofia/internal/sip:1000 at 192.168.1.159:5062 [BREAK]

2013-02-04 09:23:59.277003 [DEBUG] sofia.c:5574 Channel
sofia/internal/sip:1000 at 192.168.1.159:5062 entering state [completing][200]

2013-02-04 09:23:59.277003 [DEBUG] sofia.c:5585 Remote SDP:

 

 

Gilbert

 

 

From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Steven
Ayre
Sent: Monday, February 04, 2013 4:55 AM
To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] building mod_opal and v1.2stable

 

I found this on the opal mailing list archive:

 

 
 
The "endpoint" files (local, IVR, PCSS etc) were moved to an ep 
directory. It is not "one level higher".
 
So if you had #include <opal/localep.h> it is now #include <ep/localep.h>

 

So it looks like this is an actual change in the opal library and mod_opal
will need to be patched.

 

I've added that info to the Jira ticket
http://jira.freeswitch.org/browse/FS-5054.

 

I think that part may have been easy to overlook as the Jira title says it
builds ok and the header issue is buried within the description of the
instability problems. Possibly it should've had its own Jira separate to the
crash.

 

-Steve

 

 

 

On 4 February 2013 11:42, Anton Rostotskiy <rostotskiy.a at gmail.com> wrote:

Hi Gilbert,

I built mod_opal on CentOS 6.3 x86_64 and FS 1.2 stable after all, using
opal and ptlib of 3.13.0 and 2.13.0 versions, but have the same problem as
you described.

 

 

2013/1/27 Gilbert Amar <gamar at center.com>

Hello,

 

I did fill two Jira bugs, one for mod_323 and another for mod_opal.

Just wanted to remind that since those two do not work, at least for me,
there is no more any support in FS 1.2 stable for H323.

 

So I ask again did someone succeeded in having any of those 2 working  with
1.2 stable on a Linux platform ?

 

Gilbert

 

From: freeswitch-users-bounces at lists.freeswitch.org
[mailto:freeswitch-users-bounces at lists.freeswitch.org] On Behalf Of Michael
Collins
Sent: Friday, January 25, 2013 12:28 PM


To: FreeSWITCH Users Help
Subject: Re: [Freeswitch-users] building mod_opal and v1.2stable

 

Gilbert,

Thank you for collecting all of this information. You did quite a bit of
work and that will help the developers figure out what's going on. Would you
mind creating a ticket at jira.freeswitch.org and adding all this
information? That will help the developers keep track of the issue and avoid
any unnecessary delays.

Thanks!
-MC

On Thu, Jan 24, 2013 at 10:25 AM, Gilbert Amar <gamar at center.com> wrote:

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

 


_________________________________________________________________________
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




-- 
Michael S Collins
Twitter: @mercutioviz
http://www.FreeSWITCH.org
http://www.ClueCon.com
http://www.OSTAG.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/20130204/2236b9a0/attachment-0001.html 


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