Use case: app that wants to save the user money on premium rate numbers. When a phone call is being made by the user, it would ask this app if this call is ok. App would check if phone number starts with premium rate prefix. If it doesn't it would return an ok and the user's call would proceed as normal. If it does start with such a prefix, app would check db (online or otherwise) and if an alternate number found, present a dialog to the user saying this phone number exists as an alternate, allowing them to try that instead. In case where user chooses that option, it would return a No and app would initiate a new call.
I believe the McpRequest API in the forthcoming version 5.5.4 should be capable enough that it can do this. To do so, consult the mission-control-plugins documentation, create an object that implements the McpRequestPolicy GInterface, and return it from your mcp_plugin_ref_nth_object() function. You'd need to use mcp_request_ref_nth_request() to look at the properties of the channel request to see whether it's a StreamedMedia call to a premium-rate number, and mcp_request_start_delay() and mcp_request_end_delay() to stall the request while querying the database and waiting for user input.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.