0

I'm developing C# VOIP LAN application. The application makes a call and shows the client is calling.

The problem is: After accepting the Call the following error message dialog box is shown. enter image description here

The code which process the Accepted call is:

//Act according to the received message.
            switch (msgReceived.cmdCommand)
            {
                //We have an incoming call.
                case Command.Invite:
                    {                            
                        if (bIsCallActive == false)
                        {
                            //We have no active call.

                            //Ask the user to accept the call or not.
                            if (MessageBox.Show("Call coming from " + msgReceived.strName + ".\r\n\r\nAccept it?",
                                "VoiceChat", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                            {
                                SendMessage(Command.OK, receivedFromEP);
                                vocoder = msgReceived.vocoder;
                                otherPartyEP = receivedFromEP;
                                otherPartyIP = (IPEndPoint)receivedFromEP;
                                InitializeCall();
                            }
                            else
                            {
                                //The call is declined. Send a busy response.
                                SendMessage(Command.Busy, receivedFromEP);
                            }
                        }
                        else
                        {
                            //We already have an existing call. Send a busy response.
                            SendMessage(Command.Busy, receivedFromEP);
                        }
                        break;
                    }

                //OK is received in response to an Invite.
                case Command.OK:
                    {                            
                        //Start a call.
                        InitializeCall();                                
                        break;
                    }
usminuru
  • 335
  • 4
  • 8
  • 19
  • @Daniel yes there is same logical idea, but it is different with this in practice. Even I have seen the duplicate one but can't find any relevant solution. – usminuru Jun 04 '15 at 12:30
  • @Daniel please help me if you know the solution. – usminuru Jun 04 '15 at 12:31

0 Answers0