In this day and age you cannot directly compare a soft switch to a PBX. A soft
switch, or software that connects phone lines with one another, is
at the core of all modern PBXs. Asterisk is not a PBX but it can be configured to function as
one. Also most of the functions provided by an PBX can also typically be
performed by a class 5 soft switch.
Perhaps an example will help clear things up.
A telephone exchange is a system that allows telephone lines to be connected (bridged) to one another. If you pick up
your phone in your house and dial your neighbor's home phone (assuming you are
both using the local phone company) the telephone company's exchange detects
the digits you dial and if you dialed your neighbors phone number connects
your phone to your neighbors. You two can now talk and plan your next block
party.
Now what if you wanted to pick up your phone in your kitchen and dial a number
which rings a phone in your bedroom? One option is to order two phone lines
from your phone company, install one in your kitchen and the other in your
bedroom, and use their exchange to connect them just like when calling your
neighbor. Another option is to install your own exchange, a private branch
exchange (PBX), that would allow you to pick up the phone in the kitchen and
dial an extension which will ring and connect to the phone in the bedroom
without using the phone companies exchange.
Connecting phone lines together is what a PBX does at it's most basic level.
Which is the same thing a soft switch does. Except that a PBX can do it either
with custom hardware as was the case before general purpose computers were so prevalent or
purely in software as modern PBXes and soft switches do today.
Custom hardware
is only needed depending on the type of telephone network(s) you need to
connect to. If all your endpoints are IP based like SIP phones or softphones
and your outside connectivity is provided over the internet like Vonage,
Skype, or SIP trunks your PBX only needs a network adapter to bridge them and not any specialized telephony hardware. On the other hand if you have
analog endpoints like the typical residential phones you might have in your
kitchen and bedroom you would need hardware that can detect if the handsets
are on or off hook, generate the voltage to cause a ring and digitize the
sound. Likewise if your outside connectivity is via copper wires from your
phone company you would need custom hardware in order to bridge the endpoints
(IP-based or analog) of your PBX to the phone network.