コード例 #1
0
        private void Holder_Completed(object sender, EventArgs e)
        {
            InviteHolder holder = sender as InviteHolder;

            remoteHolder(holder);
            //记录本次呼叫对应的接收端地址。
            _targets[holder.CallID] = new InviteSource(holder.VideoId, holder.RemoteIP, holder.RemotePort);
        }
コード例 #2
0
 public void PutInvite(SIP_RequestReceivedEventArgs e)
 {
     if (e.Request.RequestLine.Method.ToUpper().Equals(SIP_Methods.INVITE))
     {
         InviteHolder holder = new InviteHolder(_sipServer, e);
         holder.CommandTimeout += Holder_CommandTimeout;
         holder.Completed      += Holder_Completed;
         _holders[holder.GUID]  = holder;
         holder.Start();
     }
 }
コード例 #3
0
 private void remoteHolder(InviteHolder holder)
 {
     holder.CommandTimeout -= Holder_CommandTimeout;
     holder.Completed      -= Holder_Completed;
     _holders.Remove(holder.GUID);
 }