Difference between revisions of "Assignment 2: H323 (by Fabio & Anneke)"

From TD-er's Wiki
Jump to navigationJump to search
Line 52: Line 52:
  
 
If this is really necessary we can't tell right now. We got things working when changing other things as well so later on we can try if it still works without this step.  
 
If this is really necessary we can't tell right now. We got things working when changing other things as well so later on we can try if it still works without this step.  
 +
 +
==== ooh323.conf ===
  
 
Next thing was to edit the ooh323.conf file. This file needs to be copied from the samples first:
 
Next thing was to edit the ooh323.conf file. This file needs to be copied from the samples first:
Line 58: Line 60:
 
Here is our ooh323.conf:
 
Here is our ooh323.conf:
  
 +
; Objective System's H323 Configuration example for Asterisk
 +
; ooh323c driver configuration
 +
;
 +
; [general] section defines global parameters
 +
;
 +
; This is followed by profiles which can be of three types - user/peer/friend
 +
; Name of the user profile should match with the h323id of the user device.
 +
; For peer/friend profiles, host ip address must be provided as "dynamic" is
 +
; not supported as of now.
 +
;
 +
; Syntax for specifying a H323 device in extensions.conf is
 +
; For Registered peers/friends profiles:
 +
;        OOH323/name where name is the name of the peer/friend profile.
 +
;
 +
; For unregistered H.323 phones:
 +
;        OOH323/ip[:port] OR if gk is used OOH323/alias where alias can be any H323
 +
;                          alias
 +
;
 +
; For dialing into another asterisk peer at a specific exten
 +
;      OOH323/exten/peer OR OOH323/exten@ip
 +
;
 +
; Domain name resolution is not yet supported.
 +
;
 +
; When a H.323 user calls into asterisk, his H323ID is matched with the profile
 +
; name and context is determined to route the call
 +
;
 +
; The channel driver will register all global aliases and aliases defined in
 +
; peer profiles with the gatekeeper, if one exists. So, that when someone
 +
; outside our pbx (non-user) calls an extension, gatekeeper will route that
 +
; call to our asterisk box, from where it will be routed as per dial plan.
 +
 +
 +
[general]
 +
;Define the asetrisk server h323 endpoint
 +
 +
;The port asterisk should listen for incoming H323 connections.
 +
;Default - 1720
 +
;port=1720
 +
;CHANGED
 +
port=1720
 +
 +
;The dotted IP address asterisk should listen on for incoming H323
 +
;connections
 +
;Default - tries to find out local ip address on it's own
 +
bindaddr=0.0.0.0
 +
 +
;This parameter indicates whether channel driver should register with
 +
;gatekeeper as a gateway or an endpoint.
 +
;Default - no
 +
;gateway=no
 +
;CHANGED
 +
gateway=yes
 +
 +
;Whether asterisk should use fast-start and tunneling for H323 connections.
 +
;Default - yes
 +
;faststart=no
 +
h245tunneling=no
 +
;CHANGED
 +
;h245tunneling=yes
 +
 +
 +
;H323-ID to be used for asterisk server
 +
;Default - Asterisk PBX
 +
h323id=ObjSysAsterisk
 +
;e164=100
 +
;CHANGED
 +
e164=501
 +
 +
;CallerID to use for calls
 +
;Default - Same as h323id
 +
callerid=asterisk
 +
 +
;Whether this asterisk server will use gatekeeper.
 +
;Default - DISABLE
 +
;gatekeeper = DISCOVER
 +
;gatekeeper = DISABLE
 +
;CHANGED
 +
gatekeeper = 129.125.71.173
 +
 +
;Location for H323 log file
 +
;Default - /var/log/asterisk/h323_log
 +
;CHANGED
 +
logfile=/var/log/asterisk/h323_log
 +
 +
 +
;Following values apply to all users/peers/friends defined below, unless
 +
;overridden within their client definition
 +
 
 +
;Sets default context all clients will be placed in.
 +
;Default - default
 +
context=default
 +
 +
;Sets rtptimeout for all clients, unless overridden
 +
;Default - 60 seconds
 +
;rtptimeout=60      ; Terminate call if 60 seconds of no RTP activity
 +
                    ; when we're not on hold
 +
