H323 channel module

From Yate Documentation
Jump to: navigation, search

This module supports H.323 protocol by using the OpenH323 library.

The configuration file for this module is h323chan.conf.

Contents

Compiling Yate with OpenH323 library

There are two libraries that can be used:

  • OpenH323 library
Note! OpenH323 is the recommanded library to use with Yate because is the stable version.

Take a look to learn how to compile OpenH323 or see the quick how to.

  • H323plus library
Note! Yate works with H323plus support but it is not stable.  

Here is how to compile Yate with H323plus.

Quick how to install OpenH323 library under linux

The OpenH323 library together with matching PWLib are available at: http://yate.null.ro/tarballs/openh323/

Yate needs OpenH323 and PWLib to be installed in /usr/local directory.

Install PwLib

For doing a basic installation just run in the main PwLib folder:

 ./configure with --prefix=/usr/local/pwlib
 make opt
 make install

Install OpenH323

For doing a basic installation just run in the main OpenH323 folder:

./configure --disable-ixj --prefix=/usr/local/openh323
make opt
make install

Install Yate with Pwlib and OpenH323

In Yate folder do:

./configure --with-pwlib=/usr/local/pwlib --with-openh323=/usr/local/openh323
make


Important settings

  • If you use Yate on linux setup ulimit -n 8096. This will setup the number of open files (file handlers) Yate is allowed to use.
  • With versions of OpenH323 older than 1.14.4 you need to set the codec availability to "fake" for all codecs not present in OpenH323.
This requirement does not apply to newer versions - for these "fake" and "yes" are equivalent.

OpenH323's internal RTP stack

Using the OpenH323's internal RTP stack with a format for which there is no OpenH323 codec will lead to a crash.
Starting with Yate version 1.1.0 the external RTP is the default so this should not be an issue.
If you ever disable Yate's RTP module please consider setting fallback_rtp in section [general] to false.

h323chan.conf:

[general]
fallback_rtp=false

Configuration file

Configuration file h323chan.conf:

[general]
; This section sets global variables of the implementation

; debug: int: OpenH323 debug level
;debug=0

; dumpcodecs: int: Debug level to dump registered OpenH323 codecs, 0 disables
;dumpcodecs=0

; vendor: string: Vendor name
;vendor=Null Team

; product: string: Product name
;product=YATE

; major: int: Major version number
;major=2

; minor: int: Minor version number
;minor=0

; build: int: Build number
;build=0

; status: keyword: Code status: alpha, beta or release
;status=release

; needmedia: bool: Drop calls for which no common media could be negotiated
;needmedia=yes

; dtmfmethods: string: Comma separated list of methods used to send DTMFs
; Allowed values in list:
;  h323: Use library send user input method
;  rfc2833: Use RFC 2833 signals if remote party advertised support
;  inband: Send tones in audio stream
; The methods will be used in the listed order
; Defaults to 'rfc2833,h323,inband' if missing or empty
; Invalid values are ignored
; E.g.
;   'h323,foo' leads to 'h323'
;   'foo,foo1' leads to 'rfc2833,h323,inband'
; This parameter can be overridden from routing by 'odtmfmethods' for outgoing call leg
;  and 'idtmfmethods' for incoming call leg
; Also, this parameter can be overridden in chan.dtmf messages by a 'methods' parameter
; NOTE:
;   When overridden from chan.dtmf an empty or invalid 'methods' parameter will be ignored
;   Methods indicated in chan.dtmf message will be intersected with channel capabilities
;    unless an explicit boolean true 'methods_override' parameter is present
; This parameter is applied on reload for new calls only
;dtmfmethods=rfc2833,h323,inband

; honor_dtmf_detect: bool: Honor DTMF detected method when sending DTMFs
; If enabled the channel will try to send a DTMF using the same method as received
; If the detected method is not enabled it won't be used
; This parameter can be overridden from routing by 'ohonor_dtmf_detect' for outgoing call leg
;  and 'ihonor_dtmf_detect' for incoming call leg
; This parameter is applied on reload for new calls only
; Defaults to enable
;honor_dtmf_detect=enable

