[Home]

Summary:ASTERISK-15444: [patch] Complile issue with h323plus 1.21.0 and pwlib 2.4.5
Reporter:warlock52 (warlock52)Labels:
Date Opened:2010-01-15 20:01:22.000-0600Date Closed:2011-06-07 14:08:12
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_h323
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) chan_h323.patch
( 1) chan_h323.patch2
( 2) chan_h323.patch3
Description:I cannot compile Asterisk 1.6.2.1 with following error:

checking /usr/src/pwlib/version.h usability... yes
checking /usr/src/pwlib/version.h presence... yes
checking for /usr/src/pwlib/version.h... yes
checking if PWLib version 2.4.5 is compatible with chan_h323... yes
checking PWLib installation validity... no

This leads to the following error and does not include H323 in the makefile:

checking h323.h usability... no
checking h323.h presence... no
checking for h323.h... no

I realize this must be a compatibility issue with PWLib ver 2.4.5 but this is the version that is recommended on the h323plus site to use with h323plus 1.21.0 and I need the NuFone H323 instead of the oh323 or ooh323 because this is the only one that works with the Nortel GK. Both of these packages and the asterisk h323 are compiled using "./configure" and "make opt".

Can anyone help or let me know what is missing to be able to compile Asterisk with the h323plus support?
Comments:By: warlock52 (warlock52) 2010-01-16 00:42:20.000-0600

I have now also tested with PTLib v 2.6.5 with the same result. I cannot get Asterisk to get through "./configure" without the H323 error.

By: warlock52 (warlock52) 2010-02-01 16:40:05.000-0600

will this be dealt with. I need the NuFone H.323 support for * 1.6.2X seing that I also need OpenR2 and this is natively supported in 1.6.2X.

By: Grzegorz (czelusc) 2010-04-13 03:16:57

Asterisk 1.6.2.7rc1, ptlib 2.6.5 and h323plus 1.21.0


You must export ptlib like that:
PWLIBDIR=/your/directory/ptlib-2.6.5 && export PWLIBDIR
and
OPENH323DIR=/your/directory/h323plus && export OPENH323DIR

after in menuconfig of asterisk you must select channel h323.

But when you will compile asterisk you will get errors chan.h323
then you must apply patch like (edit your directories):

diff -uNr a/root/asterisk-1.6.2.7-rc1/channels/h323/ast_h323.cxx /root/asterisk-1.6.2.7-rc1/channels/h323/ast_h323.cxx
--- /root/asterisk-1.6.2.7-rc1/channels/h323/ast_h323.cxx       2009-06-18 09:51:54.000000000 -0700
+++ /root/asterisk-1.6.2.7-rc1-h323/channels/h323/ast_h323.cxx  2009-09-17 13:42:40.000000000 -0700
@@ -2367,13 +2367,13 @@
/* Addition of functions just to make the channel driver compile with H323Plus */
#if VERSION(OPENH323_MAJOR, OPENH323_MINOR, OPENH323_BUILD) > VERSION(1,19,4)
/* Alternate RTP port information for Same NAT */
-BOOL MyH323_ExternalRTPChannel::OnReceivedAltPDU(const H245_ArrayOf_GenericInformation & alternate )
+PBoolean MyH323_ExternalRTPChannel::OnReceivedAltPDU(const H245_ArrayOf_GenericInformation & alternate )
{
       return TRUE;
}

/* Alternate RTP port information for Same NAT */
-BOOL MyH323_ExternalRTPChannel::OnSendingAltPDU(H245_ArrayOf_GenericInformation & alternate) const
+PBoolean MyH323_ExternalRTPChannel::OnSendingAltPDU(H245_ArrayOf_GenericInformation & alternate) const
{
       return TRUE;
}
@@ -2384,7 +2384,7 @@
}

