locked
how can I make a call to *190*phone number# in c#?

    Question

  • Hi,

    I am trying to create an app as shortcut for some requests.

    I want to make a call to this number: *190*phone number# using c# but it never works.

    On the phone, I can call this number and I get a reply from my provider.

    If I try to call it using:

    Windows.ApplicationModel.Calls.PhoneCallManager.ShowPhoneCallUI("*190*phone number#", "TEST CALL");

    I get a message saying that I have to use the dialer keypad to send the request.

    Is there a workaround for this (bug)? I mean, if I put the phone number in the phoneCall-request, it is because I don't want insert it manually in the dialer keypad...

    Thanks,

    Adriano


    • Edited by Adrianotiger Wednesday, March 04, 2015 10:27 AM keyboard=>keypad
    Wednesday, March 04, 2015 10:26 AM

Answers

All replies

  • PhoneCallTask phoneCallTask = new PhoneCallTask();
    phoneCallTask.PhoneNumber = "Phone Number Here";
    phoneCallTask.DisplayName = "Display Name HERE";   
    phoneCallTask.Show();

    Try to do it with a PhoneCallTask, this will show in your Call screen the number and the name, the only thing that you have to do then is to hit the Call button.

    Best regards.

    Wednesday, March 04, 2015 10:34 AM
  • PhoneCallTask phoneCallTask = new PhoneCallTask();
    phoneCallTask.PhoneNumber = "Phone Number Here";
    phoneCallTask.DisplayName = "Display Name HERE";   
    phoneCallTask.Show();

    Try to do it with a PhoneCallTask, this will show in your Call screen the number and the name, the only thing that you have to do then is to hit the Call button.

    Best regards.

    Thanks Cristian,

    after pressing the Call button I get this message:

    "please enter service codes directly from the phone's keypad"

    it seems that the phone can detect that this is not real a phone number but a request and block the request. It would be nice if I could open the Call keypad and insert this number in a way that the user need only to press "CALL" like the PhoneCallTask function.

    Wednesday, March 04, 2015 10:42 AM
  • You're right, it's a security thing.

    You can see more details here:

    http://www.codeproject.com/Articles/364581/How-to-Call-a-Number-in-WP-using-the-PhoneCallTas

    And if you save that "number" as a Contact and try to call the contact from your app? It looks like the same action but... you can give it a try..

    Best regards.




    Wednesday, March 04, 2015 10:51 AM
  • Yes security LOL...

    If Microsoft want security, they should create a smartphone without the possibility to install apps ;)

    If an app can't make a call (user has to press CALL), the same thing is also possible for a FREE request to the provider, or not?

    Thanks for the link! This show once again that write a utility for WP is a hard work...

    If I create a new contact, I have to call phoneCallTask.Show(); ... And so I am on the same situation.

    .My phone provider created an app for iPhone and one for Android. I was thinking I would be able to create something for Windows Phone too. Now I know why nobody want to create tools for Windows Phone. The API never allow you to write a utility (for security reason, I know ;) )... But it would also be nice to have a utility some times in a store full of inutility apps :(

    About this BUG:

    I can create a textbox where the user can copy the phone number (maybe the app could copy it automatically in the clipboard if there is no security problem about the OS :P). But the user has to exit the app, open the dialer and insert this text. Is there a way to open the phone dialer?

    Thank you for the support Cristian!

    Wednesday, March 04, 2015 9:07 PM
  • Nice to see that you're taking it in a happy way :)

    Have a look at this link, this guy here needs the same as you.

    http://stackoverflow.com/questions/20207639/how-to-open-phone-dialer-keypad-with-c-sharp-windows-phone-8

    Wednesday, March 04, 2015 10:22 PM