/// <summary> /// Attempts to establish a new VoIP call via the Google Voice gateway. /// </summary> /// <param name="destination">The destination number to call.</param> public void Call(string destination) { if (!_isBound) { throw new ApplicationException("The Google Voice call could not proceed as the XMPP client is not bound."); } else { _audioChannel = new AudioChannel(); // Call to Google Voice over XMPP & Gingle (Google's version of Jingle). XMPPPhoneSession phoneSession = m_xmppClient.GetPhoneSession(); m_xmppCall = m_xmppClient.GetPhoneSession(); m_xmppCall.Accepted += XMPPAnswered; m_xmppCall.Rejected += XMPPCallFailed; m_xmppCall.Hungup += Hangup; // Create the SDP packet to send to GV. Customise it with the ICE credentials that GV require. SDP xmppSDP = _audioChannel.GetSDP(true); xmppSDP.IcePwd = Crypto.GetRandomString(12); m_localSTUNUFrag = Crypto.GetRandomString(8); xmppSDP.IceUfrag = m_localSTUNUFrag; m_xmppCall.PlaceCall(destination + "@" + GOOGLE_VOICE_HOST, xmppSDP); } }
public void Call(string destination) { CreateMediaSockets(SDP.GetSDPRTPEndPoint(m_uas.CallRequest.Body)); m_xmppCall.PlaceCall(destination + "@" + GOOGLE_VOICE_HOST, GetSDPForXMPPRequest()); }