/* Alternate RTP port information for Same NAT */
-BOOL MyH323_ExternalRTPChannel::OnReceivedAckAltPDU(const H245_ArrayOf_GenericInformation & alternate)
+PBoolean MyH323_ExternalRTPChannel::OnReceivedAckAltPDU(const H245_ArrayOf_GenericInformation & alternate)
{
       return TRUE;
}
diff -uNr /root/asterisk-1.6.2.7-rc1/channels/h323/ast_h323.h /root/asterisk-1.6.2.7-rc1/channels/h323/ast_h323.h
--- /root/asterisk-1.6.2.7-rc1/channels/h323/ast_h323.h 2009-03-17 13:52:54.000000000 -0700
+++ /root/asterisk-1.6.2.7-rc1-h323/channels/h323/ast_h323.h    2009-09-17 13:43:06.000000000 -0700
@@ -101,7 +101,7 @@
       virtual void OnReceivedLocalCallHold(int linkedId);
       virtual void OnReceivedLocalCallRetrieve(int linkedId);
#endif
-       void MyHoldCall(BOOL localHold);
+       void MyHoldCall(PBoolean localHold);

       PString sourceAliases;
       PString destAliases;
@@ -153,10 +153,10 @@
       PIPSocket::Address remoteIpAddr;
       /* Additional functions in order to have chan_h323 compile with H323Plus */
#if VERSION(OPENH323_MAJOR, OPENH323_MINOR, OPENH323_BUILD) > VERSION(1,19,4)
-       BOOL OnReceivedAltPDU(const H245_ArrayOf_GenericInformation & alternate );
-       BOOL OnSendingAltPDU(H245_ArrayOf_GenericInformation & alternate) const;
+       PBoolean OnReceivedAltPDU(const H245_ArrayOf_GenericInformation & alternate );
+       PBoolean OnSendingAltPDU(H245_ArrayOf_GenericInformation & alternate) const;
       void OnSendOpenAckAlt(H245_ArrayOf_GenericInformation & alternate) const;
-       BOOL OnReceivedAckAltPDU(const H245_ArrayOf_GenericInformation & alternate);
+       PBoolean OnReceivedAckAltPDU(const H245_ArrayOf_GenericInformation & alternate);
#endif
       WORD localPort;
       WORD remotePort;



But when I compiled asterisk and try run than I get error:

AGI Command 'speech unload grammar' registered
 == AGI Command 'speech activate grammar' registered
 == AGI Command 'speech deactivate grammar' registered
 == AGI Command 'speech recognize' registered
 == Registered application 'DeadAGI'
 == Registered application 'EAGI'
 == Manager registered action AGI
 == Registered application 'AGI'
res_agi.so => (Asterisk Gateway Interface (AGI))
Segmentation fault

Can anyone help what is wrong ?



By: warlock52 (warlock52) 2010-04-18 13:45:14

I have gone back to using H.323 1.19.7 beta and PTLIB 1.12.0 and at the moment the only issues I am having are that at times the Nortel GK looses our registration and unfortunately the only way to get it back is to restart asterisk completely. The "h323 gk cycle" does not work and at times locks up Asterisk completely.

Will there be anyone working on this at all? What other options do I have to get the H323 stack to work with a Nortel H.323 GK?

By: warlock52 (warlock52) 2010-04-18 14:01:08

I am currently using Asterisk 1.6.2.6 and Addons ver.1.6.2.0. I have seen in the realse notes somewhere that there was a H323 locking up Asterisk issue....but I canĀ“t find it any longer and wonder if anyone else has seen this dealt with somwhere and could tell me in which version this issue is taken care of. I might be able to to a regular script with the "h323 gk cycle" if this no longer locks up asterisk and solve my problem with the loosing registration with that!

By: warlock52 (warlock52) 2010-08-12 22:26:30

PING

By: Gregory Hinton Nietsky (irroot) 2011-02-14 05:31:24.000-0600

Hi there please find a patch to allow chan_h323 to work with h323+ 1.22 and ptlib 2.8.3.

the module loads and unloads with no segfaulting ...

By: Gregory Hinton Nietsky (irroot) 2011-02-14 05:32:59.000-0600

Please note that you need to run ./bootstrap.sh after installing h323+ to detect OPENH323_MAX set to 1.19 and will prevent configure from running

By: Gregory Hinton Nietsky (irroot) 2011-02-15 13:49:00.000-0600

Smaller cleaner patch but doubt its compatible with windows

By: Gregory Hinton Nietsky (irroot) 2011-02-18 09:07:56.000-0600

https://reviewboard.asterisk.org/r/1117/

By: Danilo Lotina F. (dlotina) 2011-02-21 09:43:38.000-0600

