Show connecting mode on VOIPPhoneCall status bar

100 views Asked by At

I am implementing VoIP application on windows phone 10, I am using VoipPhoneCall.

When a user makes a call and bring an app to background, VoipPhoneCall is showed, and I want connecting mode in that status bar is showed correctly, when connecting mode is dialing it should be "Dialing", and when connecting mode is connected, it should be duration time. This is VoipPhoneCall status bar of Viber, and I want to do same.

Voip Phone Call status bar of Viber

Please help me, thanks

1

There are 1 answers

0
Franklin Chen - MSFT On BEST ANSWER

I want connecting mode in that status bar is showed correctly, when connecting mode is dialing it should be "Dialing", and when connecting mode is connected, it should be duration time

The key point is, we don't need to call the VoipPhoneCall.NotifyCallActive method after using VoipCallCoordinator.RequestNewOutgoingCall method.

I used the official VoIP sample to explain.

See the VccCallHelper.cs file in the VoipTasks project.

Please notice the NewOutgoingCall method(LINK):

VoipPhoneCall call = vCC.RequestNewOutgoingCall( context, contactName, serviceName, VoipPhoneCallMedia.Audio);
if (call != null)
{
                call.EndRequested += Call_EndRequested;
                call.HoldRequested += Call_HoldRequested;
                call.RejectRequested += Call_RejectRequested;
                call.ResumeRequested += Call_ResumeRequested;

                call.NotifyCallActive();//Here!!

                Current.VoipCall = call;

                Current.StartAudio();

                status = true;
}

If we call the VoipPhoneCall.NotifyCallActive method, the status bar will show the active timer. So just comment this line, the notification will be sent in the AnswerRequested method, see NewIncomingCall method->Call_AnswerRequested