Asterisk is an open-source framework for building communications applications. Asterisk turns an ordinary computer into a communications server. Asterisk powers IP PBX systems, VoIP gateways, conference servers, and other custom solutions. It is used by small businesses, large businesses, call centers, carriers, and government agencies, worldwide. Asterisk is free and open sources sponsored by Digium.
Step 1: Creating a new SIP account
Each user has a set of credentials that will be needed for setting SIP-account:
Step 2: Configure your Asterisk software settings
Configure external registration of the SIP account for inbound and outbound calls.
Set up the registration of the SIP account in the configuration file sip.conf. Here you should add the "register" rule in the [general] section:
register => login_ringostat:[email protected]/login_ringostat
, where:
login_ringostat – your SIP account login;
password – the SIP account password;
sip.ringostat.com – Ringostat PBX domain;
login_ringostat – extension number for taking the calls in your Asterisk.Default extension usually is "
s
", but you can set the one you need.
Example:register => supportringostat_example:[email protected]/supportringostat_example
Set the trunk configurations for the outbound calls.
Add the [SIP-account login] section, and the trunk settings in your configurations file sip.conf. So, this setting will allow you to make outbound calls.
Here's how you can do this:[login_ringostat]
username=login_ringostat
secret=mypassword
type=peer
host=sip.ringostat.com
port=5060
nat=force_rport,comedia
cancallforward=yes
canreinvite=update,nonat
context=default
disallow=all
allow=ulaw
allow=alaw
allow=gsm
allow=opus
[login_ringostat]
username=login_ringostat
secret=mypassword
host=dynamic
type=friend
context= defaultSetting the inbound and outbound calls forwarding.
Add the dial plan rules in the [default] section in your configurations file extensions.conf.
Inbound calls: exten => login_ringostat,1, Dial(SIP/login_ringostat)
Outbound calls: exten => _Х.,1, Dial(SIP/login_ringostat/${EXTEN})Once you finish all the configurations, the SIP account will have online status in your project's "Virtual PBX" => "SIP account section".