Bug 26699

Summary: api to allow interception of calls being made
Product: Telepathy Reporter: Zaheer Merali <zaheermerali>
Component: mission-controlAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: enhancement    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Zaheer Merali 2010-02-22 07:13:02 UTC
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.
Comment 1 Simon McVittie 2010-09-09 04:24:42 UTC
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.