IAX trunk between Elastix 2.5 and FreePBX 13.0.190.19 Unable to negotiate codec

I’ve set up IAX trunks between two phone systems in two different buildings. It works one way, from the FreePBX box to the Elastix box, but when i call the other way I get an “All circuits are busy now” with HANGUPCAUSE=58. When i turn IAX2 debugging on, I see CAUSE: Unable to negotiate codec

Codec settings are the same on both sides:

Elastix IAX settings;

Trunk Name: BeavertonBradford

Peer Details:
context=from-internal
host=other PBX IP
username=IAXBeaverton
secret=secret
disallow=all
allow=g722&ulaw
type=peer
qualify=yes
trunk=yes

User Context: IAXBradford
secret=secret
type=user
context=from-internal

FreePBX settings:

Trunk Name: BeavertonBradford

Peer Details:
context=from-internal
host=other PBX IP
username=IAXBradford
secret=secret
disallow=all
allow=g722&ulaw
type=peer
qualify=yes
trunk=yes

User Context: IAXBeaverton

User Details:
type=user
secret=secret
context=from-internal

What settings can I change to get this working both directions?

Thank you,

Court

edited to rearrange peer details settings so they were in the same order in both.

Maybe add requirecalltoken=no

I added

requirecalltoken=no

to the Peer Details on both sides. No go.

If it’s the codec, try setting both ends to the same codec (uLaw being the obvious choice for licensing purposes). I know that we’ve seen problems with Asterisk “getting its heart set” on a codec and if it isn’t available, it just goes off in a snit.

I tried that. Since the call that works one way was using ulaw, I changed

allow=g722&ulaw

to
allow=ulaw

It didn’t seem to do anything.