Although many asterisk users use one of the GUI interfaces such as Elastix or Freepbx, some users prefer to configure using the text files.
The files are typically located in the etc/asterisk directory. You will need to edit the files using vi, pico or an other text editor. It is wise to make a backup copy of the file before editing just in case.
By default, your SIP trunk will be initially setup to use SIP registration with user and password. For added security, you may want to configure your trunk to authenticate on your IP address if you have a static Ip address. This change can be done in our portal. The instructions below relate to the SIP regisatration setup.
You will be supplied with 4 parameters:
- The Ip address of our switch (shown as 220.127.116.11 in our examples)
- The username (shown as user00) in our examples)
- A secret (show as KMvJQC4sAM5SCD as a random password in our examples)
- A DID number (5141234567 in our examples)
Two files need to be edited. SIP conf sets up the trunk to connect to our switch. Extensions.conf is used to direct the incoming did to its destination
- Add the register string in the [general] section. register => client00:KMvJQC4sAM5SCD@18.104.22.168
- Add the server definition for this route. In the example below, this has been called [prodosec]
- Depending on your network configuration, the user and secret configuration lines may not be necessary
- We recommend using the ulaw g711 codec. We can configure for g729 alaw, but this is only recommended if you are facing bandwidth restrictions. Voicequality is slightly worse with the g729 code.
- In the context referred to in the SIP.conf file ([from_trunk] in this example, add the routing for your DID
You will need to run asterisk -r ad reload for the new settings to take