If we can understand how Sonata Switchboard “knows” when a phone rings and when it’s on a call, that could be useful.
If not with some sort of API call from the PBX to the application, it would mean that the application polls the PBX constantly to determine the state of extensions. Most likely this is not happening.
So, whatever mechanism is in place to achieve that functionality could be adapted to achieve the result of a webhook call when an extension receives a call.