--- asterisk/channels/chan_sip.c.ORIG 2006-01-30 23:08:54.000000000 -0600 +++ asterisk/channels/chan_sip.c 2006-01-31 11:05:33.000000000 -0600 @@ -3163,6 +3163,14 @@ found = 0; /* This is not our packet */ } } + if (p->theirtag[0] == '\0' && fromtag[0]) { + /* We have no from tag, but they have. Wrong dialog */ + found = 0; + } else if (fromtag[0]) { /* Both have tags, compare them */ + if (strcmp(fromtag, p->theirtag)) { + found = 0; /* This is not our packet */ + } + } if (!found && option_debug > 4) ast_log(LOG_DEBUG, "= Being pedantic: This is not our match on request: Call ID: %s Ourtag Totag %s Method %s\n", p->callid, totag, sip_methods[req->method].text); }