SIPFLEX GUIDE

Asterisk IAX2 trunk

IAX2 uses a single protocol for signalling and media and remains a supported Sipflex connection option.

Before you start

Sign in to the Sipflex portal and open the trunk you want to connect. Keep the profile, phone number or username and account-specific credentials visible while you configure your system.

  • Asterisk with chan_iax2 enabled
  • IAX2 username and secret from the portal
  • UDP 4569 permitted between Asterisk and Sipflex
  • A restricted inbound dialplan context
Use the current Sipflex endpoints.

The SIP registrar is sip.sipflex.co.uk and the IAX2 host is iax.sipflex.co.uk. Usernames and passwords remain account-specific and are shown in your portal.

Configure the connection

  1. Choose IAX2 registration for the trunk in Sipflex.
  2. Back up iax.conf and extensions.conf.
  3. Replace USERNAME and SECRET in the registration and peer sections below.
  4. Keep the inbound context restricted and enable only the codecs you need.
  5. Reload IAX2 and run iax2 show registry and iax2 show peers.
  6. Test inbound, outbound and multi-call behaviour before enabling IAX2 trunking for production.
; /etc/asterisk/iax.conf
[general]
bindport=4569
bandwidth=low
disallow=all
allow=alaw
allow=ulaw

register => USERNAME:SECRET@iax.sipflex.co.uk

[sipflex]
type=friend
host=iax.sipflex.co.uk
port=4569
username=USERNAME
secret=SECRET
auth=md5
context=from-sipflex-iax
trunk=yes
disallow=all
allow=alaw
allow=ulaw

; /etc/asterisk/extensions.conf
[from-sipflex-iax]
exten => _X.,1,NoOp(Incoming Sipflex IAX2 call to ${EXTEN})
 same => n,Dial(IAX2/your-destination)
 same => n,Hangup()

[outbound-sipflex]
exten => _X.,1,Dial(IAX2/sipflex/${EXTEN})
 same => n,Hangup()

Generate a customised configuration

Verify the service

  1. Confirm the trunk is registered or that the correct public peer IP is saved in the Sipflex portal.
  2. Place an outbound test call and check the caller ID presented.
  3. Call the Sipflex number from another network and confirm it reaches the expected inbound context or route.
  4. Check two-way audio and RFC4733/RFC2833 DTMF.

Support scope

We can check Sipflex credentials, registration state and provider-side call routing. Your PBX, device, firewall, dial plan and application remain your responsibility.

Contact support