RE: SMPP delivery_sm.ems_class and delivery notification detection
"Oded Arbel" <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
I did forget the patch again. sorry -- Oded Arbel m-Wise mobile solutions [email protected] +972-9-9581711 (116) +972-67-340014 ::.. volcano, n.: A mountain with hiccups. -----Original Message----- From: Oded Arbel Sent: Thursday, September 05, 2002 7:40 PM To: Kannel-devel (E-mail) Subject: SMPP delivery_sm.ems_class and delivery notification detection Hi list. We have found a problem with delivery notification on SMPP using the CMG SMPP server. apparently , when receiving delivery notification for a MT that had UDHI set, the delivery notification also has the UDHI set in the esm_class. This is correct acording to the SMPP v3.4 standard in front of me. So I tried to implement the delivery notification detection part of the deliver_sm handling according to the spec. the main difference, is that I filter out bits 0,1,6 and 7 which will cause Kannel to regard messages with esm_class set to 0x02 as MOs - this is according to the SMPP v3.4 specs, so I wonder why the SMPP driver had that code in the first place. BTW - in the configuration we set the interface version to 0x33, otherwise the CMG SMPP server tries to use the optional parameters of the SMPP v3.4 protocol, including the infamous message_payload parameter of the deliver_sm which contains the message data - which Kannel can't read of course. -- Oded Arbel m-Wise mobile solutions [email protected] +972-9-9581711 (116) +972-67-340014 ::.. I/O, I/O, It's off to disk I go, a bit or byte to read or write, I/O, I/O, I/O, I/O -- Dave Peacock
smsc_smpp.patch
(application/octet-stream, 921 B)
--- 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;