Friday, February 08, 2008

Set H323 trunk between Asterisk and Avaya

Once asterisk and H323 is installed (previous post) follow the below configuration files to have the ip trunk up and running do the following configuration:

Setup h323.conf, sip.conf and extensions.conf as the examples below:

The h323.conf just defines the link between the Avaya and the Asterisk server.

/etc/asterisk/h323.conf
; The NuFone Network's ;
Open H.323 driver configuration
;
[general]

port = 1720

bindaddr = 192.168.58.227
disallow=all

allow=alaw

dtmfmode=inband
gatekeeper = DISABLE
context=default

progress_setup = 8
progress_alert = 8

h245tunneling=yes


[Avaya]

type=friend
context=default
host=192.168.58.216
port=1720

disallow=all
allow=alaw,g729,gsm,slinear


On sip.conf I set two demo extensions 89301 and 89300. This are numbers similar to my Avaya extension range and they also match a DDI range.


/etc/asterisk/sip.conf
[general]
context=default
allowoverlap=no

bindport=5060

bindaddr=0.0.0.0

srvlookup=yes


[89300]

type=friend
regexten=89300

context=default
secret=89300
username=89300

callerid="User1" <89300>
host=dynamic

nat=yes
canreinvite=no
disallow=all

allow=alaw

allow=ulaw
dtmfmode=inband


[
89301]
type=friend

regexten=89301

context=default
secret=89301
username=89301

callerid="User2" <89301>

host=dynamic

nat=yes
canreinvite=no

disallow=all

allow=alaw

allow=ulaw

dtmfmode=inband



On extensions.con I set up a basic dial plan to send sip calls to each sip phone and calls from the sip phones to the Avaya system.


/etc/asterisk/extensions.conf

; extensions.conf - the Asterisk dial plan
[general]
static=yes
writeprotect=no
autofallthrough=yes
clearglobalvars=no

[globals]
TRUNKMSD=1

[default]
;Simple direct to sip extensions
exten => 89300,1,Dial(SIP/89300)
exten => 89301,1,Dial(SIP/89301)

;Simple rule to divert all calls from Sip extensions to Avaya extensions and External numbers on PSTN.

exten => _8XXXX,1,Dial(H323/${EXTEN}@Avaya); Avaya Extension
exten => _90ZXXXXXXXXX,1,Dial(H323/${EXTEN}@Avaya); External National UK Number


Configure the Avaya side:

The first thing to check is to see if you have the following:
a. On system-parameters customer-options in the second page you must have enough Maximum Administered H.323 Trunks to use.
b. A CLAN to use.
b. A MEDPRO to use.

Note that my Avaya PBX is a CM version 3.1.2, there might be other requirements that I might be missing.

1) Set up the names of the Avaya CLAN and the Asterisk server on node-names ip
(in the image below lmntel01 would be my Asterisk ip address and 192.168.58.216 my clan address)



2) Below are the details of my CLAN, note the network region defined. In this case 6.



3) The configuration of the CLAN is shown below:



4) The network region 6 has the following configuration:









c) The network region 6 has defined ip-codec 6 taht has the following codecs (NOTE: the use of this codecs is due system configuration/hardware limitiations. You should try to use something else than G729)




d) Now you have to define the IP Trunk and IP Signaling group. You have to create both on sync, below just the final output.






Note that the Supplementary Service Protocol needs to be set to "a" to allow the passing of call info (extension number, name, etc) from and to the two systems. This will be shown at the end of this post in an Avaya to Asterisk extension call.









e) At this stage you should have the H323 IP trunk up and running between the two systems. You might require a busyout of signalig group/trunk to bring it up.






f) The next step is to define the routing off calls from the Avaya to the Asterisk box using the new trunk created.

First I set up on the uniform-dial-plan that all my extensions begining wiht 893xx and 5 digits should use the ARS table. My Avaya dial plan is of 5 digits, and I do an inc-call-handling-trmt to change external DDI to an internal extension. For example 02070189301 is set to the internal number 89301, note that 89301 is NOT an extension that is defined on the Avaya system.



Then on the ARS analysis table I defined that the 893xx range should use the route pattern 66. (not sure which call type I have to use, on my test the last one was natl therefore it was left like that).



Finally the route-pattern 66 is defined using the trunk 66 previously created and that would be all the configuration needed.



