Good morning, community.
I work for a large Brazilian company present in more than 100 locations across the country. Currently, each location has an Ericsson MD110 or Alcatel Lucent PABX, all distributing metallic pairs throughout the facilities. I am in charge of modernizing the entire system so that the entire company uses VoIP telephony. As you can imagine, I chose Asterisk as the platform. Approximately 10 locations have already been modernized, but seeking to increase the efficiency of the network, I am looking to create two hubs, one in the country’s capital (BrasĂlia) and another in the host city (Rio de Janeiro). I’m having difficulty configuring the central hubs because they don’t have registered extensions, just working as digit routers, as if they were a telephone operator. For all the questions I had, the forum was accurate, but I can’t find this solution. The initial question would be how the notes in pjsip.conf and dialplan.conf would look in this presented scenario. All IPs are fixed, within a national INTRANET (MPLS/SD-WAN), always within a network 10. The illustration elucidates the scenario.
I think you meant extensions.conf
when you mentioned dialplan.conf
, unless it is an external file included within the extensions.conf
file. Replying to your two questions in your post: based on the image, both Central Asterisk Hub 1 and 2 will act solely as call routing, and all the IP addresses are fixed. To provide an accurate response to your question, it would be necessary to determine the call routing scheme you’d like to implement. There is no general dialplan rule for this; the dialplan works like a programming language and can be customized based on your business needs. In relation to the pjsip
configuration, it’s evident that you’ll need to ensure all client Asterisk systems accept INVITE requests from the central hubs, as these hubs will act as call routers.
Do you have a specific reason for having Asterisk as the two hubs? Unless you have a specific reason for using Asterisk there, I would suggest using Kamailio or similar instead.
Unless there’s something you’re not showing or telling, you just want to send calls between the Asterisk servers, and letting kamailio do this, will make a much simpler infrastructure.
Kamailio has a steep learning curve, but with a setup like what you’re specifying here, it seems like the best tool for the job.
If you already have some local sites modernized without using hub locations, I assume each site has its own trunking for inbound and outbound calling.
If this is the case, the conclusion is that the efficiency you are looking to gain is site-to-site dialing (keeping internal calls internal).
You may want to look at the “switch” directive in the dialplan configuration area - it allows you to share (effectively to import) a dialplan from a remote switch. Your hubs could be configured to import the remote dialplans, and can then be used to guide any calls received by the hub location to the appropriate branch location, without having to explicitly configure each branch extension at the hub locations.
https://docs.asterisk.org/Configuration/Dialplan/Switch-Statements/
- Darrin
Yes, of course, extensions.conf, sorry for the glitch. All instances have their own connection with the telephone operator, however, to make calls between the company’s units, the project is to use the INTRANET. As a first priority, use the closest hub (considering the large geographic size of Brazil), as a second priority, the most distant hub and as a third priority, the exit itself with the local PSTN. All centers are behind a PaloAlto firewall, with the proper authorizations configured. The point of doubt is about the routing process for these calls, since there are no extensions registered in the hubs.
Due to the lack of experience in a scenario of this size, guidance on a better choice is very much appreciated. I have no knowledge about Kamailio. I did a little research on this solution and it seems extremely robust, but as well said, with a challenging learning curve. The idea here is simply to route calls between units with Asterisk already installed. Queue functions, voicemail for example, are not used. The demand is about classic telephony. In a scenario like this, would using Asterisk itself as a concentrator be the best alternative or would Kamailio be a better alternative, considering the learning to be developed?
You don’t actually need to register any SIP endpoints (extensions) on the hub machines. Since the other Asterisk servers have static IPs, you only need to route calls to them based on a SIP URI dialing. All of this can be easily achieved with Asterisk, but you still need to define the routing strategy between the Asterisk servers.
Best solution for that scenario, would be to use Kamailio as the router between Asterisk boxes. By default all voice traffic will be routed through Asterisk, which puts quite a load on the servers, compared to handling a similar call volume with Kamailio.
For your scenario, you would need to setup, in Asterisk, an endpoint that allows your hub routers to send calls to Asterisk, either with the public phonenumbers or internal extensions.
In Kamailio (Or Asterisk if you use that as the hub router) you would then need to have some sort of mapping between the locations and the available numbers, or simple bruteforce the location by dialing all Asterisk locations one by one (It’s possible, requires basically 0 setup, generates a lot of errors in the Asterisk logs, and increases call setup times, especially for the location at the bottom of the list)
In Kamailio you would usually setup the mapping in an external database for the routing destinations. (We use MySQL, but to my knowledge, others are supported.) In Asterisk you would most likely either hardcode prefixes in the dialplan, or enter them into AstDB, for easy reference in the dialplan.
Personally I would invest the time in setting up Kamailio, as the role you require for your hubs, is really what Kamailio is designed to do, Asterisk, while certainly able to do the job, is not.
The required setup is really as basic a Kamailio implementation, as you can get. It’s simple call routing. Using Kamailio, would also make it easy, at a later point, to ditch the local PSTN breakout at each location, and route all calls to the PSTN through a few central locations, which could lead to savings in traffic costs, depending on the phone rate structure.
I would also look into handling failover, that is, if local PSTN breakout for a single location is not possible, you could route the calls to another location, where the PSTN breakout is working. Again, depending on rates, and how you charge calls for each location. It would require some more setup on your part, as you’d need to keep track of who called who, instead of knowing that every PSTN call originated from a certain location based on the circuit.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.