Код: Выделить всё
static async Task Main(string[] args)
{
var client = new JamaaTech.Smpp.Net.Client.SmppClient();
JamaaTech.Smpp.Net.Client.SmppConnectionProperties properties = client.Properties;
properties.SystemID = "...";
properties.Password = "...";
properties.Port = 0;
properties.Host = "...";
properties.SystemType = "volumen";
properties.DefaultServiceType = "4433";
properties.DefaultEncoding = JamaaTech.Smpp.Net.Lib.DataCoding.SMSCDefault;
properties.AddressTon = JamaaTech.Smpp.Net.Lib.TypeOfNumber.International;
properties.AddressNpi = JamaaTech.Smpp.Net.Lib.NumberingPlanIndicator.ISDN;
properties.UseSeparateConnections = false;
client.AutoReconnectDelay = 30000;
client.KeepAliveInterval = 15000;
try
{
if (!client.Started)
{
client.ForceConnect();
client.Start();
}
var textMessage = new JamaaTech.Smpp.Net.Client.TextMessage()
{
DestinationAddress = "...",
RegisterDeliveryNotification = true,
SourceAddress = "...",
Text = "Test"
};
client.SendMessage(textMessage);
client.Shutdown();
client.Dispose();
}
catch (Exception ex)
{
client.Shutdown();
client.Dispose();
throw ex;
}
}
Я пробовал разные варианты конфигурации, но безуспешно. Администраторы SMPP-сервера говорят мне, что я должен настроить Bind в качестве приемопередатчика, что, как я понимаю, я уже делаю с настройкой свойств этой линии. UseSeparateConnections = false;.
Подробнее здесь: https://stackoverflow.com/questions/786 ... net-client
Мобильная версия