Asterisk is open-source software, not hardware. It can run on any PC in a *nix environment, and does not require any hardware in order to be effectively used. Most users of Asterisk don't use any supplemental hardware apart from phone handsets.
There is a category of TDM and analog interface hardware (and a few other things, like transcoder offload cards) that is intended solely or principally to work with Asterisk. It is produced by Asterisk's corporate sponsor, Digium, and some of their competitors such as Sangoma and Rhino. I have worked with both Sangoma and Digium T1 cards, but they are not my main focus.
Hardware-wise, I work with a fair amount of proprietary stuff. For PRI connectivity, I heavily favour Cisco VoIP-ISDN gateways such as the AS5300 & 5400. I've worked with Lucent TNT MAXs (outfitted with VoIP DSPs), and a number of commercial softswitches.
But for the most part, I deal with pure-SIP topologies these days, as SIP trunking - particularly at the wholesale level - has gained considerable market acceptance in the last few years. As long as the quality is okay and the interoperability problems aren't too bad, people don't want to deal with bringing in TDM circuits anymore, as well as the longer contract terms that typically accompany them. On the other hand, those of my customers that do bother with TDM circuits certainly have the fewest problems, highest overall availability, and least use for me, at least with regard to infrastructure problems. :-)
I don't do a whole lot of Asterisk these days. For the most part, the stuff we build is based on Kamailio (http://www.kamailio.org).
Freeswitch can do it. You'll still lose a few seconds of audio, but that might be acceptable.
https://freeswitch.org/confluence/display/FREESWITCH/Enterprise+deployment+IP+Failover
​
But other than that, if you want to approach the "0 lost audio" path, yeah, you need a fucking complex system to do that. I've seen deployments with Kamailio, using rtpengine, that stored sessions and voice data in a redis cluster. This setup has the advantage of not needing to reinvite sip endpoints. Since redis is in-memory, the latency can be kept quite low, but man, I would not be the one to manage such a monster.
If it were just the asterisk boxes (and not individual registered users), I'd just use ip auth (see permissions) and either allow_trusted or allow_address...
if (allow_trusted()) { route(PSTN); #or return; etc... };
I can't remember the exact syntax, but I had to do SSL and TLS debugging on an SMTP server farm many years ago and it was a specific incantation of
openssl -switches -options -magic -fu <serverName>
I know there's plenty on Google. Try searching for "TLS debugging with openssl". In fact, here's a really good guide that pops up with that search, about the 5th link: http://www.kamailio.org/wiki/tutorials/tls/testing-and-debugging
Good luck.
Edit: missing words Edit2: got curious and wanted to remember how the heck it was done...posted result to save OP some Googling.
> The next release of Kamailio will be 4.3 – a release with new module and many new functions! The GIT branch for the coming release 4.3 has been created. This branch will host the release series 4.3.x. To help the developers, please download this branch and test it before the release! > > > > To get this branch from GIT, you can use: > > > > git clone https://github.com/kamailio/kamailio.git kamailio > > cd kamailio > > git checkout -b 4.3 origin/4.3 > > > > Notes about installing Kamailio from this branch are available at: > > > > http://www.kamailio.org/wiki/install/4.3.x/git > > > > Hopefully in about two weeks or so the full release of 4.3.0 will be out. > > > > The master branch is again ready for new features, to be part of the next future release, expected to be numbered 4.4.
you are trying to use freepbx as a routing/trunking device, which it is not meant or designed to do. freepbx is a PBX system.
take a look at either kamailio or one of the similar trunks for this type of routing.
I have seen people do this with a2billing for small systems (you mention 3 pbx customers), but it won't scale well beyond 10-15 moderately used systems.