Delivery notification not working

Nov 27, 2014 at 1:17 PM
Hi! I have problem with delivery notification (client_MessageDelivered is never called). The bugTEXT I fixed it (in EsmClass.cs I set DeliveryReceipt = (byte) 4), but still not working. Any idea?
I have following code:
static SmppClient client = new SmppClient();            
            client.AutoReconnectDelay = 3000;
            client.KeepAliveInterval = 15000;

            SmppConnectionProperties properties = client.Properties;
            properties.SystemID = "systemId";
            properties.Password = "password";
            properties.Port = 8000;
            properties.Host = "hostIP"; 
            properties.SystemType = "";
            properties.DefaultServiceType = ServiceType.DEFAULT;
            properties.InterfaceVersion = InterfaceVersion.v34;
            properties.AddressTon = TypeOfNumber.Unknown;
            properties.AddressNpi = NumberingPlanIndicator.Unknown;
            properties.DefaultEncoding = DataCoding.SMSCDefault;

            client.ConnectionStateChanged += client_ConnectionStateChanged;
            client.MessageSent += client_MessageSent;
            client.MessageReceived += client_MessageReceived;
            client.MessageDelivered += client_MessageDelivered;

            try
            {
                client.Start();
            }
            catch (SmppBindException ex)
            {
                Console.WriteLine(ex.ErrorCode + " " + ex.Message);
            }
            catch (InvalidOperationException ex)
            {
                Console.WriteLine(ex.Message);
            }
            catch (TcpIpException ex)
            {
                Console.WriteLine(ex.Message);
            }

            static TextMessage msg = new TextMessage();
            msg.DestinationAddress = destinationAddress;
            msg.SourceAddress = "sourceAddress"; 
            msg.Text = "Hello";
            msg.RegisterDeliveryNotification = true;
            
            client.SendMessage(msg);


        private static void client_ConnectionStateChanged(object sender, ConnectionStateChangedEventArgs e)
        {
            switch (e.CurrentState)
            {
                case SmppConnectionState.Closed:
                    Console.WriteLine("Closed");
                    e.ReconnectInteval = 60000;
                    break;
                case SmppConnectionState.Connected:
                    Console.WriteLine("Connected");
                    break;
                case SmppConnectionState.Connecting:
                    Console.WriteLine("Connecting");
                    break;
            }
        }

        private static void client_MessageSent(object sender, MessageEventArgs e)
        {
            Console.WriteLine("Sent");
        }

        private static void client_MessageReceived(object sender, MessageEventArgs e)
        {
            Console.WriteLine("Received");
        }

        static void client_MessageDelivered(object sender, MessageEventArgs e)
        {
            Console.WriteLine("Delivered");
        }