Ejemplo n.º 1
0
        public void StartCall(string strRemoteJID)
        {
            /// Start up our mic and speaker, start up our mixer
            ///
            if (m_bCallActive == true)
            {
                Console.WriteLine("Cal active return");
                return;
            }


            if (addresses.Length <= 0)
            {
                throw new Exception("No IP addresses on System");
            }

            int        nPort = GetNextPort();
            IPEndPoint ep    = new IPEndPoint(addresses[0], nPort);

            source = new AudioStreamSource();

            /// may need a lock here to make sure we have this session added to our list before the xmpp response gets back, though this should be many times faster than network traffic
            MediaSession         = new JingleMediaSession(strRemoteJID, ep, App.XMPPClient);
            MediaSession.UseStun = true;
            MediaSession.AudioRTPStream.UseInternalTimersForPacketPushPull = false;
            MediaSession.ClearAllPayloads();

            MediaSession.AddKnownAudioPayload(KnownAudioPayload.G722_40); // Only g711, speex can't be encoded real time on the xoom (oops, this is the windows phone, we'll have to try that later)

            Console.WriteLine(MediaSession.SendInitiateSession());
        }
Ejemplo n.º 2
0
        void StopCall(bool bSendTerminate)
        {
            m_bCallActive = false;
            if (MediaSession != null)
            {
                App.XMPPClient.JingleSessionManager.TerminateSession(MediaSession.Session, TerminateReason.Gone);
                MediaSession = null;
            }

            if (OnCallStopped != null)
            {
                OnCallStopped(this, new EventArgs());
            }
        }
Ejemplo n.º 3
0
        public void StartCall(string strRemoteJID)
        {
            /// Start up our mic and speaker, start up our mixer
            /// 
            if (m_bCallActive == true)
                return;


            if (addresses.Length <= 0)
                throw new Exception("No IP addresses on System");

            int nPort = GetNextPort();
            IPEndPoint ep = new IPEndPoint(addresses[0], nPort);

            source = new AudioStreamSource();

            /// may need a lock here to make sure we have this session added to our list before the xmpp response gets back, though this should be many times faster than network traffic
            MediaSession = new JingleMediaSession(strRemoteJID, ep, App.XMPPClient);
            MediaSession.UseStun = true;
            MediaSession.AudioRTPStream.UseInternalTimersForPacketPushPull = false;
            MediaSession.ClearAllPayloads();

            MediaSession.AddKnownAudioPayload(KnownAudioPayload.G722_40); // Only g711, speex can't be encoded real time on the xoom (oops, this is the windows phone, we'll have to try that later)

            MediaSession.SendInitiateSession();
        }
Ejemplo n.º 4
0
        void StopCall(bool bSendTerminate)
        {
            m_bCallActive = false;
            if (MediaSession != null)
            {
                App.XMPPClient.JingleSessionManager.TerminateSession(MediaSession.Session, TerminateReason.Gone);
                MediaSession = null;
            }

            if (OnCallStopped != null)
                OnCallStopped(this, new EventArgs());

        }