コード例 #1
0
ファイル: VoIPCall.cs プロジェクト: waffle-iron/nequeo
        /// <summary>
        /// Notify application on incoming instant message or pager (i.e. MESSAGE
        /// request) that was received outside call context.
        /// </summary>
        /// <param name="sender">The current sender.</param>
        /// <param name="e">The event parameter.</param>
        private void _voipManager_OnInstantMessage(object sender, OnInstantMessageParam e)
        {
            // Send a notification to the call.
            Param.OnInstantMessageParam param = new Param.OnInstantMessageParam();
            param.Info        = e.RxData.Info;
            param.SrcAddress  = e.RxData.SrcAddress;
            param.WholeMsg    = e.RxData.WholeMsg;
            param.ContactUri  = e.ContactUri;
            param.ContentType = e.ContentType;
            param.FromUri     = e.FromUri;
            param.MsgBody     = e.MsgBody;
            param.ToUri       = e.ToUri;
            FindContact(param);

            // Call the event handler.
            OnInstantMessage?.Invoke(this, param);
        }
コード例 #2
0
ファイル: VoIPCall.cs プロジェクト: waffle-iron/nequeo
 /// <summary>
 /// Find the contact.
 /// </summary>
 /// <param name="param">The whole message.</param>
 private void FindContact(Param.OnInstantMessageParam param)
 {
     // Get from.
     param.From = param.FromUri.Replace("<", "").Replace(">", "").Replace("\"", "");
 }