--- gateway/gw/smsc/smsc_smpp.c	2002-09-04 20:42:57.000000000 +0300
+++ gateway/gw/smsc/smsc_smpp.c	2002-09-05 20:14:26.000000000 +0300
@@ -606,6 +623,7 @@
     Octstr *os; 
     Msg *msg, *dlrmsg=NULL; 
     long reason; 
+    int esm_class_type;
     resp = NULL; 
  
     switch (pdu->type) { 
@@ -617,9 +635,9 @@
              * (no suitable error code for the deliver_sm_resp is defined) 
              */ 
 
+            esm_class_type = pdu->u.deliver_sm.esm_class & 0x3C; /* keep only msg type, bits 2-5 */
             /* got a deliver ack (DLR)? */ 
-            if ((pdu->u.deliver_sm.esm_class == 0x02 || 
-                 pdu->u.deliver_sm.esm_class == 0x04)) { 
+            if (esm_class_type == 0x04 || esm_class_type == 0x08 || esm_class_type == 0x10 || esm_class_type == 0x20) { 
                 Octstr *respstr;    	 
                 Octstr *msgid = NULL; 
                 Octstr *stat = NULL; 
