> > I use Kannel v1.1.5 and I have couple of SMSC-s connected
> > through SMPP protocol. The problem is, that smsc_id (the one
> > that I set in the kannel.conf file) doesn't appear, when I
> > receive messages. So I don't know which SMPP center sent it.
> > Is this common problem and is there any solution?
> 
> As long as smsc-id is set in the smsc group, the access log will tell you
> what SMSC it arrived from. You'll also be able to determine it if you use
> the %i escape code in your sms-service group.
> 
> Ian

Unfortunately that's not true for messages received through SMPP in 
Kannel 1.1.5, and I don't think it works in the CVS version either. The 
SMPP driver never copies the conn->id to sms.smsc_id, so neither 
"%i" nor "accepted-smsc" will work in the sms-service group. I noticed 
this a few days ago, below is a patch to gw/smsc_smpp.c that solves 
the problem. Sorry about the cross-posting, but it would be great if 
someone with CVS access working with the SMPP driver could take a 
look at it and apply it.

Cheers,
Per Skaglund


--- gateway-1.1.5/gw/smsc_smpp.c        Mon May 14 15:24:56 2001
+++ smsc_smpp.c Tue Oct  9 13:30:30 2001
@@ -371,7 +371,10 @@
        /* bb_smscconn_receive can fail, but we ignore that since we
           have no way to usefull tell the SMS center about this
           (no suitable error code for the deliver_sm_resp is defined) */
-       (void) bb_smscconn_receive(smpp->conn, pdu_to_msg(pdu));
+       msg = pdu_to_msg(pdu);
+       msg->sms.smsc_id = octstr_duplicate(smpp->conn->id);
+       (void) bb_smscconn_receive(smpp->conn, msg);
+       msg = NULL;
        resp = smpp_pdu_create(deliver_sm_resp, 
                               pdu->u.deliver_sm.sequence_number);
        break;


Reply via email to