; Use an external RTP module instead of the native OpenH323 RTP stack, which is
;  very cpu intensive. If no external RTP can be found it will fallback to the
;  native stack. The only external RTP now is yrtp (see the yrtpchan module).
; external_rtp: bool: default: yes
;external_rtp=yes

; Attempt to use native (OpenH323) RTP if external fails to start. This is
;  usefull only if the failure is caused by the external RTP module not
;  being loaded.
; fallback_rtp: bool: default: yes
;fallback_rtp=yes

; Perform direct RTP forwarding between client endpoints.
; You should enable faststart=on in the [ep] section and make sure fast start
;  is also supported and enabled on all clients.
; forward_rtp: bool: default: no
;forward_rtp=no

; The OpenH323 cleaner thread is a scarce shared resource. A limit set here
;  will force new connections to be dropped if too many are already being
;  in the cleanup queue. Set the limit to zero to disable this check.
; maxcleaning: int: default: 100
;maxcleaning=100

; pwlibthread: bool: Make new calls in a PWlib thread, required for LRQ calls
;pwlibthread=no

[codecs]
; This section allows to individually enable or disable the codecs
; For all but the default setting you can specify the value "fake" so that
;  it will try to declare the capability even if it's no codec available
; Using the OpenH323 internal RTP with a missing codec will lead to a crash!

; default: bool: Enable all unlisted codecs by default
;default=enable

; mulaw: bool: Companded-only G711 mu-law (G.711-uLaw-64k)
;mulaw=default

; alaw: bool: Companded-only G711 a-law (G.711-ALaw-64k)
;alaw=default

; gsm: bool: European GSM 06.10 (GSM-06.10)
;gsm=default

; msgsm: bool: Microsoft's proprietary verion of GSM (MS-GSM)
;msgsm=default

; speex: bool: Speex narrow (SpeexNarrow)
;speex=default

; lpc10: bool: Linear Prediction Codec (LPC-10)
;lpc10=default

; ilbc20: bool: Internet Low Bandwidth Codec 20ms (iLBC-15k2)
;ilbc20=default

; ilbc30: bool: Internet Low Bandwidth Codec 30ms (iLBC-13k3)
;ilbc30=default

; slin: bool: Signed Linear 16-bit uncompressed (PCM-16)
;slin=default

; g723: bool: ITU G.723 all variations (G.723)
;g723=default

; g726: bool: ITU G.726 all variations (G.726)
;g726=default

; g728: bool: ITU G.728 all variations (G.728)
;g728=default

; g729: bool: ITU G.729 all variations (G.729)
;g729=default

[ep]
; Control the endpoint operation of the module

; ep: bool: True if you want to activate the h323 endpoint
ep = true

; gw: bool: Set to true if you want this endpoint to declare itself as gateway
gw = false

; addr: string: IP address to bind the endpoint to, defaults to all interfaces
; This parameter is applied on reload
;addr=

; port: int: TCP port on which the endpoint will listen
; This parameter is applied on reload
;port=1720
 
; bind_retry_count: integer: The number of bind retries for endpoint's listener
; This parameter is used when failed to bind on configured port
; The endpoint will try to bind on a random port chosen in the range given
;  by 'bind_minport' and 'bind_maxport'
; Set it to 0 to disable bind retry if failed on configured port
; Minimum allowed value is 0, maximum allowed value is 10
; Defaults to 5
;bind_retry_count=5
 
; bind_minport: integer: Minimum port for bind retry range
; Minimum allowed value is 1, maximum allowed value is 65535
; Defaults to 1000
;bind_minport=1000

; bind_maxport: integer: Maximum port for bind retry range
; Minimum allowed value is 1, maximum allowed value is 65535
; Defaults to 65535
;bind_maxport=65535

; alias: string: The alias used by h323 module to connect to gatekeeper
alias = yate

; ident: string: Sets the hostname part of the outgoing e.164 (numeric) aliases
ident = yate

; maxconns: int: Maximum number of simultaneous connections (0 = no limit).
;maxconns=

