1. Home
  2. Phone
  3. Servers
  4. How to Install & Setup Asterisk PBX SIP Trunking

How to Install & Setup Asterisk PBX SIP Trunking

About

This article demonstrates step-by-step instructions for setting up Asterisk PBX SIP Trunking with Circuit ID.

Step-by-Step Instructions

The below table will detail the steps required to accomplish your goals:

1234

Login

Login to the Management Portal by clicking a sign-on provider or entering your Email Address and Password as shown in Exhibit 1. If you don't have an account, you can sign signup instantly by clicking here.
Management Portal Login Form

Add your Asterisk PBX Server(s) to Circuit ID

Follow the How to Add your Server(s) to Circuit ID guide

Purchase Phone Numbers

Follow the How to Purchase Phone Numbers guide to purchase one (1) or more numbers.

Configure Asterisk PBX 

  • Login to Asterisk PBX admin panel using cli
  • update sip.conf as following
Step1: Configure SIP Trunk

[general]                
register => g.pstn.circuitid.com:5060

[circuitid]
canreinvite=no
context=mycontext
host=g.pstn.circuitid.com 
secret=NA ;NA
type=peer
username=NA
disallow=all
allow=ulaw
; allow=g729 ; Uncomment if you support G729
fromuser=phonenumber i.e. 1234567890
trustrpid=yes
sendrpid=yes
insecure=invite
nat=yes

Step2: Configure Extensions
 
update extensions.conf  as following

[mycontext]
; Make sure to include inbound prior to outbound because the _NXXNXXXXXX handler will match the incoming call and create a loop
include => circuitid-inbound
include => circuitid-outbound

Step3: Configure outbound settings

[circuitid-outbound]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@circuitid)
exten => _1NXXNXXXXXX,n,Hangup()
exten => _NXXNXXXXXX,1,Dial(SIP/1${EXTEN}@circuitid)
exten => _NXXNXXXXXX,n,Hangup()
exten => _011.,1,Dial(SIP/${EXTEN}@circuitid)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(SIP/${EXTEN}@circuitid)
exten => _00.,n,Hangup()

Step4: Configure Inbound settings

inbound context example for your DID numbers

[circuitid-inbound]
exten => 17863643011,1,Answer() ;your DID

Localized Termination URIs

Region Hostname
US East (Virginia) useast.pstn.circuitid.com
US East 2 (Ohio) useast2.pstn.circuitid.com
US West (California) uswest.pstn.circuitid.com
EU (Ireland) euwest.pstn.circuitid.com
Asia Pacific (Singapore) apsoutheast.pstn.circuitid.com

Signalling IPs

RegionIPv4IPv6
US East (Virginia)107.21.33.492600:1f18:61b0:cb00:1ee:5287:d76a:2759
US East (Ohio)18.220.12.2192600:1f16:580:e00:7776:eb3e:433c:160c
US West (California)54.183.58.2282600:1f1c:1b2:8000:18c3:9b13:bbf9:1bcf
EU (Ireland)54.194.37.262a05:d018:a09:fd00:8c56:bdfd:40bf:1b8d
Asia Pacific (Singapore)52.77.98.1282406:da18:b5f:3800:7610:fe37:13e1:8228

Media IPs

RegionIPv4IPv6
US East (Virginia)107.21.35.1842600:1f18:61b0:cb00:6cc6:e72b:bd5f:21b4
US East (Virginia)54.88.36.2202600:1f18:61b0:cb00:558d:2cc:6b92:890a
US East (Virginia)34.230.206.692600:1f18:61b0:cb00:4f9b:55ca:686:4f04
US East 2 (Ohio)13.59.21.1652600:1f16:580:e00:861d:b45c:1fc2:4b70
US West (California)54.193.34.842600:1f1c:1b2:8000:76e7:a21d:89af:d836
US West (California)54.193.16.2272600:1f1c:1b2:8000:1b5b:7227:cac0:45e5
EU (Ireland)52.49.91.1172a05:d018:a09:fd00:c16b:fb2d:35f5:7a0a
Asia Pacific (Singapore)52.74.94.832406:da18:b5f:3800:549e:abbf:2e45:b283

Conclusion

Congratulations! You have now completed the "How-To Install & Setup Asterisk PBX Server with Circuit ID" article and we hope that you have accomplished the goals you set out to achieve. However, if for any reason you may still require assistance with setup, simply login to the Management Portal and submit a support request.


print
Updated on August 22, 2023

Was this article helpful?

Related Articles