I am searching an API to put it in my web application, in order to use clients pc as phone to call their customers from the web application, i dont have any idea about this API, do you have one?
You may want to look at web dialer API: https://developer.cisco.com/site/webdialer/
This API needs a IP phone to initiate a call and works only with Cisco Unified Communication Manager.
Second option is - you can also check jabber web sdk or guest sdk as per your requirement.
In this case the user can talk to the called number through the pc (using earphones) ? or from the IP Phone?
Web Dialer API needs IP phone or Jabber running in phone mode.