I needed a trunk connection between two asterisk servers via IAX. I went through a number of tutorial on the web but none of them worked for me. But still i was interested to use IAX trunk for my asterisk servers, as I’m using low bandwidth on one of my asterisk location.
However currently i was using SIP trunk between my two servers which was pretty reliable but not appeared appropriate in bandwidth case, as it generate a new header on every call which put effects on bandwidth but IAX trunk is much better for the dual Asterisk servers in such case.
And hance an expert developer for Asterisk “file — Joshua Colp (Who is really a very helpfull and life saver)” guided me and finally I successfully setup the IAX connection between my two asterisk servers which works really awesome and there is no more voice or bandwidth issues.
Here i’d like to share my settings for the IAX trunk at both ends:
ServerA ——–
;iax.conf
[ServerB]
type=peer
host=ServerB.my-domain.com
username=ServerA
secret=ServerA-pass
disallow=all
allow=ulaw
[ServerB]
type=user
secret=ServerB-pass
disallow=all
allow=ulaw
Dial(IAX2/ServerB/${EXTEN}@context)
ServerB ——–
;iax.conf
[ServerA]
type=peer
host=ServerA.my-domain.com
username=ServerB
secret=ServerBpass
disallow=all
allow=ulaw
[ServerA]
type=user
secret=ServerA-pass
disallow=all
allow=ulaw
Dial(IAX2/ServerA/${EXTEN}@context)
Tags: Asterisk servers, dual asterisk servers, IAX, IAX trunk, servers via IAX, SIP trunk
in your example you have two entiries for ServerB on server A. and you have two ServerA on serverB.
Is it intended that the sections with type=user is actually titled with the username? ServerA could be iaxuser insted?
Well, I assumed this is what was supposed to be, please correct me if I am wrong. In anycase it is not working for me, but I suspect it is somthing I am just not understanding. Here is my config:
I have setup a lab, with two AsteriskNow boxes.
Hostname: VoIP1t
IP: 192.168.1.56
Extention1: 5000
Hostname: VoIP2t
IP: 192.168.1.55
Extention1: 6000
ServerA ——–
;iax.conf
[ServerB]
type=peer
host=192.168.1.55
username=iaxuser
secret=password
disallow=all
allow=ulaw
[iaxuser]
type=user
secret=password
disallow=all
allow=ulaw
;extentions.conf
[in the dialplan]
exten=_6XXX,1,Dial(IAX2/ServerB/${EXTEN}@context)
ServerB ——–
;iax.conf
[ServerA]
type=peer
host=192.168.1.56
username=iaxuser
secret=password
disallow=all
allow=ulaw
[iaxuser]
type=user
secret=password
disallow=all
allow=ulaw
;extentions.conf
[in the dialplan]
exten=_6XXX,1,Dial(IAX2/ServerA/${EXTEN}@context)
when I attempt my connection (using a softphone x-lite) from VoIP2t to VoIP1t I get the following error appear on the console of VoIP1t
********************************
Notice[2377]: chan_iax2.c:6906 socket_process: Rejected connect attempt from 192.168.1.55, who was trying to reach ‘5000@context’
********************************
on VoIP2t I get the following message at console:
********************************
Executing [5000@numberplan-custom-1:1] Dial(”SIP/6000-0826f998″, “IAX2/ServerA/5000@context”) in new stack
Called ServerA/5000@context
WARNING[2595]: chan_iax2.c:7181 socket_process: Call rejected by 192.168.1.56: No authority found
Hangup ‘IAX2/ServerA-3′
Everyone is busy/congested at this time (1:0/0/1)
Auto fallthrough, channel ‘SIP/6000-0826f998′ status is ‘CHANUNAVAIL’
********************************
I get the same errors in both directions. is this a P.E.B.K.A.C. Error?
Anyhelp if you please