2003-03-31 07:13:36 +00:00
|
|
|
Open H.323 Channel Driver for Asterisk
|
2003-05-26 11:48:11 +00:00
|
|
|
By Jeremy McNamara
|
|
|
|
For The NuFone Network
|
2003-03-31 07:13:36 +00:00
|
|
|
|
|
|
|
First public release on November 10th, 2002
|
|
|
|
|
2004-10-10 12:41:10 +00:00
|
|
|
Dependancies: openssl-0.9.6b+
|
|
|
|
openssl-devel-0.9.6b+
|
|
|
|
expat-1.95+
|
|
|
|
expat-dev-1.95+
|
2003-03-31 07:13:36 +00:00
|
|
|
|
2005-05-11 12:45:39 +00:00
|
|
|
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.
|
2003-05-26 11:48:11 +00:00
|
|
|
|
|
|
|
NOTICE: Whatever you do, DO NOT USE distrubution specific installs
|
2005-01-28 16:45:06 +00:00
|
|
|
of Open H.323 and PWLib. In fact, you should check to make sure
|
2004-10-10 12:41:10 +00:00
|
|
|
your distro did not install them for you without your knowledge.
|
2003-06-25 06:48:08 +00:00
|
|
|
|
2003-05-26 11:48:11 +00:00
|
|
|
|
2004-10-10 12:41:10 +00:00
|
|
|
To compile this code
|
|
|
|
--------------------
|
2005-04-29 04:30:51 +00:00
|
|
|
Once PWLib and Open H.323 have been compiled per their specific build
|
|
|
|
instructions, issue a make in the asterisk/channels/h323 directory with
|
|
|
|
argument used to build PWLib and OpenH323 (for example, make opt), then go
|
|
|
|
back to the Asterisk source top level directory and issue a make install.
|
2003-11-03 06:55:30 +00:00
|
|
|
|
2003-05-26 11:48:11 +00:00
|
|
|
|
2004-10-10 12:41:10 +00:00
|
|
|
The most common compile error
|
|
|
|
----------------------------
|
2003-11-19 22:53:22 +00:00
|
|
|
If you receive ANYTHING that says 'undefined symbol' you are experiencing
|
2003-05-26 11:48:11 +00:00
|
|
|
typical version skew. For example:
|
|
|
|
|
|
|
|
libh323_linux_x86_r.so.1: undefined symbol: GetNumberValueAt__C14PAbstractArrayi
|
|
|
|
|
|
|
|
You need to search and destroy every version of libh323 and libpt then
|
|
|
|
completely recompile everything
|
|
|
|
|
|
|
|
Example commands to make sure everything gets cleaned and then
|
|
|
|
rebult in proper order:
|
|
|
|
|
|
|
|
cd /path/to/pwlib
|
2004-05-16 16:10:56 +00:00
|
|
|
./configure
|
2003-05-26 11:48:11 +00:00
|
|
|
make clean opt
|
|
|
|
cd /path/to/openh323
|
2004-05-16 16:10:56 +00:00
|
|
|
./configure
|
2003-05-26 11:48:11 +00:00
|
|
|
make clean opt
|
2003-11-07 02:41:47 +00:00
|
|
|
cd /path/to/asterisk/channels/h323
|
2005-04-29 04:30:51 +00:00
|
|
|
make opt
|
2003-11-07 02:41:47 +00:00
|
|
|
cd /path/to/asterisk
|
|
|
|
make install
|
2003-05-26 11:48:11 +00:00
|
|
|
|
2003-03-31 07:13:36 +00:00
|
|
|
|
2004-08-31 17:38:41 +00:00
|
|
|
Most common run-time error
|
2004-10-10 12:41:10 +00:00
|
|
|
-------------------------
|
2003-05-26 11:48:11 +00:00
|
|
|
libpt_linux_x86_r.so.1: cannot open shared object file: No such
|
|
|
|
file or directory
|
|
|
|
|
|
|
|
You have not set the LD_LIBRARY_PATH environment variable.
|
|
|
|
|
|
|
|
Example environment for sh/bash:
|
|
|
|
|
|
|
|
PWLIBDIR=$HOME/pwlib
|
|
|
|
export PWLIBDIR
|
|
|
|
OPENH323DIR=$HOME/openh323
|
|
|
|
export OPENH323DIR
|
|
|
|
LD_LIBRARY_PATH=$PWLIBDIR/lib:$OPENH323DIR/lib
|
|
|
|
export LD_LIBRARY_PATH
|
|
|
|
|
|
|
|
We recomend puting the above directives into your /etc/profile so
|
|
|
|
you do not have to remember to export those values every time you
|
2004-09-21 15:52:42 +00:00
|
|
|
want to recompile. Make sure to logout and log back in, so your
|
|
|
|
envrionment can pick up the new variables.
|
2003-05-26 11:48:11 +00:00
|
|
|
|
2004-05-26 19:28:14 +00:00
|
|
|
|
2004-08-31 17:38:41 +00:00
|
|
|
Upgrading Asterisk
|
2004-10-10 12:41:10 +00:00
|
|
|
-----------------
|
2004-05-26 19:28:14 +00:00
|
|
|
After you cvs update (or make update) Asterisk you have to go into
|
2004-05-26 19:41:58 +00:00
|
|
|
asterisk/channels/h323 and issue a make clean all, before compiling the
|
2004-05-26 19:28:14 +00:00
|
|
|
rest of asterisk. Doing this process every time you upgrade Asterisk
|
|
|
|
will ensure a sane build.
|
|
|
|
|
|
|
|
|
2004-08-31 17:38:41 +00:00
|
|
|
Dialing an H.323 channel
|
2004-10-10 12:41:10 +00:00
|
|
|
------------------------
|
2004-08-31 17:50:41 +00:00
|
|
|
Without a gatekeeper:
|
2004-10-10 12:41:10 +00:00
|
|
|
exten => _1NXXNXXXXXX,1,Dial,H323/${EXTEN}@peer
|
|
|
|
or
|
|
|
|
exten => _1NXXNXXXXXX,1,Dial,H323/${EXTEN}@ip.or.hostname
|
2004-08-31 17:38:41 +00:00
|
|
|
|
2004-10-10 12:45:13 +00:00
|
|
|
'peer' is defined in h323.conf as:
|
2004-08-31 17:38:41 +00:00
|
|
|
|
2004-10-10 12:45:13 +00:00
|
|
|
[peer]
|
|
|
|
type=peer
|
|
|
|
host=1.2.3.4
|
|
|
|
disallow=all
|
|
|
|
allow=ulaw
|
|
|
|
|
|
|
|
Using a gatekeeper:
|
2004-08-31 17:38:41 +00:00
|
|
|
exten => _1NXXNXXXXXX,1,Dial,H323/${EXTEN}
|
|
|
|
|
2004-10-10 12:45:13 +00:00
|
|
|
When using a gatekeeper you cannot utilize the type=peer features,
|
2004-10-10 12:41:10 +00:00
|
|
|
since the H.323 spec states that when a Gatekeeper is part of an H.323 network,
|
|
|
|
the Gatekeeper shall be used for all communication.
|
2004-08-31 17:38:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
Developer Contact
|
2004-10-10 12:41:10 +00:00
|
|
|
----------------
|
|
|
|
If you have trouble contact 'JerJer' in #Asterisk on
|
|
|
|
irc.freenode.net and/or send reasonable debug information to support@nufone.net.
|
2004-08-31 17:38:41 +00:00
|
|
|
|
2004-10-10 12:41:10 +00:00
|
|
|
If are lucky enough to segfault this code please run a
|
|
|
|
backtrace and send the gory details. Segmentation faults are not
|
|
|
|
tolerated, no matter what Distro you run (even debian)!
|
2003-03-31 07:13:36 +00:00
|
|
|
|
2004-10-10 12:41:10 +00:00
|
|
|
a simple bt example:
|
2003-03-31 07:13:36 +00:00
|
|
|
|
|
|
|
# /usr/sbin/asterisk -vvvgc
|
|
|
|
...
|
|
|
|
[chan_h323.so]
|
|
|
|
Segmentation Fault (core dumped)
|
|
|
|
|
|
|
|
# ls core.*
|
|
|
|
core.1976
|
|
|
|
|
|
|
|
# gdb /usr/sbin/asterisk core.1976
|
2004-10-10 12:41:10 +00:00
|
|
|
...lots of useless garbage here...
|
2003-03-31 07:13:36 +00:00
|
|
|
(gdb) bt
|
|
|
|
|
|
|
|
Send whatever shows up right after the 'bt'
|
|
|
|
|
2003-05-26 11:48:11 +00:00
|
|
|
Also, a full debug screen output is almost needed. Make sure you are
|
2004-04-19 19:47:27 +00:00
|
|
|
in the full console mode (-c) and turn on 'h.323 debug' or worst case
|
2004-10-10 12:41:10 +00:00
|
|
|
senerio 'h.323 trace 4'. A nice way to capture debug info is with
|
|
|
|
script (man script).
|
2003-03-31 07:13:36 +00:00
|
|
|
|
2004-10-10 12:41:10 +00:00
|
|
|
If you are motivated to update/fix this code please submit a
|
|
|
|
disclaimer along with the patch to the Asterisk bug
|
|
|
|
tracker: http://bugs.digium.com/
|
2003-03-31 07:13:36 +00:00
|
|
|
|
2003-08-10 18:12:48 +00:00
|
|
|
|
|
|
|
Jeremy McNamara
|
2003-03-31 07:13:36 +00:00
|
|
|
The NuFone Network
|