;CHANGED
 +
rtptimeout=3
 +
;Type of Service
 +
;Default - none (lowdelay, thoughput, reliability, mincost, none)
 +
;tos=lowdelay
 +
 +
;amaflags = default
 +
 +
;The account code used by default for all clients.
 +
;accountcode=h3230101
 +
 +
;The codecs to be used for all clients.Only ulaw and gsm supported as of now.
 +
;Default - ulaw
 +
; ONLY ulaw, gsm, g729 and g7231 supported as of now
 +
;disallow=all    ;Note order of disallow/allow is important.
 +
;allow=gsm
 +
;allow=ulaw
 +
;;CHANGED
 +
;allow=g729
 +
;allow=g723
 +
 +
;CHANGED
 +
allow=all
 +
 +
; dtmf mode to be used by default for all clients. Supports rfc2833, q931keypad
 +
; h245alphanumeric, h245signal.
 +
;Default - rfc 2833
 +
dtmfmode=rfc2833
 +
 +
; User/peer/friend definitions:
 +
; User config options                    Peer config options
 +
; ------------------                    -------------------
 +
; context
 +
; disallow                              disallow
 +
; allow                                  allow
 +
; accountcode                            accountcode
 +
; amaflags                              amaflags
 +
; dtmfmode                              dtmfmode
 +
; rtptimeout                            ip
 +
;                                        port
 +
;                                        h323id
 +
;                                        email
 +
;                                        url
 +
;                                        e164
 +
;                                        rtptimeout
 +
 +
;
 +
 +
;Define users here
 +
;Section header is extension
 +
[myuser1]
 +
type=user
 +
context=context1
 +
disallow=all
 +
allow=gsm
 +
allow=ulaw
 +
 +
 +
 +
[mypeer1]
 +
type=peer
 +
context=context2
 +
ip=a.b.c.d  ; UPDATE with appropriate ip address
 +
port=1720    ; UPDATE with appropriate port
 +
e164=101
 +
 +
 +
 +
;[myfriend1]
 +
 +
[friend-Anneke]
 +
type=friend
 +
;CHANGED
 +
context=from-internal
 +
ip=129.125.71.172  ; UPDATE with appropriate ip address
 +
;port=1820          ; UPDATE with appropriate port
 +
port=1720
 +
disallow=all
 +
;allow=ulaw
 +
;CHANGED
 +
allow=gsm
 +
allow=ulaw
 +
allow=g729
 +
allow=g723
 +
 +
;CHANGED
 +
;e164=12345
 +
e164=601
 +
 +
rtptimeout=3
 +
dtmfmode=rfc2833
 +
 +
 +
[friend-Fabio]
 +
type=friend
 +
context=default
 +
ip=129.125.71.173  ; UPDATE with appropriate ip address
 +
;port=1820          ; UPDATE with appropriate port
 +
port=1720
 +
disallow=all
 +
;allow=ulaw
 +
;CHANGED
 +
allow=gsm
 +
allow=ulaw
 +
allow=g729
 +
allow=g723
 +
 +
;CHANGED
 +
;e164=12345
 +
 +
rtptimeout=3
 +
dtmfmode=rfc2833
 +
 +
;[601]
 +
;type=peer
 +
;context=default
 +
;ip=129.125.71.173:1719
 +
;e164=100
 +
;OH323/129.125.71.173:1719
 +
;gatekeeper=ENABLE
 +
;OOH323/601
  
 +
 +
(Still needs some cleaning up, will do later)
 +
 +
Comments on this file:
 +
* All parameters that have been changed by us are preceded with a comment line ''';CHANGED'''
 +
* The Trixbox is going to act as gateway for the gatekeeper hence '''gateway = yes'''
 +
* h245tunneling still under investigation
 +
* For some reason it seems that you have to set e164 to the SIP extension number ??? (how to handle multiple extension???)
 +
* We will be using a gatekeeper so '''gatekeeper = 129.125.71.173''' (ip-address of the gatekeeper)
 +
* The user profile section is a bit messy right now
 +
 +
==== adding extension in FreePBX ====
  
 
amportal stop
 
amportal stop
 
