Ah, I assumed there was an API.
How to improve? Maybe allow an option to call an external link (target=_blank or popup) based on templates (https://some.host/custom/path/call?agent=[userid]&number=[phonenumber]&contact=[name]) would help a lot.
3CX is supposed to handle tel: links but that does not work in recent Windows releases: https://www.3cx.com/community/threads/tel-links-not-working.49285/
By using a HTTP link would allow to jump right into the 3CX web client (similarily for other PBX)