Problem configuring IAX trunks

I cannot seem to get two Asterisk 11 boxes on the same LAN to connect via IAX. I have tried type=friend and removed the register statement and the registration is refused. The IAX peers show up correctly, but when I place a call from one box to the other…the console tells me everyone is busy/congested.

Here is my current setup:

Box A
(iax.conf)
[general]
autokill=yes

;disable DNS SRV lookups for outbound calls
srvlookup=no

;---------------------------------------------------------------------

register => poweredge:asterisk@192.168.1.213 ;Energy IVR PBX

;template for IAX-based inter-office connections
inter-office-trunk
type=friend
context=LocalSets
delayreject=yes ; delay authentication reject (limit brute force attacks)
disallow=all ; reset the available voice codecs
allow=ulaw ; prefer the ulaw codec
allow=alaw ; but also allow the alaw codec

energy-ivr
username=CO_IVR
secret=asterisk
host=192.168.1.213

(extensions.conf)
[globals]
EnergyIVR=IAX2/energy-ivr

[LocalSets]
exten => 1000,1,Dial(${EnergyIVR}/${EXTEN})
same => n,Hangup()

Box B
(iax.conf)
[general]
autokill=yes

;disable DNS SRV lookups for outbound calls
srvlookup=no

register => CO_IVR:asterisk@192.168.1.189

;--------------------------------------------------------------

;template for IAX-based inter-office connections
inter-office-trunk
type=friend
context=internal_demo
delayreject=yes
disallow=all
allow=ulaw
allow=alaw

;--------------------------------------------------------------

;define a trunk location to first test box
energy-ivr
username=poweredge
secret=asterisk
host=192.168.1.189

(extensions.conf)
[globals]
EnergyIVR=IAX2/energy-ivr

[internal_demo]
exten => 1000,1,Goto(mo_eivr,s,1) ;dial 1000 to access the Missouri Energy IVR Demo
same => n,Hangup()

Whenever I dial 1000, from Box A I get the following:

-- Executing [1000@LocalSets:1] Dial("SIP/energy_ivr1_NIN6PeRY7-00000012", "IAX2/energy-ivr/1000") in new stack
-- Called IAX2/energy-ivr/1000
-- Hungup 'IAX2/energy-ivr-2921'

== Everyone is busy/congested at this time (1:0/0/1)
– Executing [1000@LocalSets:2] Hangup(“SIP/energy_ivr1_NIN6PeRY7-00000012”, “”) in new stack
== Spawn extension (LocalSets, 1000, 2) exited non-zero on ‘SIP/energy_ivr1_NIN6PeRY7-00000012’

iax2 show registry gives me this:
Host dnsmgr Username Perceived Refresh State
192.168.1.213:4569 N poweredge 60 Rejected
1 IAX2 registrations.

Any help would be greatly appreciated.

From my trials, I found that using registeration with static peer (host not dynamic) sometimes don’t work.

Try to remove the registration stanza from both side.

Also get verbose messages from box B.

That doesn’t work…as I’d indicated in the second sentence of my post, I’ve tried removing the register statement, and playing with different combinations of TYPE.

As far as verbose messages from Box B…they don’t exist because the call never makes it to Box B.

Any other ideas??

Nevermind…I got it. I wasn’t thinking of the IAX peers like SIP endpoints…so just like with registering a SIP phone - the username has to match the section in sip.conf.

So in aix.conf; Box A & B both needed ‘energy-ivr’ as username since the names of the stanzas were both ‘energy-ivr’.