There are many occasions where you need to have some sort of communication between your Asterisk system and an external system, be it another telephony platform or external application. The beauty of Asterisk is it’s superb flexibility in terms of collaboration or integration with external phone systems or applications. One common scenario is integration to Avaya system. Here in this post I try to highlight some of the tips and tricks in order to establish a successful communication with Avaya.
Asterisk Version: 188.8.131.52 Asterisk server IP: 10.13.1.1 Communication Protocol: H.323 H323 channel: chan_ooh323 H323 Port: 1270 UDP RTP Media Streaming port: 10,000 - 20,000 UDP Avaya location1: 172.20.11.1 Avaya location2: 10.9.9.1
1) Check ooh323 module
First you must make sure the ooh323 module is loaded into Asterisk:
*CLI> module show like ooh323 Module Description Use Count chan_ooh323.so Objective Systems H323 Channel 7 1 modules loaded
If you don’t see any output similar to above chances are the module is not loaded or not included in the compiled Asterisk modules. To make sure the chan_ooh323.so exists run the following:
# ls -l /usr/lib/asterisk/modules/chan_ooh323.so -rwxr-xr-x 1 root root 9699290 Jan 11 2013 /usr/lib/asterisk/modules/chan_ooh323.so
if chan_ooh323.so does not exist, you need to recompile Asterisk and use menuselect to activate the ooh323 in the Asterisk module list.
2) Configure ooh323.conf
h323 configuration for Asterisk is quite simple. All you need to do is to edit /etc/asterisk/ooh323.conf and set the proper configuration. Normally you need to agree with the Avaya team on the following:
- IP address of the Avaya gateway
- Communication Port: default 1270
- codecs to use
- dtmf mode: either inband or out-of-band (rfc2833 or others)
=> /etc/asterisk/ooh323.conf [general] port=1720 bindaddr=10.13.1.1 disallow=all allow=g729 dtmfmode=inband gatekeeper=DISABLE context=default progress_setup=8 progress_alert=8 h245tunneling=yes [avaya-location1] type=friend context=from-trunk host=172.20.11.1 port=1720 disallow=all allow=g729 [avaya-location2] type=friend context=from-trunk dtmfmode=rfc2833 host=10.9.9.1 port=1720 disallow=all allow=g729 faststart=no
As can be seen, the major config sits in the general section. Make sure you put the IP of the Asterisk server in the bindaddress. For each trunk you need to create the respective context in the config file. Above, you can see 2 different contexts, namely avaya-location1&2, each representing a h323 trunk. make sure you specify the IP address of the avaya host properly.
Note: in case you experience issue with one way audio try enabling/disabling faststart. In my case it helped.
3) Create custom h323 trunk in FreePBX
In case you’re using FPBX, you can create a custom trunk and set custom dial string to: OOH323/$OUTNUM$/avaya-location1 or OOH323/$OUTNUM$/avaya-location2
Then you would need to create an outbound route:
*CLI> ooh323 show peers Name Accountcode ip:port Formats avaya-location1 ast_h323 172.20.11.1:1720 0x100 (g729) avaya-location2 ast_h323 10.9.9.1:1720 0x100 (g729)
*CLI> ooh323 show users Username Accountcode Context Formats avaya-location1 ast_h323 from-trunk 0x100 (g729) avaya-location2 ast_h323 from-trunk 0x100 (g729)
*CLI> ooh323 show user avaya-location1 Name: avaya-location1 FastStart/H.245 Tunneling:no,yes Format Prefs: (g729:20) DTMF Mode: inband T.38 Mode: faxgw/chan_sip compatible AccountCode: ast_h323 AMA flags: Unknown Context: from-trunk IncomingLimit: 0 InUse: 0 rtptimeout: 60
CLI> ooh323 show peer avaya-location1 Name: avaya-location1 FastStart/H.245 Tunneling:no,yes Format Prefs: (g729:20) DTMF Mode: inband T.38 Mode: faxgw/chan_sip compatible AccountCode: ast_h323 AMA flags: Unknown IP:Port: 172.20.11.1:1720 OutgoingLimit: 0 rtptimeout: 60