How to set up SIP-account in your Asterisk configurations

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 source. Asterisk is sponsored by Digium.

Step 1: Creating a new SIP account

Each user has a set of credentials which will be needed to configure each SIP-account:

To create a new one, check out this quick instruction.

Step 2: Configure your Asterisk software settings.

1. 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:password@sip.ringostat.com/login_ringostat, where
login_ringostat – your SIP-account login;
password – the SIP-account password

sip.ringostat.comRingostat 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:
Password1@sip.ringostat.com/supportringostat_example

2. Setting 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 the 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= default

3. Setting 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, SIP-account will have online status in the Virtual PBX - SIP account section of your project.


In case you need any assistance feel free to contactour Support team via chat or through the email support@ringostat.com.

Is article helpful?