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.
Mario Giambanco
Director of User Experience Development