Archive for October 11th, 2007
Patch Kannel to disable enquire_link/enquire_link_resp logging
Kannel monitoring sometimes needed by administrator. Normally, we will activate debug log to monitor submit_sm, deliver_sm, data_sm, and similar one. But, maybe you got annoyed by enquire_link & enquire_link_resp which normally done almost every 30 seconds or less.
To enable debug mode of kannel but skip enquire_link/resp you need to modify
1. gw/smsc/smpp_pdu.c
Find function name “void smpp_pdu_dump(SMPP_PDU *pdu)” and add this line at the
on the first line of function body code:
// No need enquire_link debug info
if(pdu->type == 0x80000015){
return;
}
2. gw/smsc/smsc_smpp.c
Find function name “static void send_enquire_link(SMPP *smpp, Connection *conn, long *last_sent)” and add remove or comment this line.
dump_pdu("Sending enquire link:", smpp->conn->id, pdu);
3. gw/smsc/smsc_smpp.c
Find function name “static void io_thread(void *arg)” and find this line
/* Deal with the PDU we just got */
dump_pdu("Got PDU:", smpp->conn->id, pdu);
Change to
/* Deal with the PDU we just got */
if(pdu->type != 0x80000015){
dump_pdu("Got PDU:", smpp->conn->id, pdu);
}
Now your log will contain no enquire_link/resp![]()