SMPP客户端正在连接但未发送SMS
我正在使用.NETC#中的JAMASMPP库。我可以看到客户端正在连接,SendMessage中没有错误/异常。但是没有短信SMPP客户端正在连接但未发送SMS,sms,smpp,opensmpp,Sms,Smpp,Opensmpp,我正在使用.NETC#中的JAMASMPP库。我可以看到客户端正在连接,SendMessage中没有错误/异常。但是没有短信 static void Main(string[] args) { SmppClient client = new SmppClient(); SmppConnectionProperties properties = new SmppConnectionProperties(); T
static void Main(string[] args)
{
SmppClient client = new SmppClient();
SmppConnectionProperties properties = new SmppConnectionProperties();
TextMessage msg = new TextMessage();
client = new SmppClient();
properties = client.Properties;
properties.SystemID = "####";
properties.Password = "#####";
properties.Port = 9001;
properties.Host = "####";
properties.SystemType = "Transceiver";
properties.DefaultServiceType = "SMPP";
properties.InterfaceVersion = InterfaceVersion.v34;
properties.AddressNpi = NumberingPlanIndicator.ISDN;
properties.AddressTon = TypeOfNumber.International;
properties.DefaultEncoding = DataCoding.SMSCDefault;
client.AutoReconnectDelay = 3000;
client.KeepAliveInterval = 30000;
client.Start();
if (client.ConnectionState != SmppConnectionState.Connected) client.ForceConnect(5000);
msg = new TextMessage();
msg.DestinationAddress = "265999999999";
msg.SourceAddress = "Victoria";
msg.Text = "Hello, this is my test message!";
msg.RegisterDeliveryNotification = true;
try
{
client.SendMessage(msg, 1000);
string tes = msg.SourceAddress + "-" + msg.NetworkErrorCode + "-" + msg.MessageState;
}
catch (Exception exc)
{
throw new Exception("Unable to Send SMS " + exc.Message);
}
client.Shutdown();
}
有人能提出什么建议吗。我需要使用一个开放库来完成此任务