Re: got DLR but could not find message or was not interested in it

2003-01-06 Thread Andreas Fink

On Montag, Januar 6, 2003, at 12:11  Uhr, Wayne wrote:

Remember this one ?

got DLR but could not find message or was not interested in it


I'm getting this for messages received from CMDA handsets, regardless of
DLR requested or not. 
The only diff in PDU from GSM based is the class is 2 instead of null.

I've tried setting msg-id-type to 0,1,2  3 in various cvs versions (
latest being 3 weeks old )

No luck.

Any ideas ?

Regards

Wayne Smithers
5th Finger Pty Ltd

can you provide a dump of the messages being sent and the answers received back?
I presume the sent message and the received one are not looking the same to kannel either because of number type or message id. If you're using SMPP, there's some configuration variables to get around this problem.


Andreas Fink
Fink Consulting GmbH

---
Tel: +41-61-332 Fax: +41-61-331  Mobile: +41-79-2457333
Address: Clarastrasse 3, 4058 Basel, Switzerland
E-Mail:  [EMAIL PROTECTED]
Homepage: http://www.finkconsulting.com
---



Re: got DLR but could not find message or was not interested in it

2003-01-06 Thread Alan McNatty
Hi Wayne,

As Andreas suggest check the pdu dumps - you might be receiving a
deliver_sm esm_class of 0x01 which from SMPP specs is 'SMSC Delivery
Receipt' which should be included (I have it in mine). Test with
attached patch...

cheers,
Alan

On Tue, 2003-01-07 at 00:11, Wayne wrote:
 Remember this one ?
 
 got DLR but could not find message or was not interested in it
 
 
 I'm getting this for messages received from CMDA handsets, regardless of
 DLR requested or not. 
 The only diff in PDU from GSM based is the class is 2 instead of null.
 
 I've tried setting msg-id-type to 0,1,2  3 in various cvs versions (
 latest being 3 weeks old )
 
 No luck.
 
 Any ideas ?
 
 Regards
 
 Wayne Smithers
 5th Finger Pty Ltd
 
-- 
Alan McNatty [EMAIL PROTECTED]

Index: gw/smsc/smsc_smpp.c
===
RCS file: /home/cvs/gateway/gw/smsc/smsc_smpp.c,v
retrieving revision 1.22
diff -r1.22 smsc_smpp.c
710c710,711
 if ((pdu-u.deliver_sm.esm_class == 0x02 || 
---
 if ((pdu-u.deliver_sm.esm_class == 0x01 || 
  pdu-u.deliver_sm.esm_class == 0x02 || 



Re: got DLR but could not find message or was not interested in it

2003-01-06 Thread Alan McNatty
- Click - sorry Wayne, that won't be it if the dlr_find call is
reporting it can't find it - ignore my last email. 

The other problem I had with one CDMA SMSC via SMPP was receiving the
number as source not destination, ie ... see attached patch (which is
not suggested to be committed to cvs, etc). 

Add some debugging to print out what you're adding and what you're
looking for, etc...

let me know how you get on.

cheers,
Alan

On Tue, 2003-01-07 at 00:11, Wayne wrote:
 Remember this one ?
 
 got DLR but could not find message or was not interested in it
 
 
 I'm getting this for messages received from CMDA handsets, regardless of
 DLR requested or not. 
 The only diff in PDU from GSM based is the class is 2 instead of null.
 
 I've tried setting msg-id-type to 0,1,2  3 in various cvs versions (
 latest being 3 weeks old )
 
 No luck.
 
 Any ideas ?
 
 Regards
 
 Wayne Smithers
 5th Finger Pty Ltd
 
-- 
Alan McNatty [EMAIL PROTECTED]

Index: gw/smsc/smsc_smpp.c
===
RCS file: /home/cvs/gateway/gw/smsc/smsc_smpp.c,v
retrieving revision 1.22
diff -r1.22 smsc_smpp.c
784c785
   octstr_get_cstr(pdu-u.deliver_sm.destination_addr), /* destination */ 
---
   octstr_get_cstr(pdu-u.deliver_sm.source_addr), /* source */ 



Re: got DLR but could not find message or was not interested in it

2002-07-30 Thread Alan McNatty

Hi Wayne,

I had a similar problem (also CDMA). It stemmed from the SMSC replying
with a message id in decimal not in hex (deliver_sm_resp format) hence
dlr report couldn't be found. 

Check the patch below which I'm using (applied to cvs), it contains a
couple of other things that I needed to add/modify but the relevant bit
should be obvious ;-). I've yet to clean up for general use but would be
interested to know if this helps.
Cheers,
Alan

On Tue, 2002-07-30 at 19:36, Wayne Smithers wrote:
 We have a situation where someone using a CDMA handset ( which does not
 support delivery receipt ) sends in an sms and it does not get to smsbox.
 
 Bearer box outputs 'got DLR but could not find message or was not interested
 in it' and that's as far as it gets.
 
 Does anybody know what the code below is trying to do ?  And what would need
 to occur to get in an error state ??
 
 smsc_smpp.c
 
 if (msgid != NULL) {
 Octstr *tmp;
 tmp = octstr_format(%ld,
 strtol(octstr_get_cstr(msgid), NULL, 10));
 dlrmsg = dlr_find(octstr_get_cstr(smpp-conn-id),
   octstr_get_cstr(tmp), /* smsc message
 id */
 
 octstr_get_cstr(pdu-u.deliver_sm.destination_addr), /* destination */
   dlrstat);
 octstr_destroy(tmp);
 }
 if (dlrmsg != NULL) {
 reply = octstr_duplicate(respstr);
 /* having a / in the text breaks it so lets replace it
 with a space */
 len = octstr_len(reply);
 for (idx = 0; idx  len; idx++)
 if (octstr_get_char(reply, idx) == '/')
 octstr_set_char(reply, idx, '.');
 octstr_append_char(reply, '/');
 octstr_insert(dlrmsg-sms.msgdata, reply, 0);
 octstr_destroy(reply);
 bb_smscconn_receive(smpp-conn, dlrmsg);
 } else {
 error(0,SMPP[%s]: got DLR but could not find message or
 was not interested in it,
   octstr_get_cstr(smpp-conn-id));
 }
 
 
 regards
 
 Wayne Smithers
 5th Finger
 [EMAIL PROTECTED]
 91 Reservoir St
 Surry Hills 2010
 Sydney, Australia
 Ph:  +61-2-9280-0300
 Mob: +61-409-603511
 Fax: +612-9475-0367
 
 
-- 
Alan McNatty -- Catalyst IT Ltd -- http://www.catalyst.net.nz
  Level 2, 150-154 Willis St, PO Box 11-053, Wellington, NZ
Mob: +64 21-312136, DDI: +64 4 9167203, Office: +64 4 4992267

... error accessing whit
Segmentation fault (core dumped) 


Index: gw/smsc_smpp.c
===
RCS file: /home/cvs/gateway/gw/smsc_smpp.c,v
retrieving revision 1.76
diff -r1.76 smsc_smpp.c
22c22
  
---
 
54a55,56
 #define SMPP_SUBMIT_SM_RESP_FORMAT  16
 #define SMPP_DELIVER_SM_RESP_FORMAT 10
351d352
 
354c355
 } else {
---
 	} else {
600,601c601,614
 /* got a deliver ack? */ 
 if ((pdu-u.deliver_sm.esm_class == 0x02 || 
---
 
 	/* Based on SMPPv3.4 spec esm_class for deliver_sm is defined as ...
 	 *
 	 *   Message Type (bits (5-2)
 	 *
 	 *   xxxx (0x00) - Default Message Type
 	 *   xx0001xx (0x01) - SM contains SMSC Delivery Receipt
 	 *   xx0010xx (0x02) - SM contains SME Delivery Ack
 	 *   xx0011xx (0x04) - reserverd
 	 *
 	 */
 
 if ((pdu-u.deliver_sm.esm_class == 0x01 ||
  pdu-u.deliver_sm.esm_class == 0x02 || 
644,645c657,667
 Octstr *tmp; 
 tmp = octstr_format(%ld, strtol(octstr_get_cstr(msgid), NULL, 10)); 
---
 Octstr *tmp_id, *tmp_addr; 
 tmp_id = octstr_format(%ld, strtol(octstr_get_cstr(msgid), NULL, 
 	SMPP_DELIVER_SM_RESP_FORMAT)); 
 
 		/* XXX - check for broken SMSC that use source instead of destination */
 
 if ( octstr_compare(pdu-u.deliver_sm.destination_addr, octstr_imm()) != 0 )
 		tmp_addr = octstr_duplicate(pdu-u.deliver_sm.destination_addr);
 		else
 tmp_addr = octstr_duplicate(pdu-u.deliver_sm.source_addr);
 		
647,648c669,670
   octstr_get_cstr(tmp), /* smsc message id */ 
   octstr_get_cstr(pdu-u.deliver_sm.destination_addr), /* destination */ 
---
   octstr_get_cstr(tmp_id),   /* smsc message id  */ 
   octstr_get_cstr(tmp_addr), /* destination addr */ 
650c672,674
 octstr_destroy(tmp); 
---
 
 octstr_destroy(tmp_id); 
 octstr_destroy(tmp_addr); 
761a786
 
763c788,790
 octstr_get_cstr(pdu-u.submit_sm_resp.message_id), NULL, 16)); 
---