I have a little experience with this. I worked for a call center for 8 years... (but I was not the PBX guy, I was a systems admin so my verbiage might be off)
Our main call center (we had about 4 at one time) used T1 and DC3 lines coming in from multiple telco providers. This call center was about 350-380 call center seats and about 500-600 lines total office. This is just what our setup looked like; theres probably dozens of ways to do it.
So the T1 lines come in from the provider into some special telco on-premise equipment.
From there, they go to the PBX over ethernet into digital or analog boards. Analog boards go right back out to 110 punch blocks and out to the call center floor.
Digital boards went across the room, also via ethernet to servers with special telephony cards. These cards do the magic. Software on these servers - and their basic linux or windows servers depending on their purpose, use linux or windows written programs that can access these cards and do whatever they need them to do - call auditing, call recording to mp3 and backed up for safe keeping / ISO requirements.
So how is software like this made? Get a card - heres a few - digium.com/products/telephony-cards/digital (these look like pretty basic prosumer grade cards). Get a suitable line into your test area that can generate a dial tone. Find the API docs for your card of choice and get programming. Windows, probably VC++, linux - those guys know what to use - c++ and gcc compiler probably.
TheSheriff
Co-Founder, Founder, Entrepreneur & Problem Solver
This is mostly my job. Not making the software but integration and understanding the networks etc. In this I go over some of the big players, open source stuff, protocols required, basic debugging and required hardware.
I commend your interest in this area. I will say it is extremely crowded. You have companies like Mitel, Avaya, Genesys, Cisco and many other smaller companies that produce both software and hardware for the contact/call centre space.
If you're interested in understanding how to code this stuff up there are a number of open source libraries and providers that can teach you. FreeSWITCH is a great start. it's basically an open source routing and media server.
There are a number of protocols you need to become familiar with, SIP (Session Initiation Protocol), VoIP (Voice over IP), PSTN (Publis Switched Telephone Network), webRTC (Real Time Communication) are the main ones. Need to check your RFC's for in depth details.
Anything with an internet connection uses webRTC, standard phone calls use PSTN and contact centres use SIP.
If you need to debug anything there are stack traces you can run on routing server - it will show you the traffic throughput. Additionally, if you want to play around with networks etc on your own machine you can, download wireShark . It's a great tool.
The software call centres are based off can vary, and as Mario Giambanco said the servers are usually linux or windows.
Further googling: You should also look at network topology and border gateways.
As for the physical phones themselves - they run using PoE (Power over Ethernet) - usually. If you wanted to test on a home network or something you'd need to purchase a phone (ebay is fine) and make sure you have a PoE connector/adapter that's plugged into the routing server.
Contact Centres used to be extremely expensive due to the substantial hardware required and cost of use. Since VoIP came along this cost has dramatically reduced and therefore is the obvious way to start, at least for now. In this way costs can be further reduced by installing a "SIP Softphone" on your desktop - which negates the need for desk phones.
tl;dr FreeSWITCH. I wouldn't bother going too low level.