1

I would like my sales staff to click a button, which makes a phonecall and registers the length of the call.

Is it possible to monitor the length of a phonecall?

Thanks

Emond
  • 50,210
  • 11
  • 84
  • 115
MojoDK
  • 4,410
  • 10
  • 42
  • 80

1 Answers1

1

No, the PhoneCallTask does not provide this kind of information. But you could register the current time just before the call starts and get the current time when the app resumes.

However, this might be longer than the actual phone call when the user or phone decides to do something else in between.

EDIT

Apparently, after being corrected by @JaredBienz-MSFT and and testing it, the Show method of the PhoneCallTask is not blocking. So my 'trick' will not work.

Emond
  • 50,210
  • 11
  • 84
  • 115
  • Thanks. Hope they will implement it in a later version. :) – MojoDK Nov 02 '11 at 13:11
  • I believe the PhoneCallTask does not automatically suspend the app, so dealing with a Resume may not be the correct way of tracking. Even if you handle the Page.OnNavigatedTo, they may be returning to the app with the call still running. The only way is to track the time from the moment you start the PhoneCallTask and ask them to click an 'End of Call' button when they return. Keep in mind that the user can always Cancel the PhoneCallTask, so the call may not have even begun. – Jared Bienz - MSFT Nov 02 '11 at 18:08
  • @JaredBienz-MSFT - indeed you are correct. I just tested it. I'll update my answer. – Emond Nov 02 '11 at 18:17
  • Thanks guys!! I really hope it will be implemented some day soon. – MojoDK Nov 02 '11 at 21:01
  • You can try the `obscured` event instead. – abhinav Nov 03 '11 at 06:29
  • @abhinav It still doesn't reliably register the length of the call, it can be anything. – Emond Nov 03 '11 at 19:38
  • @Erno. True. Until the Phone Call Task returns any values, we cannot have a reliable solution. – abhinav Nov 04 '11 at 05:41