The IAX trunk goes to another Asterisk instance that then uses SIP to connect to the PSTN. It’s the same config as in IAX2: Transfering a call back to originating server this is the stasis app in the enclave. The IAX config is dead simple, just this:
[general]
bandwidth=high
disallow=lpc10
jitterbuffer=no
encryption=yes
autokill=yes
[otherserver]
<The usual host and auth bits>
qualify=yes
trunk=yes
The SIP config is more complex, I can post it here if needed but it’s largely documented in this thread: ASTERISK and TWILIO - #16 by TJNII Note that this happened before I set up the encryption and I haven’t reproduced since.