Broadsoft Trunk for Asterisk PBX

Broadsoft is the top VOIP service provider with his rich service suit. The main motive behind this article is to archive the configurations and help fellow practitioner who are also engaged in the same stuff.

Asterisk 12.0 and above has PJSIP Channel driver which is more enhanced and modular.In this example we are using PJSIP. We need to configure Inbound , Outbound and internal traffic for Asterisk. i.e. –

1. Call from Broadsoft User to Trunk User.
2. Call from trunk User to Broadsoft User.
3. Call between two Trunk Users.
4. Call between two Trunk Users through Broadsoft.

First we need to create a SIP Trunk which will divert SIP traffic to and from Broadsoft Application Server.

On Broadsoft Application Server , we need to create a trunk Group under Group,Pilot User (whose device type should be of PBX enabled,Dynamic registration enabled). We need to create Trunk User i.e 6001,6002 in below example.

On Asterisk , Trunking Configuration should be done in /etc/asterisk/pjsip.conf.

Trunk Configuration –

[MyTrunk]
type = endpoint
aors = MyTrunk
outbound_auth = MyTrunk-auth
context = incoming
disallow=all
allow=ulaw
[MyTrunk]
type = aor
contact = sip:serviceproviderdommain.com
qualify_frequency = 15

[MyTrunk-auth]
type = auth
auth_type = userpass
username = PilotUserName
password = PilotUserPass

[MyTrunk-reg]
type = registration
outbound_auth = MyTrunk-auth
server_uri = sip:serviceproviderdommain.com
client_uri = sip:PilotUserName@serviceproviderdommain.com
contact_user = PilotUserName

[MyTrunk-identify]
type = identify
endpoint = MyTrunk

Endpoint Configuration –

 

[6001]
type=endpoint
context=outdial
disallow=all
allow=ulaw
auth=6001
aors=6001
direct_media=no
[6001]
type=auth
auth_type=userpass
password=6001
username=6001

[6001]
type=aor
max_contacts=1
qualify_frequency=60

 

[6002]
type=endpoint
context=outdial
disallow=all
allow=ulaw
auth=6002
aors=6002
direct_media=no
[6002]
type=auth
auth_type=userpass
password=6002
username=6002

[6002]
type=aor
max_contacts=1
qualify_frequency=60

 

Dial Plan Configuration should be done in /etc/asterisk/extensions.conf