The documentation has a good diagram about who owns what
https://help.salesforce.com/articleView?id=cloud_cti_api_overview.htm&language=en_US&type=0
Open CTI is purely the JavaScript library that keeps the Salesforce front end up to date, to track the active call data, and provides some methods for saving objects as well.
The connection to the phone system itself will depend highly on what phone system you're actually using. So the documentation for what the phone side of things looks like will be specific to your own system and their APIs, rather than being something that's collected in a central place. This is why there are many vendors that provide this kind of integration such as Five9, InGenius, NewVoiceMedia, etc...
That said, a typical flow would look like this:
- A call comes into your phone system.
- Your softphone becomes aware of the call, probably by using an API call to the phone system. Either through apex callouts or via an HTML page living on the phone system or similar. This is internal implementation for the softphone based on what system it's using.
- The softphone now uses Open CTI to do something like a screenPop to search for any contact that might match the caller's number, create a new task to track the call, etc...
- Your agent finishes the call and clicks hang up on the softphone. Open CTI can do things like finalize the call task and fire events to finish wrap up.
- The softphone sends a hang-up message or something to your call system to actually end the call with the user. Again, this is an internal implementation that will be specific to the call center you're using and their APIs.
https://www.salesforce.com/blog/2016/07/computer-telephony-integration-cti-works.html
tl;dr It depends on your phone system, so you should check the developer docs for the system and then consider how you can connect that to Salesforce via apex callouts or by hosting your softphone on-premise.