25 lines
823 B
C#
25 lines
823 B
C#
using Independentsoft.Sip;
|
|
using Independentsoft.Sip.Methods;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace SipComponent
|
|
{
|
|
public abstract class SipMessageGenerator
|
|
{
|
|
public virtual Message Generate(string destinationID, string senderID, string sipServer,
|
|
int sipServerPort, string text, bool groupSms = false)
|
|
{
|
|
Message sipMessage = new Message();
|
|
sipMessage.Uri = "sip:" + destinationID + "@" + sipServer + ":" + sipServerPort;
|
|
sipMessage.From = new ContactInfo(string.Format("sip:{0}@{1}", senderID, sipServer));
|
|
sipMessage.To = new ContactInfo(string.Format("sip:{0}@{1}", destinationID, sipServer));
|
|
|
|
return sipMessage;
|
|
}
|
|
}
|
|
}
|