
 Configuration of OpenH323 Channel driver
==========================================

 General
---------

 This section describes the configurable parameters
 of the OpenH323 channel driver (OH323), through its configuration
 file (usually /etc/asterisk/oh323.conf).

 There are three categories: 
 (1) "general", with generic configuration information (address, 
     ports, gatekeeper, ...),
 (2) "register", with associations of H.323 aliases/prefixes and 
     related ASTERISK contexts, 
 (3) "codecs", with configuration information
     about supported codecs.


 Parameters in "general" section:
----------------------------------
 
 "listenAddress" - Address to bind to for incoming H.323 connections. 
    The default value is "0.0.0.0"

 "listenPort" - This is the TCP port the H.323 listener will listen 
    on for incoming connections. 
    The default value is 1720.

 "tcpStart", "tcpEnd" - The TCP port range to be used by OpenH323
    channel driver. This port range is used by the H.245 and H.225.0
    elements of the protocol.
    The default range is 5000-31000.

 "udpStart", "udpEnd" - The UDP port range to be used by OpenH323 
    channel driver. This range refers to the ports used by the H.225.0
    RAS element and doesn't include the RTP port range which can be 
    configured in "rtp.conf" file.
    The default range is 5000-31000.

 "fastStart" - Disables or enables the fast start mechanism of H.323.
    Default value is "no".

 "h245Tunnelling" - Disables or enables the H.245 tunnelling mechanism
    of H.323.
    Default value is "no".

 "h245inSetup" - Disables or enables early H.245 messages in SETUP messages.
    Default value is "no".

 "jitterMin", "jitterMax" - Set jitter buffer min and max values. The 
    values are in milliseconds, in the range 20...10000ms.
    The default range is 20-100.

 "ipTos" - IP Type-of-Service byte for RTP channels.
    Valid values for this option are:
        "lowdelay"
        "throughput"
        "reliability"
        "mincost"
        "none"
    Also any numeric value is valid input.
    The default value is "none".

 "inboundMax", "outboundMax" - These are the upper limits of inbound
    and outbound H.323 connections. If both parameters are 0, then the
    OpenH323 channel driver is disabled (no H.323 calls are permitted
    or received).
    The default values are "0", "0" (disabled!).

 "crlCallNumber", "crlCallTime", "crlThreshold" - Call Rate Limiter params
    (ingress direction). When the total number of active calls is above
    'crlThreshold' then the rate of the incoming H.323 calls is restricted 
    in a way where no more than 'crlCallNumber' calls are allowed in 
    'crlCallTime' milliseconds, thus limiting the rate of incoming calls to:
         'crlCallNumber' / ('crlCallTime' / 1000) Calls-per-Sec.

 "gatekeeper" - Select a gatekeeper option. Valid values for this 
    parameter are:
        DISABLE  -  disable gatekeeper,
        DISCOVER -  enable gatekeeper discovery (through UDP broadcasts)
        <hostname> or <ip>  -  explicitly specify a gatekeeper
                    with its hostname or IP,
        GKID:<gatekeeper's id> - explicitly specify a gatekeeper
                    with its ID.
    The default value is "DISABLE".

 "gatekeeperPassword" - The password to be used for gatekeeper authentication.

 "userInputMode" - Specify the mode for sending user-input (DTMF). 
    Valid values are:
        Q931      -   Q.931 Keypad Information Element
        STRING    -   H.245 string
        TONE      -   H.245 tone
        RFC2833   -   RFC2833 (this option is not supported yet)
        INBAND    -   In audio stream
    The default value is "TONE".

 "accountCode" - This parameter sets the account code for records generated
    by the OpenH323 channel driver. 
    No default value.

 "amaFlags" - This parameter sets the AMA (Automated Machine Accounting) 
    flags on the created H.323 channels. Valid values are:
        default         -   Select system's default
        omit            -   No record is written
        billing         -   Write record as "BILLING"
        documentation   -   Write record as "DOCUMENTATION"

 "language", "musiconhold" - The default language and music-on-hold class
    for the OH323 channels.

 "context" - This is the default context in "extensions.conf" file
    where all the incoming H.323 calls without an associated context, 
    are routed to.
    The default value is "default".

 "wrapTraceLevel", "libTraceLevel", "libTraceFile" - Trace options for 
    the wrapper library used by the OpenH323 channel driver.
    These options provide access to the tracing capabilities
    of the OpenH323 library. "libTraceFile" can be 'stdout'
    or a full path name to a file. "wrapTraceLevel" and 
    "libTraceLevel" can be set to 0 to disable tracing.


 Parameters in "register" section:
