void SessionInitiateCallback(object sender, XPathEventArgs e) { try { Iq iqIn = (Iq)e.Stanza; if (iqIn.Type != IqType.Error) { Log.Info("<SessionInitiate"); Messaging.Jingle.JingleSdp jingleIn = null; // jingleIn = (Messaging.Jingle.JingleSdp) iqIn.Query; jingleIn = iqIn.Element <Messaging.Jingle.JingleSdp>(); this.SendAck(iqIn.From, iqIn.Id); if (this.OnReceiveSessionInitiate != null) { this.OnReceiveSessionInitiate(this, new Messaging.Jingle.JingleSdpEventArgs(iqIn.From, jingleIn.ToSdp())); } } else { Log.Error("SessionInitiateCallback Error"); } } catch (Exception ex) { Log.Error(ex.ToString()); } }
void SessionAcceptCallback(object sender, XPathEventArgs e) { try { Log.Info("<SessionAccept"); Iq iqIn = (Iq)e.Stanza; Messaging.Jingle.JingleSdp jingleIn = null; // jingleIn = (Messaging.Jingle.JingleSdp) iqIn.Query; jingleIn = iqIn.Element <Messaging.Jingle.JingleSdp>(); this.SendAck(iqIn.From, iqIn.Id); // This event needs to get passed back up to IceLink.Conference.OnReceiveOfferAnswer if (this.OnReceiveSessionAccept != null) { Log.Info("Raising OnReceiveSessionAccept"); this.OnReceiveSessionAccept(this, new Messaging.Jingle.JingleSdpEventArgs(iqIn.From, jingleIn.ToSdp())); } else { Log.Info("No OnReceiveSessionAccept handler"); } } catch (Exception ex) { Log.Error(ex.ToString()); } }