SIPFLEX GUIDE

Asterisk PJSIP IP peering

Use an identify section to associate calls from the current Sipflex network address with a restricted endpoint.

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.

  • A fixed public IPv4 address saved in Sipflex
  • PJSIP enabled
  • SIP and RTP restricted to 52.56.188.70/32
  • 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. Select IP peering and save the public IP of your Asterisk system in Sipflex.
  2. Back up pjsip.conf and extensions.conf.
  3. Create a transport, AOR and endpoint without registration authentication.
  4. Create an identify section matching only 52.56.188.70/32.
  5. Add restricted inbound and outbound dialplan contexts.
  6. Reload PJSIP and verify the endpoint and identify match before testing calls.
; /etc/asterisk/pjsip.conf
[sipflex-udp]
type=transport
protocol=udp
bind=0.0.0.0

[sipflex-aor]
type=aor
contact=sip:sip.sipflex.co.uk:5060

[sipflex-endpoint]
type=endpoint
transport=sipflex-udp
context=from-sipflex
disallow=all
allow=alaw
allow=ulaw
dtmf_mode=rfc4733
aors=sipflex-aor
direct_media=no

[sipflex-identify]
type=identify
endpoint=sipflex-endpoint
match=52.56.188.70/32

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

[outbound-sipflex]
exten => _X.,1,Dial(PJSIP/${EXTEN}@sipflex-endpoint)
 same => n,Hangup()
Firewall requirement

Accept provider SIP and RTP only from 52.56.188.70/32. See the generic peering guide for the complete port table.

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