-----------------------------------

 This section contains one or more groups with the following format:

 context=...
 alias=...
 alias=...
 ...
 gwprefix=...
 gwprefix=...
 ...

 The various fields have the following meaning:

 "context" - This is the context in "extensions.conf" file where all the
    incoming H.323 calls, with a calling party number that matches
    any of the alias(es)/prefix(es) following this option, are routed.
    Actually, a "context" option, groups together a set of
    "alias" and/or "gwprefix" options (see below).

 "alias" - Specify H.323 alias(es) for ASTERISK PBX. This parameter
    can be used multiple times. If this parameter contains
    only numbers, then this alias will be registered to the
    gatekeeper as a E.164 number otherwise will be registered
    as a H323ID. Incoming calls with a calling party number 
    matching this alias, are routed into the context specified
    in the preceding "context" option.

 "gwprefix" - Specify H.323 gateway prefix(es) for ASTERISK PBX.
    This parameter can be used multiple times. Incoming 
    calls with a calling party number matching this prefix,
    are routed into the context specified in the preceding
    "context" option.


 Parameters in "codecs" section:
---------------------------------

 This section contains one or more groups with the following format:

 codec=...
 frames=...

 The various fields have the following meaning:

 "codec" - Specify a codec to be used by the H.323 channel driver.
    Valid values are:
        G711U       -   G.711 u-Law
        G711A       -   G.711 A-Law
        G7231       -   G.723.1(6.3k)
        G72316K3    -   G.723.1(6.3k)
        G72315K3    -   G.723.1(5.3k)
        G7231A6K3   -   G.723.1A(6.3k)
        G7231A6K3   -   G.723.1A(6.3k)
        G726        -   G.726(32k)
        G72616K     -   G.726(16k)
        G72624K     -   G.726(24k)
        G72632K     -   G.726(32k)
        G72640K     -   G.726(40k)
        G728        -   G.728
        G729        -   G.729
        G729A       -   G.729A
        G729B       -   G.729B
        G729AB      -   G.729AB
        GSM0610     -   GSM 0610
        MSGSM       -   Microsoft GSM Audio Capability
        LPC10       -   LPC-10
    Currently, only G711U, G711A, G7231, G729, GSM0610, G726
    can be used.
 
 "frames" - This option may follow a "codec" option, specifying
    the number of voice encoded frames in RTP packets for this
    codec.


 Dial string of OpenH323 (OH323) channels
------------------------------------------

 The dialstring of the OH323 channel driver has the following forms:
    OH323/[exten@]peer[:port]
 or
    OH323/peer[:port][/exten]
 where 'peer' is the IP address/name of the remote end, 'port' the TCP port
 to contact the peer (1720 is the default), 'exten' is the alias/number
 to contact at the remote end.

 The following are some examples of the usage of the channel driver
 through the "Dial" application.

 Dial(OH323/123)
    Here we assume that a gatekeeper is used. The H.323 endpoint with
    the alias "123", registered to the gatekeeper, will be called.

 Dial(OH323/1.2.3.4)
    The H.323 endpoint with IP address "1.2.3.4" will be called. No 
    lookup to a gatekeeper (if one is used) is performed.

 Dial(OH323/5.6.7.8:1234)
    The same as above, but the port "1234" will be used to reach the 
    remote H.323 endpoint (not the default 1720).

 Dial(OH323/ws1.inaccessnetworks.com)
    The H.323 endpoint with DNS name "ws1.inaccessnetworks.com" will
    be called.

 Dial(OH323/user1@gw1.inaccessnetworks.com:2004)
    Call the H.323 endpoint with alias or H.323 ID "user1", at 
    host "gw1.inaccessnetworks.com", port "2004".


