Small little error with compiling h323 for Asterisk

Mates,

I’m building an Asterisk box for a customer, and they require h323 support, but have hit a small snag. I’ve compiled both pwlib and open323 successfully, but when I enter into /etc/asterisk/channels/h323 and issue make opt, I get this:

root@Asterisk h323# make opt
g++ -DNDEBUG -I…/…/include -Wmissing-prototypes -fPIC
-DP_LINUX=2.4.21-40.ELsmp -ffunction-sections -fdata-sections
-D_REENTRANT -DOPENSSL_NO_KRB5 -Wall -fPIC -DP_USE_PRAGMA
-DPHAS_TEMPLATES -I/usr/src/openh323/pwlib/include/ptlib/unix
-I/usr/include/pwlib -I/usr/src/openh323/pwlib/include -DPTRACING
-I/usr/src/openh323/openh323/include -DHAS_IXJ -DHAS_OSS -fPIC
-DP_USE_PRAGMA -Os -DNDEBUG -pipe -x c++ -c ast_h323.cxx -o ast_h323.o
In file included from …/…/include/asterisk/utils.h:35,
from …/…/include/asterisk/cdr.h:48,
from …/…/include/asterisk/channel.h:114,
from ast_h323.cxx:45:
…/…/include/asterisk/strings.h: In function int ast_strlen_zero (const char *)': ../../include/asterisk/strings.h:34: warning:always_inline’ attribute
directive ignored
In file included from …/…/include/asterisk/cdr.h:48,
from …/…/include/asterisk/channel.h:114,
from ast_h323.cxx:45:
…/…/include/asterisk/utils.h: In function void ast_slinear_saturated_add (short int *, short int *)': ../../include/asterisk/utils.h:173: warning:always_inline’ attribute
directive ignored
…/…/include/asterisk/utils.h: In function void ast_slinear_saturated_multiply (short int *, short int *)': ../../include/asterisk/utils.h:186: warning:always_inline’ attribute
directive ignored
…/…/include/asterisk/utils.h: In function void ast_slinear_saturated_divide (short int *, short int *)': ../../include/asterisk/utils.h:199: warning:always_inline’ attribute
directive ignored
…/…/include/asterisk/utils.h: In function int inaddrcmp (const sockaddr_in *, const sockaddr_in *)': ../../include/asterisk/utils.h:217: warning:always_inline’ attribute
directive ignored
In file included from ast_h323.cxx:51:
ast_h323.h: At top level:
ast_h323.h:159: type specifier omitted for parameter
ast_h323.h:159: parse error before *' ast_h323.cxx:957: type specifier omitted for parameter ast_h323.cxx:957: parse error before*‘
ast_h323.cxx: In method H323Channel *MyH323Connection::CreateRealTimeLogicalChannel (...)': ast_h323.cxx:959:capability’ undeclared (first use this function)
ast_h323.cxx:959: (Each undeclared identifier is reported only once for
each function it appears in.)
ast_h323.cxx:959: dir' undeclared (first use this function) ast_h323.cxx:959:sessionID’ undeclared (first use this function)
make: *** [ast_h323.o] Error 1

Could it be that I’m using a newer version of open323 than what was tested? Do you fellows have a suggestion on what I can do to prevent this error? Thanks much! 8)

what versions did you use ? and what version of Asterisk ?

/goes to see what version he is running !

for asterisk-1.2.10.1
in /${AST_SOURCE_DIR}/channels/h323/README line 12 and 13

[quote]
Tested with Open H.323 version v1.17.1, PWLib v1.9.0 and GCC v3.2.2. Usage of any other versions is not supported.[/quote]
Also installing PWLib and OpenH.323 reqires some environmental variables
I set them in /etc/profile and compile h.323 with no problem.

Thanks for your replies! I actually decided to compile ooh323c from obj-sys.com/open/ooh323c_kits.shtml instead, and it worked great. I can now dial into the customers Avaya system.

To resolve warning issues, you should upgrade your GCC/C++ compilers. 2.96 version coming with old RedHats does not fully support for always_inline option, so it warns about it.

Also, try to use chan_h323 coming with Asterisk 1.4 and up - it have many improvements over pre-1.4 versions, it is very stable and solid.

did someone just discover h323 and decide to bump every old thread they could find ? ffs !

Exactly. :wink: