How to setup a voip server with asterisk and voipeador SIP trunk to make and receive calls?

VOIPEADOR ACCOUNT DESCRIPTION:

Hablaporinternet.com always deliver the following information along with your IP Telephony customer account:

  1. Customer login/password information to access the IP Telephony control panel https://customer.hablaporinternet.com/
  2. Account Login/password information for each Extension (voipeador account). These values of voipeador login/service password are used to setup each voip device or softphone.

So you will get the customer main account and at least one voipeador extension (SIP trunk). You could have many extensions as you need. Please ask our support team for more extensions when you need them. Please use one extension per device; for example for softphone, IP phone, ATA, voip gateway, asterisk, elastix, trixbox, IP-PBXs, voip servers, or any other SIP standard device.

The following picture shows the Hablaporinternet CUSTOMER with many voip accounts (voipeador extensions). All extensions share the customer balance. Every extension is a voipeador SIP trunk account and can make or receive many simultaneous calls.

As per default, Hablaporinternet.com deliveries the Free customer account with a unique voipeador extension; however You could ask for more for Free. You could see the reports per extension or per service by using the customer web portal https://customer.hablaporinternet.com

 

VOIPEADOR DEMO ACCOUNT TO SETUP A SERVER WITH ASTERISK, ELASTIX, TRIXBOX, FREEPBX OR SIMILAR:

The following example will use a VOIPEADOR demo account with the credentials:

voipeador login=7777777777

voipeador Service password=clave321

SIP server=sip.hablaporinternet.com or IP address: 199.180.220.77

Codecs=g729, g711a and g711u

With this account we would make and receive calls.

 

ASTERISK CONFIGURATION:

After install Asterisk, please go to file directory etc/asterisk and find the file name sip.conf. Make sure to include the following red lines in this file:

Search in the file the text with [general] section and below that, please add the “registration” instructions :

 

[general] register=>7777777777:clave321@sip.hablaporinternet.com/7777777777

 

Now, in the same file sip.conf please add the following red lines for the SIP trunk definition:

[hablaporinternet] type=friend
username=7777777777
secret=clave321
host=sip.hablaporinternet.com
fromuser=7777777777
dtmfmode=RFC2833
canreinvite=no
insecure=port,invite
disallow=all
Allow=g729
allow=ulaw
allow=alaw
qualify=no
nat=yes
srvlookup=yes
context=from-hablaporinternet

Due to we have added the line “context=from-hablaporinternet”, we have to make sure there is a section [from-hablaporinternet] in the configuration file “extensions.conf”. This is very important in order to allow receive incoming calls. Later in this page you will see the explanation to receive incoming calls.

Save the changes and reload asterisk to apply the configuration.

You could use the suggested command to reload Asterisk:

asterisk -rx “reload”

 

CHECK CONFIGURATION AND CONNECTION STATUS:

Make sure the Asterisk is “registered” properly. Use the command:

SIP SHOW REGISTRY

 

Also you could get a list of registered peers with the command:

SIP SHOW PEERS

 

In order to see the registration details, please use the command:

SIP SHOW PEER <NAME>

 

Use the command HELP SIP to see help for additional CLI commands available.

 

EXAMPLE OF EXTENSION DEFINITION WITHIN ASTERISK TO TEST OUTGOING CALLS TOWARD HABLAPORINTERNET VOIPEADOR SIP TRUNK:

In the configuration file “sip.conf” You should have a section per each extension; for example the extension number 1000 would be something like:

[1000] type=friend
secret=unaclave123
dtmfmode=rfc2833
callerid=”First extension” <1000>
host=dynamic
canreinvite=no
context=myextensions

 

SETUP A DIALPLAN TO MAKE OUTGOING CALLS TO FIXED OR MOBILE DESTINATIONS:

Once You have completed the sip.conf file, save it and exit. Now go to  “extension.conf” file.

In “extension.conf” file you could change the dialplan configuration to make calls to fixed or mobile or international destinations.

Hablaporinternet expect to receive the destination number in E164 format. It means Country code+area code+phone number.

The Asterisk dialplan, has contexts. Each context has a collection of extensions

For each context, You need to define one or more extensions that Asterisk would use to match with the dialed destination number. For each extension, You tell Asterisk what to do by using a list of commands.

In the extensions.conf file look for the context section where there is the extension number you will use to make the test calls.

As per the example, we will call a mobile number in Colombia 573101234567. Let´s say the context is called  [myextensions]. The configuration lines you could put are:

[myextensions] ; Call to Colombia mobile number that begin with 3 (Any destination with more than 5 digits long and begin with 3, we will add the country prefix 57 before send it to Hablaporinternet network)
exten => _3XXXX.,1,Log(NOTICE, Dialing out from ${CALLERID(all)} to ${EXTEN:1} through Hablaporinternet)
exten => _3XXXX.,n,Dial(SIP/hablaporinternet/57${EXTEN:1},60)
exten => _3XXXX.,n,Playtones(congestion)
exten => _3XXXX.,n,Hangup()

Save the changes and reload the Asterisk. Suggested command to reload Asterisk:

asterisk -rx “reload”

 

TEST OUTGOING CALLS:

From the test extension, please dial the Colombia Mobile destination; as per our example 3101234567. The configuration we applied will add the country prefix 57 and will send the call to hablaporinternet network to be completed.

If You cannot complete that call, please enable debug or logs in your asterisk server. Also verify the SIP trunk is connected: You could use the following commands to check the asterisk:

sip show peers

sip set debug on

If you are still facing issues and cannot complete calls; please contact our support team by going to our Central point of contact: https://www.hablaporinternet.com/chaten

When there is call online, you could use the following command to see the voice channels used with asterisk; a channel to/from your SIP device, and another channel to Hablaporinternet network.

core show channels

 

INCOMING CALLS CONFIGURATION:

If we need to receive calls from Hablaporinternet network (for example by using a DID or free Hablaporinternet service), in our extension number 1000 in the asterisk, please make sure the configuration file “extensions.conf” should include information like this:

[from-hablaporinternet] exten => s,1,Log(NOTICE, Incoming call from ${CALLERID(all)})
exten => s,n,Dial(SIP/1000)
exten => s,n,Hangup()
; End of context “from-hablaporinternet”

Save the changes, reload asterisk and test incoming calls. You could ask for help to another voipeador user. He could make a direct call from his voipeador device to your voipeador number. Also You could buy DID or Toll-Free numbers and point them to your voipeador account and will receive incoming calls from another sip devices or traditional fixed/mobile lines.

2017-08-01T22:32:38+00:00

Leave A Comment