views:

353

answers:

4

I want to be able to show a dialog on outbound calls. The dialog is used to ask the user if he wants 1. dial the phone number directly 2. Dial through the PBX.

If option two is chosen, i want to dial a specific number and send the dialed number as DTMF.

  1. How do I catch and stop outgoing calls?
  2. How do I get the dialed number?
A: 

It appears that it is not possible to intercept outgoing calls in Windows Mobile (see this thread for example). To be honest, I would be surprised if this was possible, as it would be a security risk for the platform. Anyone could write viruses or trojan horses that redirect calls through a specific network. Also, the operators wouldn't be happy about this "feature".

One solution would be to write an application and ask the users to place their calls through its user interface. You could then initiate either a regular call or a call through the PBX easily. You need of course to integrate the contacts, but this isn't hard. Have a look at the Microsoft.WindowsMobile.PocketOutlook namespace.

kgiannakakis
A: 

Firstly (and possibly a little off topic) there is actually a built-in WM6 feature for allowing calls to be routed either over the cell network or over SIP using the built-in dialer. If SIP calling (or "Internet Calling" as the UI has it) is enabled and there is a WiFi connection the call will be routed over SIP, if not it will route over GSM in the normal way. There is actually also a registry setting that enables the calls to routed over SIP if there is a 3G/HSDPA connection available too.

Most manufacturers do not ship the part of the WM6 OS that enables this functionality on their device ROMs (presumably mindful of their call revenue), however it can easily be installed on most WM6 devices.

Secondly if this is not what you are after (if you don't want to use SIP but use a calling card or need to have the choice after you place the call) I can tell you it must be possible to do what you want to do because this app does it - magicall. One way I can think of doing this is to get notification of the call, immedialety end it, wipe it from the log, put up your PBX or Cell dialog, and then place the call again in the way the user requested. This has the disadvantage that if the original call was started programmatically the app that did so will think the call was ended prematurely. It may also be possible using another technique, but that is where my knowledge runs out...

Christopher Edwards
A: 

It can be done through TAPI. I'm hiring a person through elance.com to do it.

jgauffin
A: 

It is possible. I did it some years ago for a calling card application. It requires C++, however.

I'm quite sorry, I can't remember anything about how I did it, but is IS possible.

Just start looking here: TAPI Reference

Felix Alcala