Hi,
Found 1 solution regarding the issue of assembling concatenated sms messages received from smsc (via smpp).I did some google search fixed it in following way.
Kannel was not parsing UDH, it was directly allocating the PDU to msg.smsdata.
File: smsc_smpp.c
function: static Msg *pdu_to_msg(SMPP *smpp, SMPP_PDU *pdu)
Line 245 msg->sms.msgdata = pdu->u.deliver_sm.short_message;
Line 246 pdu->u.deliver_sm.short_message = NULL;
Line 246 pdu->u.deliver_sm.short_message = NULL;
Instead of 245 and 246 lines replace with below, also 1 variable to be declared i.e.
int udh_offset.
/* starts-
if (pdu->u.deliver_sm.esm_class & ESM_CLASS_SUBMIT_UDH_INDICATOR) {
udh_offset = octstr_get_char(pdu->u.deliver_sm.short_message,0)+1;
msg->sms.udhdata = octstr_copy(pdu->u.deliver_sm.short_message,0,udh_offset);
msg->sms.msgdata = octstr_copy(pdu->u.deliver_sm.short_message,udh_offset,octstr_len(pdu->
u.deliver_sm.short_message)-udh_offset);
} else {
msg->sms.msgdata = pdu->u.deliver_sm.short_message;
}
pdu->u.deliver_sm.short_message = NULL;
udh_offset = octstr_get_char(pdu->u.deliver_sm.short_message,0)+1;
msg->sms.udhdata = octstr_copy(pdu->u.deliver_sm.short_message,0,udh_offset);
msg->sms.msgdata = octstr_copy(pdu->u.deliver_sm.short_message,udh_offset,octstr_len(pdu->
u.deliver_sm.short_message)-udh_offset);
} else {
msg->sms.msgdata = pdu->u.deliver_sm.short_message;
}
pdu->u.deliver_sm.short_message = NULL;
-ends */
and add 1 line in urltrans.c (octstr_binary_to_hex(enc,1)), in the switch case.
case 'u':
if(octstr_len(request->sms.udhdata)) {
enc = octstr_duplicate(request->sms.udhdata);
octstr_binary_to_hex(enc,1); // --> added the new entry
octstr_url_encode(enc);
octstr_append(result, enc);
octstr_destroy(enc);
}
break;
if(octstr_len(request->sms.udhdata)) {
enc = octstr_duplicate(request->sms.udhdata);
octstr_binary_to_hex(enc,1); // --> added the new entry
octstr_url_encode(enc);
octstr_append(result, enc);
octstr_destroy(enc);
}
break;
And this would give $udh when concatenated message arrives to your kannel bearerbox and hence passed to smsbox.
E.g. udh = 0003410201 -> message 1 of 2
I took the udh and assembled in my receiver.
Would appreciate further solutions.
-Enjoyyyyy
karthik.
karthik chandrasekhar <[EMAIL PROTECTED]> wrote:
Hello folks,I had been using kannel for some time with gsm modem as well as smsc.Have a question on UDH received from smsc using smpp.For long text sms: Receiving via gsm modem i could manipulate and retrieve the UDH parameter as hex ( octstr_binary_to_hex(udh,1) --> case 'u' in urltrans.c) via udh=%u in post-url method (bearerbox -> smsbox). Same thing is not visible via SMPP. That is if i receive long sms via smpp then i don't see any udh value. Is it the limitation of kannel that it doesn't support receiving udh via smpp ?. (The online documentation says n).Has anybody succeeded in retrieving udh parameter via smpp while receiving text sms(long).Other option i look is do some workaround using split-chars.Does bearerbox / smsbox concatenate sms while receiving from smsc via smpp (smsc_smpp.c / bb_smscconn.c).Rather i could send long text/binary sms with appropriate udh assigned to smsc as well as gsm modem. Receiving udh seems problematic in case of smsc.Please advice me.-Thanx,karthik
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!