XS AlienVoIP with Asterisk

Using AlienVoIP SIP account with Asterisk

AlienVoIP connect to Asterisk or FreePBX Configuration

AlienVoIP connect to Asterisk or FreePBX

Asterisk or FreePBX is an open-source server-based PBX system. It is widely used because of its flexibility and lower cost. AlienVoIP is running on SIP protocol, hence it can be connect to any Asterisk-based system.

By utilizing AlienVoIP SIP account, the Asterisk/FreePBX is able to make calls to the PSTN network, which includes all mobile operators and fixed lines.

By using AlienVoIP SIP trunking in Asterisk, the whole office will benefit from low-cost communication while maintaining the voice quality. At the same time, the Asterisk PBX can be configured with dial plan to suit the environment’s requirements. For instance, some calls are directed to AlienVoIP (especially overseas calls) and some are still using local provider.

Asterisk installation & configuration

Before attempting to configure your Asterisk server, make sure that you are registered to AlienVoip and your account is activated with credits and at least 1 SIP username.

Please contact us to guide you creating an account with AlienVoip.

The guide below assumes that you have an Asterisk server already running and have completed the necessary steps mentioned above and agreed to our terms and conditions.

Step 1

Configure your sip.conf file, by default, the file is located in /etc/asterisk/sip.conf

[general]                                         ; General setup
bindport=5060
bindaddr=0.0.0.0
context=default
defaultexpirey=3600
maxexpirey=3600
rtptimeout=60
rtpholdtimeout=300
rtpkeepalive=1
dtmfmode=rfc2833
nat=yes
disallow=all
allow=g729
qualify=yes
registertimeout=60

; Register your AlienVoip SIP username and password to AlienVoip’s SIP server
register => 605600110:password:605600110@sip1.alienvoip.com:5060/605600110

; Setup an account
[alienvoip]                                  ; Give your gateway a meaningful name
port=5060                                 ; AlienVoip uses port 5060 for VoIP authentication
type=friend                                ; Set this to friend
secret=password                     ; This is your password for your SIP username
username=605600110        ; This is your SIP username
fromuser=605600110          ; This is your SIP username
host=sip1.alienvoip.com     ; This is where AlienVoip’s sip registration server is located
canreinvite=no
qualify=yes
nat=yes                                        ; Depending on your network condition, if your Asterisk is located behind a router,
; set it to yes, if your asterisk server has a public IP of its own, set it to no
context=INCOMING               ; If your asterisk server allows incoming AlienVoip to AlienVoip calls, give
; this a meaningfull context
disallow=all                                ; First disallow all codecs
allow=ilbc                                  ; Allow codecs in order of preference
                                   ; see doc/rtp-packetization for framing options

[101]                                              ; Register an account for your SIP client
username=101
callerid=testing <101>
secret=101
regexten=101
host=dynamic
nat=yes
canreinvite=no
type=friend
qualify=yes
context=alienvoip
disallow=all
allow=ilbc
allow=gsm
dtmfmode=rfc2833
canreinvite=no

Step 2

Configure your extension.conf file to use the SIP user you have just defined in sip.conf, by default, the file is located in /etc/asterisk/extensions.conf

[alienvoip]
exten => _X.,1,NoOp()
exten => _X.,n,Dial(SIP/alienvoip/${EXTEN},60)
exten => _X.,n,Hangup()

The example above is a general view of a basic dial-plan in Asterisk, you can configure your dial-plan to suit your need in your production server.

Once you have done all necessary configurations above, your server is ready to make calls to AlienVoip

Please contact our team if you need any support to configure SIP trunk at your PBX.