How to configure an ASTERISK PBX IP trunk

Our focus in this article is to achieve the connection between your ASTERISK PBX, and our Mission Control Portal. We will describe a sample configuration that has been successfully tested on our side. ASTERISK version 11 was the version of ASTERISK that was used for this sample configuration and this configuration will cover some earlier versions of Asterisk and all versions beyond ASTERISK 11.


Once you have configured the following steps, you can take advantage of leveraging our Mission Control Portal to maximize your business operations.

  • You will have to create a peer for a phone extension and for Telnyx. On your ASTERISK server open your sip.conf file (usually located under /etc/asterisk/ directory) and place the following configuration:
[1001]          ; phone extension name
type=friend
context=1001_dialplan
allow=ulaw,alaw
secret=your_password
host=dynamic
[TELNYX]
type=friend
context=1001_dialplan
host=sip.telnyx.com
disallow=all
allow=ulaw
allow=alaw
dtmfmode=rfc2833
insecure=port,invite
  • You will need to create a dial plan to allow for inbound and outbound calls through Telnyx's switch. On your ASTERISK server open your extensions.conf file (usually located under /etc/asterisk/ directory) and place the following information, for USA 10 or 11 digit dialing. Place the DID from your portal account in the dial plan, under the inbound comment (;Inbound). In my example the DID is 6468688074.
[1001_dialplan]
exten => 1001,1,Dial(SIP/1001)
exten => _NXXNXXXXXX,1,Dial(SIP/${EXTEN}@TELNYX)        ;  US 10 digit dialing
exten => _NXXNXXXXXX,2,Congestion()
exten => _NXXNXXXXXX,3,Busy()
exten => _NXXNXXXXXX,4,Hangup
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@TELNYX)       ; US 11 digit dialing
exten => _1NXXNXXXXXX,2,Congestion()
exten => _1NXXNXXXXXX,3,Busy()
exten => _1NXXNXXXXXX,4,Hangup
;Inbound
exten => 6468688074,1,Dial(SIP/1001)    ; 10 digit inbound dialing
exten => 16468688074,1,Dial(SIP/1001)   ; 11 digit inbound dialing
;International Dialing
exten => _NXXNXXXXXX,1,Dial(SIP/${EXTEN}@TELNYX)

Your ASTERISK PBX trunk should be ready to go!

Can't find what you're looking for? Click the chat bubble at your lower right hand corner and start a chat!

Did this answer your question?