; faststart: bool: Enable Fast Start mode (offer media channels early)
; This setting is required when doing direct RTP forwarding between endpoints
;faststart=true

; h245tunneling: bool: Enable H.245 tunneling mode
; This setting is almost always required to pass through a NAT
;h245tunneling=true

; h245insetup: bool: Enable H.245 establishment early in call setup message
; Note that this setting may conflict with faststart so don't enable both
;h245insetup=false

; dtmfinband: bool: Wheter to decode inband DTMF (CPU intensive)
;dtmfinband = false

; silencedetect: keyword: Silence detection algorithm: none, fixed, adaptive
; This applies only to OpenH323 internal RTP
;silencedetect = none

; gkclient: bool: If h323 module endpoint should register to a gatekeeper
gkclient = false

; password: string: Password for h.235 authentification
;password = 1234

; gkip: ipaddress: Set the reported ip aaddress of the gatekeeper
;gkip = 10.10.10.10

; gkname: string: Set the name of the gatekeeper
;gkname = gigi

; gkttl: int: Proposed gatekeeper registration time to live in seconds
;gkttl = 300

; gkretry: int: Gatekeeper discovery retry interval in seconds, 0 disables
;gkretry = 60

; authmethods: string: Comma separated list of authentication methods to use
; It can be use to change the order of offered authentication methods
; Possible values: H.235.1, MD5, CAT
; This parameter is applied on reload for both client and server
; Note: this parameter is used only when requested by the H323 library, changing it
;  won't trigger a re-register
; Setting a '*' to the end of list will indicate to use all methods created by the
;  H323 library
; Examples:
;  authmethods=MD5,CAT
;  authmethods=MD5,*
;  authmethods=MD5,*,CAT - same as authmethods=MD5,CAT
;  authmethods=* - same as leaving the parameter empty
;authmethods=

; How the gatekeeper is located
; If gkclient is true the endpoint will try first to find the gatekeeper by
; using gkip; then, if gkip is unset or is not corect, will try gkname and
; then will try to brodcast in the network.

[gk]
; If server is true the gatekeeper of yate will start. You must understand that
; the H323EndPoint and H323GateKeeper share the calls. So you can make a call
; to a registered endpoint of this gatekeeper even if in the [ep] section
; you haven't register the local H323EndPoint to the local H323Gatekeeper. In
; fact is not recomanded to register the local EndPoint to the local GateKeeper.
; The local H323EndPoint is used as proxy for calls to local non h323
; destinations. If you wanna call let's say tone/dial from a registered
; endpoint to the local gatekeeper, you must make a route in regexroute (or
; whatever you use) and then just dial the number.
; If you wanna call a registered endpoint you must use now as a module register
; since is the only module who can record prefixes right now.

; server: bool: Enable running a gatekeeper on the main endpoint
;server = false

; You must define the binding interfaces. Right now the multi hosted boxes don't
; work very well because OpenH323 mechanism, but we will fix that if someone
; have any problem.
;interface1=10.0.0.1

; port: int: Port on which the gatekeeper listens for connections
;port = 1719

; name: string: Identifier of the gatekeeper
;name = YateGatekeeper

; ttl: int: Registrations time to live in seconds, 0 to disable
;ttl = 600

; heartbeatdrop: bool: Drop calls for which the heartbeat timed out
;heartbeatdrop=true

; registeredonly: bool: Allow calls only with registered endpoints
;registeredonly=false

[incoming]
; This section sets defaults for the incoming H.323 calls

; context: string: Input context
;context=default

; maxqueue: int: Maximum length of the routing queue
; Normaly you will like to have this setup to a certain value so someone can't
; do a DoS attack over your server.
;maxqueue=5

; called: string: Default number to call if not present in call setup
;called=

Routing calls to a H323 channel

From a routing module you can call an H323 channel like this:

extension=h323/user@ip:port

In regexroute.conf:

^100$=h323/diana@10.0.0.1:1720


See also

Personal tools
Namespaces

Variants
Actions
Preface
Configuration
Administrators
Developers