How to hangup a cellular phone call that was programmatically initiated in UWP Mobile

Peace Man 1 Reputation point
2020-08-25T18:47:13.983+00:00

I initiate a cell phone call using

            phoneCallStore = await PhoneCallManager.RequestStoreAsync();
            LineGuid = await phoneCallStore.GetDefaultLineAsync();
            phoneLine = await PhoneLine.FromIdAsync(LineGuid);
            phoneLine.Dial("1234567890", "Me");

works great, but how do I hang-up this call. I tried setting

LineGuid = System.Guid.Empty;
phoneCallStore = phoneLine = null;

Call continues until i manually hang-up the call.

Please provide me a solution using Visual Studio 2017.

Universal Windows Platform (UWP)
{count} votes

1 answer

Sort by: Most helpful
  1. Richard Zhang-MSFT 6,936 Reputation points
    2020-08-26T05:33:41.993+00:00

    Hello,

    Welcome to Microsoft Q&A.

    A phone line is a line on a device that can either receive incoming calls or place outgoing calls. It does not support to hang up the phone by code. Hanging up is an operation performed by the user and the application cannot interfere.

    Thanks.