Asterisk Configuration Guide

Asterisk Configuration Guide

Asterisk is a very popular open source PBX which will work well with our platforms. Other variants/forks of Asterisk include FreePBX, Trixbox and Callweaver. You can connect to our service using either the SIP or IAX2 protocol. The way you configure your Asterisk server is up to you, but the following provides a good template to start making calls through Tech Connections Internet.



Configure Asterisk with Tech Connections Internet using CHAN_SIP

/etc/sip.conf

Replace <yourphonenumber> with your phone number and <yourpassword> with your phone password

[general]
registerattempts=0
registertimeout=20

; Register line should be somewhere inside your general section

register => <yourphonenumber>:<yourpassword>@sip.techconnections.co.nz/<yourphonenumber>

[techconnectionsInternet]
type=friend
username=<yourphonenumber>
fromuser=<yourphonenumber>
secret=<yourpassword>
host=sip.techconnections.co.nz
context=default ; or your own selected context if desired
dtmfmode=rfc2833
disallow=all
allow=alaw
allow=ulaw
;allow=g729 ; only if you have licenses to use it
nat=yes
canreinvite=no
insecure=invite,port ; use very in older versions of Asterisk such as v1.4


extensions.conf

[default]

;receive incoming calls to a connected phone
exten => s,1,Dial(SIP/<yourphonenumber>)

; outbound calls (outside of your own PBX)
exten => _X.*,1,Dial(SIP/${EXTEN}@techconnectionsInternet)


Configure Asterisk with Tech Connections Internet using PJSIP

/etc/pjsip.conf

Replace <yourphonenumber>; with your phone number and <yourpassword>; with your phone password

;==============TRANSPORTS

[simpletrans]
type=transport
protocol=udp ; or tls for TLS registration
bind=0.0.0.0

;===============TRUNK

[techconnectionstrunk]
type=registration
outbound_auth=techconnections
server_uri=sip:sip.techconnections.co.nz
client_uri=sip:<yourphonenumber>@sip.techconnections.co.nz
retry_interval=60

[techconnectionstrunk]
type=auth
auth_type=userpass
password=<yourpassword>
username=<yourphonenumber>

[techconnectionstrunk]
type=aor
contact=sip:sip.techconnections.co.nz:5060 ; or sip.techconnections.co.nz:5061 for TLS registration

[techconnectionstrunk]
type=endpoint
context=from-external
disallow=all
allow=alaw
outbound_auth=techconnectionstrunk
aors=techconnectionstrunk

[techconnectionstrunk]
type=identify
endpoint=techconnectionstrunk
match=sip.techconnections.co.nz


Configure Asterisk with Tech Connections Internet using IAX2

/etc/iax.conf

Replace <yourphonenumber> with your phone number and <yourpassword> with your phone password

[general]
bandwidth=low
disallow=all
allow=gsm
allow=alaw
allow=ulaw
allow=ilbc
trunkfreq=20
trunktimestamps=yes tos=ef

register => <yourphonenumber>:<yourpassword>@iax2.techconnections.co.nz

[<yourphonenumber>]
type=friend
username=<yourphonenumber>
trunk=yes
context=from-trunk ;(* See below note on context)
host=iax2.techconnections.co.nz
secret=<yourpassword>
auth=md5
disallow=all
allow=gsm
allow=alaw
allow=ulaw ;(specify your own codec preferences in the allow's here)

Notes* If your context for incoming calls is not 'from-trunk' then you will need to login to the Tech Connections Internet Portal and change your 'IAX2 context' under the 'Preferences' area and then the 'Voice Quality & Networking' section. Here you can specify your own context string used for incoming IAX2 calls.

** If you wish to have multiple numbers presented over IAX2 then you need to create a 'register' and 'peer' entry for each number in your IAX configuration file since each line on your account acts independantly.


    • Related Articles

    • Asterisk Based PBX Systems (including FreePBX, Trixbox, Elastix and other variants)

      Tech Connections Internet are passionate about Asterisk, Freeswitch and other open source initiatives. So much so that we use open source products throughout our own network. By embracing open source initiatives we believe this gives us a unique ...
    • Asterisk

      Tech Connections Internet is deeply committed to open source technologies like Asterisk, Freeswitch, and OpenSIPs. We utilise these open source products extensively within our network. By embracing open source initiatives, we aim to contribute to the ...
    • Yealink W52P DECT VoIP Phones - Manual Configuration

      Quick Guide Step 1: Base Station The W52P base station can be powered by the supplied 120/240v adaptor or alternately from a POE switch. Install the 2 x AAA rechargeable batteries into the handset (and recharge if required). Enter the IP address in ...
    • Polycom VVX IP Phones – Manual Configuration

      Polycom VVX IP Phones – Manual Configuration Customize the following features on your Polycom VVX handsets. Manually Configuration Changing the Handset label Extension dialling Handset Volume Upgrading Firmware Presence and BLF (Busy Lamp field) VVX ...
    • Zoho Integration Guide

      Tech Connections has developed an innovative solution to integrate your phone system with the Zoho platform helping your sales and support teams handle calls more effectively. Your users can manage all of their call-related activities inside Zoho and ...