Don't double receive INFO or MESSAGE elements (bug #1512)
authorMark Spencer <markster@digium.com>
Wed, 28 Apr 2004 22:12:08 +0000 (22:12 +0000)
committerMark Spencer <markster@digium.com>
Wed, 28 Apr 2004 22:12:08 +0000 (22:12 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2808 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index 2fd2f67..220f213 100755 (executable)
@@ -5718,9 +5718,11 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
                        p->needdestroy = 1;
                transmit_response(p, "200 OK", req);
        } else if (!strcasecmp(cmd, "MESSAGE")) {
-               if (sipdebug)
-                       ast_verbose("Receiving message!\n");
-               receive_message(p, req);
+               if (!ignore) {
+                       if (sipdebug)
+                               ast_verbose("Receiving message!\n");
+                       receive_message(p, req);
+               }
                transmit_response(p, "200 OK", req);
        } else if (!strcasecmp(cmd, "SUBSCRIBE")) {
                if (!ignore) {
@@ -5788,9 +5790,11 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
                    transmit_state_notify(p, ast_extension_state(NULL, p->context, p->exten),1);
                }
        } else if (!strcasecmp(cmd, "INFO")) {
-               if (sipdebug)
-                       ast_verbose("Receiving DTMF!\n");
-               receive_info(p, req);
+               if (!ignore) {
+                       if (sipdebug)
+                               ast_verbose("Receiving DTMF!\n");
+                       receive_info(p, req);
+               }
                transmit_response(p, "200 OK", req);
        } else if (!strcasecmp(cmd, "REGISTER")) {
                /* Use this as the basis */