One final step that I had to do was to complete my public-unknown-numbering table. I found on the test that while the extension name was sent to the asterisk server the extension name was not. External calls to the DDI worked fine and the caller number was passed but when calling from an internal extension there was a problem.

After googling and checking this I found that by setting the first digits of my Avaya extensions and the trunk all the Avaya extensions sent the number to the Asterisk server and were display on the IPSoftphone being used for testing.



An example of a call using X-Lite sofphone is below. From extension 84562 on my Avaya PBX I placed a call to extension 89300 on the Asterisk server. The configuration of 84562 is below:



You can see on the result that the name and the extension number is sent to Asterisk. This is due using Supplementary Service Protocol a on the second page of the trunk 66 definition as mentioned before.

17 comments:

Anonymous said...

Grate,

Im trie. One year ago and realy work.
But you forgot change isdn public-...
With this change you can send number from asterisk.

Ats,

Eduardo Constantino
+551991912705

Mike said...

Thanks for this entry! Helped me getting started on the Topic Asterisk/H323 trunks.
-Mike

Shah Zobair said...

Thanks a LOT... It really help me to configure H323 channel. Now i'm stuck with NAT problem. my asterisk server in under NAT. i see my gateway can recieve requests.. but further there is no response.. can anyone help me out?? thanks... JOE

joe.redhat@gmail.com

Matt said...

Excellent post. About to face interfacing VRU applications in Asterisk with Avaya and will be back here reading again.

Do you happen to know if UCID (generated in Avaya before call sent to Asterisk) is made available over H323 and available in the DialPlan? Or will Avaya CTI solutions such as JTAPI/CTAPI come in to play at that point?

Thanks!

matt.mcaughan@gmail.com

Anonymous said...

Hello

Story with a Prologix Avaya version V11, also works for this type of model for Avaya?

I'm using Elastix 1.3

soportehugo@yahoo.com.mx

Greetings

Satish K Arunagiri said...

Thanks for the help. Using this configuration Iam able to achieve the calling from avaya extension to asterisk extension but vice versa is not working i.e Iam unable to call from Asterisk extension to Avaya Extension. What could be the probable changes which I need to follow in order to achieve the calling from Asterisk extension to Avaya Extension ? Pls help me with the solution.

Anonymous said...

Hi

i also connect an asterisk 1.6 to pbx avaya g650, the only problem is that when i made a call from asterisk to avaya, the ring si caoming slow, so i get a call in 1 2 minutes. the configuration are ok, i also check the vlan voice and administration network and the time between them are ok . any ideea why avaya answers so hard from the call from asterisk??? the codecs are ok ...

br
george

Anonymous said...

Thank you. Very useful!

Anonymous said...

is this bloog alieve???


what i i was to do the same on elastix... which files i will be edtings then??? as in elastix its writen in file that do not EDIT files..

Unknown said...

i try but when i call from avaya to elastix it rings once and disconnect also i am unable to call from elastix to avaya . could u help me please

Unknown said...

i try but when i call from avaya to elastix it rings once and disconnect also i am unable to call from elastix to avaya . could u help me please

Unknown said...

i try but when i call from avaya to elastix it rings once and disconnect also i am unable to call from elastix to avaya . could u help me please

LordRamirez said...

Hi. Excelent guide. I got it working with the latest Elastix version to Avaya Definity. All is working well, the only thing i cant get to work is the dmtf tones. We have Authorization codes in avaya to allow external calls to users, and when a user using a SIP phone tries to make an external call, the avaya system is waiting for the authorization code, the user dials the code but Avaya doesnt recieve it. Any ideas? Thanks!

Unknown said...

Hi Mr. Ramirez, have you already figured out the solution on this authorization code problem? I too is experiencing this.

Sam Wonder said...

ezTalks is the world's leading online video conferencing provider that enables you to connect with people anywhere and anytime. Integrated with HD video conferencing, audio conferencing, screen sharing, content sharing, remote control and other powerful features, it can be widely applied to all industries
best web conferencing
webinar host
video meeting
free online screen sharing

CarlosAlbertoTI said...

Very nice post!

khan said...

Thank you because you have been willing to share information with us. we will always appreciate all you have done here because I know you are very concerned with our.
asterisk based phone systems,