Ady Wicaksono Daily Activities

Patch Kannel to disable enquire_link/enquire_link_resp logging

leave a comment »

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){

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

Written by adywicaksono

October 11, 2007 at 4:23 pm

Posted in C/C++, kannel

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: