コード例 #1
0
ファイル: SIPUserAgent.cs プロジェクト: cfasol/sipsorcery
 /// <summary>
 /// Event handler for RTP events from the remote call party. Fires
 /// when the event is completed.
 /// </summary>
 /// <param name="rtpEvent">The received RTP event.</param>
 private void OnRemoteRtpEvent(RTPEvent rtpEvent)
 {
     if (rtpEvent.EndOfEvent)
     {
         OnDtmfTone?.Invoke(rtpEvent.EventID, rtpEvent.Duration);
     }
 }
コード例 #2
0
ファイル: SIPUserAgent.cs プロジェクト: zhouzu/sipsorcery
        /// <summary>
        /// Event handler for RTP events from the remote call party. Fires
        /// when the event is completed.
        /// </summary>
        /// <param name="rtpEvent">The received RTP event.</param>
        /// <param name="rtpHeader">THe RTP header on the packet that the event was received in.</param>
        private void OnRemoteRtpEvent(RTPEvent rtpEvent, RTPHeader rtpHeader)
        {
            OnRtpEvent?.Invoke(rtpEvent, rtpHeader);

            if (rtpEvent.EndOfEvent)
            {
                OnDtmfTone?.Invoke(rtpEvent.EventID, rtpEvent.Duration);
            }
        }
コード例 #3
0
 /// <summary>
 /// Event handler for RTP events from the remote call party. Fires
 /// when the event is completed.
 /// </summary>
 /// <param name="rtpEvent">The received RTP event.</param>
 private void OnRemoteRtpEvent(RTPEvent rtpEvent)
 {
     if (lastRtpEventEndTimeStamp != rtpEvent.Source.Header.Timestamp &&
         rtpEvent.EndOfEvent)
     {
         lastRtpEventEndTimeStamp = rtpEvent.Source.Header.Timestamp;
         OnDtmfTone?.Invoke(rtpEvent.EventID, rtpEvent.Duration);
     }
 }