How to configure Asterisk

Asterisk

Outbound

In order to make outbound calls using the Conversant service, you must create an entry in your sip.conf configuration file. This enables your Asterisk server to authenticate with our SIP proxy and successfully make an outbound call.

sip.conf
[C-Out]
allow=ulaw&alaw
canreinvite=no
disallow=all
dtmfmode=rfc2833
host=conversant.co.nz
fromdomain=conversant.co.nz
outboundproxy=proxy.conversant.co.nz
username=1234567
fromuser=1234567
secret=*******
type=peer

Note: Replace the username and fromuser with your Conversant SIP username. Replace secret with your Conversant SIP password.

In addition you will need to modify your dialplan (in extensions.conf) to pass calls to our proxy. An example follows:

extensions.conf
[default]
exten => _XX.,1,Dial,SIP/${EXTEN}@C-Out
exten => _XX.,2,Hangup

Inbound and Outbound

Your Asterisk server should register with our proxy server so that inbound calls are routed correctly. Add the following details to your sip.conf file (in addition to the changes described above in the Inbound section).

Register String: 1234567:password@conversant.co.nz/7654321

Note: Replace 1234567 with your Conversant SIP username. Replace password with your Conversant SIP password. Replace 7654321 with your DID number.

In addition you will need to modify your dialplan (in extensions.conf) to process the inbound call. An example follows:

extensions.conf
[default]
exten => 7654321,1,Dial,ZAP/g1
exten => 7654321,2,Hangup

FreePBX/TrixBox

Outbound

Create a SIP Trunk and complete the outgoing settings section.

Trunk name: Conversant outbound
allow=ulaw&alaw
canreinvite=no
disallow=all
dtmfmode=rfc2833
host=conversant.co.nz
fromdomain=conversant.co.nz
outboundproxy=proxy.conversant.co.nz
username=1234567
fromuser=1234567
secret=*******
type=peer

Leave Incoming and Register sections blank.
Note: Replace the username and fromuser with your Conversant SIP username. Replace secret with your Conversant SIP password.

In addition, create an outbound route to send dialled numbers to Conversant. In the example below dialling 7 and then the number will send the call to Conversant.

Outbound Routes (an example)
Route Name: Conversant outbound
Dial patterns: 7|X.
Trunk Sequence: SIP/Conversant outbound

Inbound and Outbound

Add the following details to your existing SIP trunk.

Register String: 1234567:password@conversant.co.nz/7654321

Note: Replace 1234567 with your Conversant SIP username. Replace password with your Conversant SIP password. Replace 7654321 with your DID number.

Modify the General Settings to allow unauthenticated calls.

Allow Anonymous Inbound SIP Calls?: Yes

In addition, create an inbound route to process incoming calls.

DID Number: 7654321

Note: Replace 7654321 with your DID number. Also choose the appropriate destination for the incoming calls. For example you could choose to call an extension, send the call to voicemail etc.