Integrating FreePBX with Movistar's fiber optics

If you have Movistar fibre optics in your home or company, maybe you didn't know that you can use it to connect through a SIP softphone or an IP PBX to make and receive calls from your phone line. Interesting for any company, Or what? And for home for home automation issues that are not even painted 🙂 In this post we will see all the necessary steps to make it fully functional!

 

What I said, if you have a fibre optic connection with Movistar, we can very easily use an Asterisk or a softphone to use it and make or receive calls, we will use the FreePBX that we installed in a previous document. So when they call us at home or at the office, we will be able to answer calls with our laptop and headphones, For example, or directly on our mobile, Of course.

In this document we will see how to create the connection with Movistar through a Trunk, later, Optionally we will create a group where we will put all the extensions that we want to receive the calls to the Movistar landline, and we'll end up creating the rules for outbound and inbound routes.

 

So, If we're going to “Connectivity” > “Trunks”

 

We will create a Trunk from “Add Trunk” > “Add SIP (chan_sip) Trunk”,

 

We give the Trunk a name

 

On the “sip settings”, in “Outgoing”, we enter a name and in PEER Details we add:

[SourceCode]type=peer
fromuser=94xxxxxxx (We put our landline phone)
secret=94xxxxxxx (We put our landline phone)
fromdomain=telefonica.net
host=telefonica.net
outboundproxy=10.31.255.134:5070
port=5070
nat=yes
insecure=port,Invite
dtmfmode=auto
disallow=all
allow=ulaw,alaw[/SourceCode]

 

On the “Incoming”, in USER Context we will put 'from trunk', and in USER Details we put:

[SourceCode]type=peer
username=94xxxxxxx (We put our landline phone)
secret=94xxxxxxx (We put our landline phone)
fromdomain=telefonica.net
host=10.31.255.134
port=5060
outboundproxy=10.31.255.134
qualify=no
nat=yes
insecure=port,Invite
dtmfmode=auto
canreinvite=no
disallow=all
allow=ulaw,alaw
outboundproxyport=5070
[/SourceCode]

 

Before you set up incoming rules, we must think about whether we want to make calls to a specific extension or to several when we are called to the landline, In this example we create a group and all the softphones will ring at the same time! Since “Applications” > “Ring Groups”,

 

Click on “+ Add Ring Group”,

 

And we created the group, I will put the Extension of the 999 and I'll include the extension 101 and 102, We recorded with “Submit”,

 

Since “Connectivity” > “Inbound Routes” Let's configure what we'll do with the call input,

 

Click on “+ Add Inbound Route”,

 

As it is the first and only rule, we will use an ANY / ANY and we will indicate in the destination the group of extensions that we have just created. Click on “Submit”,

 

In “Connectivity” > “Outbound Routes” we will enable the Movistar Trunk to be used to make outgoing calls,

 

Click on “+ Add Outbound Route”,

 

We give the route a name and add the Movistar Trunk that we created at the beginning.

 

On the “Dial Patterns” will be where we will specify the filter of which numbers will be able to come out of that Trunk, Watch out for allowing everything, since Movistar could make calls to toll numbers and then you get to the bill or calls to Nigeria… You already know… so we set up the pattern of the numbers that will be able to come out x this Trunk. In this case I allow [9]XXXXXXX that will allow my softphone to call any number in 8 digits that begins with a 9, And what I said, This may still be unsure that you accept someone calling a 906, eh! And to allow calls to mobile phones I also add the [6]XXXXXXXX, Yes? Well, It's best if you each set up the patterns in more detail.

“Submit” to record,

 

And then we can click on “Apply Config” and try to make a call with a softphone that we have configured through our FreePBX or Asterisk, or be ready to receive any incoming calls to the landline in the office or home!

 

By the way, A Comment, From time to time my trunk usually falls off, after investigating, I detected that it is usually because it does not resolve which IP has telefonica.net. After seeing in forums and even if you use Telefónica's DNS, it happens, So just in case it happens to someone, adding in '/etc/hosts’ entry '213.4.130.95 telefonica.net’ will fix the problem after restarting the machine! 🙂

 

Recommended Posts

Author

nheobug@bujarra.com
Autor del blog Bujarra.com Cualquier necesidad que tengas, Do not hesitate to contact me, I will try to help you whenever I can, Sharing is living ;) . Enjoy documents!!!