Hi, I've tested patch from reviewboard, (asterisk 1.6.2.16.1 , h323plus 1.21 and ptlib 2.4.2).  Patching almost clean, except for h323.conf  (removed).  Compile ok, test calls and work fine.  But if I unload  chan_h323 module an load it again asterisk crash.

By: Gregory Hinton Nietsky (irroot) 2011-02-21 10:46:00.000-0600

@dlotina thank you for the feed back i have noticed this and will investigate it further the patch on RB is against trunk thx for testing

By: Gregory Hinton Nietsky (irroot) 2011-03-02 08:25:09.000-0600

new patch has better handling of gatekeepers with the gatewayid config option and cli register gk command to wake up/reregister.

tested with 2 * boxes running gnugk across wifi calls working with LRQ

By: Jose P. Espinal (khratos) 2011-05-13 21:28:59

Is this patch (the No.3) compatible with 1.8.4 ?
I applied it, compiled, and ran asterisk OK., unloaded the module, but when loaded it again it Segfault!

uname -a
Linux eslackware 2.6.33.4-smp #2 SMP Wed May 12 22:47:36 CDT 2010 i686 Intel(R) Core(TM)2 Duo CPU     E4500  @ 2.20GHz GenuineIntel GNU/Linux

gcc -v:
Reading specs from /usr/lib/gcc/i486-slackware-linux/4.4.4/specs
Target: i486-slackware-linux
Configured with: ../gcc-4.4.4/configure --prefix=/usr --libdir=/usr/lib --enable-shared --enable-bootstrap --enable-languages=ada,c,c++,fortran,java,objc --enable-threads=posix --enable-checking=release --with-system-zlib --with-python-dir=/lib/python2.6/site-packages --disable-libunwind-exceptions --enable-__cxa_atexit --enable-libssp --with-gnu-ld --verbose --with-arch=i486 --target=i486-slackware-linux --build=i486-slackware-linux --host=i486-slackware-linux
Thread model: posix
gcc version 4.4.4 (GCC)

cat /etc/slackware-version:
Slackware 13.1.0

grep "OPENH323_VERSION" /usr/include/openh323/openh323buildopts.h | cut -f3 -d ' ' | sed -e 's/"//g' :
1.22.0

If you need any additional info, just let me know

By: Jose P. Espinal (khratos) 2011-05-13 21:59:13

I tried to stress Asterisk a little doing this:

for module in `ls -1 --file-type /usr/lib/asterisk/modules/`; do
    asterisk -rx "module unload $module";
    sleep 0.2;
    asterisk -rx "module load $module";
done

It always crashes trying to reload chan_h323.so

By: Gregory Hinton Nietsky (irroot) 2011-05-14 03:56:24

Yes this is a problem i am aware of have not been able to figure out the problem i have moved to ooh323 and put some work in there h323 will by all accounts be deprecated.

By: Jose P. Espinal (khratos) 2011-05-14 08:56:21

I see. Then I'll stop my efforts trying to deal with h323 and move along to ooh323.

If there's anything else that need to be tested, let me know.

By: Gregory Hinton Nietsky (irroot) 2011-05-14 09:04:04

there is some work been done to allow asterisk to work as a Hylafax server with t38modem package and ooh323 the gateway code im finishing off will allow t38 faxes onto dahdi/misdn lines that may intrest you.

thank you for your effort its most appreciated.

By: Jose P. Espinal (khratos) 2011-05-14 11:11:35

I'm willing to collaborate with testing but I've never worked with t38modem package.

I'll do further investigation on the subject and add that package to my test environment. I'll keep you updated.

Feel free to contact me at jpe [at] slackware-es [dot] com

In case someone finds it useful, here's a little set of tools that I'm using to set up the testing environment (Slackware Linux):
https://bitbucket.org/jespinal/slackbuilds/src

Regards,

By: Leif Madsen (lmadsen) 2011-05-16 14:22:53

Per the mailing list from irroot, the movement to h323plus work has been suspended in favor or work in chan_ooh323. I'm suspending this issue for now unless someone else wishes to take up the development cause.

By: Leif Madsen (lmadsen) 2011-05-16 14:23:00

http://svn.asterisk.org/svn/asterisk/team/irroot/h323_h323plus-trunk/