--- sqlbox.c.orig       2006-05-13 05:58:13.000000000 -0600
+++ sqlbox.c    2006-05-13 07:07:01.000000000 -0600
@@ -341,7 +341,7 @@
                msg_destroy(msg);
                break;
        }
-       if (msg_type(msg) == sms) {
+       if ((msg_type(msg) == sms) && (msg->sms.sms_type != report_mo)) {
                gw_sql_save_msg(msg, octstr_imm("MO"));
        }
        send_msg(conn->smsbox_connection, conn, msg);
@@ -454,7 +454,7 @@
                        debug("sqlbox", 0, "bearerbox_to_sql: connection to bearerbox died.");
                        break;
                }
-               if (msg_type(msg) == sms) {
+        if ((msg_type(msg) == sms) && (msg->sms.sms_type != report_mo)) {
                        gw_sql_save_msg(msg, octstr_imm("MO"));
                }
                msg_destroy(msg);