amportal start
 
amportal start
 
+
 
then it works perfect.
 
then it works perfect.

Revision as of 11:05, 23 February 2007

We use gnomemeeting softphones and a gnugk gatekeeper.

Configuration of Gnomemeeting

Edit -> Preferences

  • General: You can fill in your personal data and leave everything default
  • H323 Settings: Gatekeeper:
Registering method: Gatekeeper host
Gatekeeper host: 129.125.71.173:1719 
Gatekeeper alias: 601

Gatekeeper host is the IP address and port of the gatekeeper. Port 1720 is the standard h323 port but in our case the h323 client was on the same computer so the 1720 port was already occupied.

Gatekeeper alias is the primary alias with the gatekeeper, also the extension number in Asterisk to keep things simple.

Tick the "Register this alias as the primary alias with the gatekeeper" box and Apply (sorry, this is of course after you've installed the gk) :).

  • H323 Settings: Gateway - Do not use a gateway
  • Codecs: Audio Codecs - We enabled all available codecs.
  • Codecs: Video Codecs - We have not been able to spend time on this
  • Devices:
    • Audio Devices:
      • Audio Plugin ALSA
      • Output device: Intel ICH5
      • Input device: Intel ICH5
    • Detect Devices

(All the audio and video devices settings are of course depending on your local system, this is more for our own reference) :)

GnuGk Gatekeeper

Packages for this gatekeeper are not available for CentOS. We found out that this gatekeeper was already installed in Etch. (System administration provided us with two machines with etch so we could get the sound working).

Almost no configuring here. Just enable PROXY.

We are still playing with the gatekeeper so this section is under construction.

Configuration of Trixbox 1.2.3

We followed mostly the instructions from these two forums on the Trixbox site:

There are more forums where people say things about h323 but these seem to be the most helpful.

Following the suggestions we used Trixbox 1.2.3 with asterisk-addons-1.2.3. In order to do this we deleted the current addons:

rpm -qa | grep asterisk-addons
rpm -e asterisk-addons-1.2.4_1.2.12.1-1.294

And loaded the older addons: (these can be found ...............)

rpm -i asterisk-addons-1.2.3-1.219.i386.rpm

If this is really necessary we can't tell right now. We got things working when changing other things as well so later on we can try if it still works without this step.

= ooh323.conf

Next thing was to edit the ooh323.conf file. This file needs to be copied from the samples first:

cp /etc/asterisk-1.2.8-samples/ooh323.conf /etc/asterisk 

Here is our ooh323.conf:

; Objective System's H323 Configuration example for Asterisk
; ooh323c driver configuration
;
; [general] section defines global parameters
;
; This is followed by profiles which can be of three types - user/peer/friend
; Name of the user profile should match with the h323id of the user device.
; For peer/friend profiles, host ip address must be provided as "dynamic" is
; not supported as of now.
;
; Syntax for specifying a H323 device in extensions.conf is
; For Registered peers/friends profiles:
;        OOH323/name where name is the name of the peer/friend profile.
;
; For unregistered H.323 phones:
;        OOH323/ip[:port] OR if gk is used OOH323/alias where alias can be any H323
;                          alias
;
; For dialing into another asterisk peer at a specific exten
;       OOH323/exten/peer OR OOH323/exten@ip
;
; Domain name resolution is not yet supported.
;
; When a H.323 user calls into asterisk, his H323ID is matched with the profile
; name and context is determined to route the call
;
; The channel driver will register all global aliases and aliases defined in
; peer profiles with the gatekeeper, if one exists. So, that when someone
; outside our pbx (non-user) calls an extension, gatekeeper will route that
; call to our asterisk box, from where it will be routed as per dial plan.


[general]
;Define the asetrisk server h323 endpoint

;The port asterisk should listen for incoming H323 connections.
;Default - 1720
;port=1720
;CHANGED
port=1720

;The dotted IP address asterisk should listen on for incoming H323
;connections
;Default - tries to find out local ip address on it's own
bindaddr=0.0.0.0

;This parameter indicates whether channel driver should register with
;gatekeeper as a gateway or an endpoint.
;Default - no
;gateway=no
;CHANGED
gateway=yes

;Whether asterisk should use fast-start and tunneling for H323 connections.
;Default - yes
;faststart=no
h245tunneling=no
;CHANGED
;h245tunneling=yes


;H323-ID to be used for asterisk server
;Default - Asterisk PBX
h323id=ObjSysAsterisk
;e164=100
;CHANGED
e164=501

;CallerID to use for calls
;Default - Same as h323id
callerid=asterisk

;Whether this asterisk server will use gatekeeper.
;Default - DISABLE
;gatekeeper = DISCOVER
;gatekeeper = DISABLE
;CHANGED
gatekeeper = 129.125.71.173

;Location for H323 log file
;Default - /var/log/asterisk/h323_log
;CHANGED
logfile=/var/log/asterisk/h323_log


;Following values apply to all users/peers/friends defined below, unless
;overridden within their client definition
 
;Sets default context all clients will be placed in.
;Default - default
context=default

;Sets rtptimeout for all clients, unless overridden
;Default - 60 seconds
;rtptimeout=60      ; Terminate call if 60 seconds of no RTP activity
                    ; when we're not on hold
;CHANGED
rtptimeout=3
;Type of Service
;Default - none (lowdelay, thoughput, reliability, mincost, none)
;tos=lowdelay

;amaflags = default

;The account code used by default for all clients.
;accountcode=h3230101

;The codecs to be used for all clients.Only ulaw and gsm supported as of now.
;Default - ulaw
; ONLY ulaw, gsm, g729 and g7231 supported as of now
;disallow=all     ;Note order of disallow/allow is important.
;allow=gsm
;allow=ulaw
;;CHANGED
;allow=g729
;allow=g723

;CHANGED
allow=all

; dtmf mode to be used by default for all clients. Supports rfc2833, q931keypad
; h245alphanumeric, h245signal.
;Default - rfc 2833
dtmfmode=rfc2833

; User/peer/friend definitions:
; User config options                    Peer config options
; ------------------                     -------------------
; context
; disallow                               disallow
; allow                                  allow
; accountcode                            accountcode
; amaflags                               amaflags
; dtmfmode                               dtmfmode
; rtptimeout                             ip
;                                        port
;                                        h323id
;                                        email
;                                        url
;                                        e164
;                                        rtptimeout

;

;Define users here
;Section header is extension
[myuser1]
type=user
context=context1
disallow=all
allow=gsm
allow=ulaw



[mypeer1]
type=peer
context=context2
ip=a.b.c.d   ; UPDATE with appropriate ip address
port=1720    ; UPDATE with appropriate port
e164=101



;[myfriend1]

[friend-Anneke]
type=friend
;CHANGED
context=from-internal
ip=129.125.71.172   ; UPDATE with appropriate ip address
;port=1820           ; UPDATE with appropriate port
port=1720
disallow=all
;allow=ulaw
;CHANGED
allow=gsm
allow=ulaw
allow=g729
allow=g723

;CHANGED
;e164=12345
e164=601

rtptimeout=3
dtmfmode=rfc2833


[friend-Fabio]
type=friend
context=default
ip=129.125.71.173   ; UPDATE with appropriate ip address
;port=1820           ; UPDATE with appropriate port
port=1720
disallow=all
;allow=ulaw
;CHANGED
allow=gsm
allow=ulaw
allow=g729
allow=g723

;CHANGED
;e164=12345

rtptimeout=3
dtmfmode=rfc2833

;[601]
;type=peer
;context=default
;ip=129.125.71.173:1719
;e164=100
;OH323/129.125.71.173:1719
;gatekeeper=ENABLE
;OOH323/601


(Still needs some cleaning up, will do later)

Comments on this file:

  • All parameters that have been changed by us are preceded with a comment line ;CHANGED
  • The Trixbox is going to act as gateway for the gatekeeper hence gateway = yes
  • h245tunneling still under investigation
  • For some reason it seems that you have to set e164 to the SIP extension number ??? (how to handle multiple extension???)
  • We will be using a gatekeeper so gatekeeper = 129.125.71.173 (ip-address of the gatekeeper)
  • The user profile section is a bit messy right now

adding extension in FreePBX

amportal stop amportal start

then it works perfect.