diff -u -r1.677 chan_sip.c --- chan_sip.c 17 Mar 2005 23:03:07 -0000 1.677 +++ chan_sip.c 19 Mar 2005 18:43:57 -0000 @@ -2567,7 +2569,7 @@ strncpy(tmp, get_header(req, "To"), sizeof(tmp) - 1); else strncpy(tmp, get_header(req, "From"), sizeof(tmp) - 1); - tag = strstr(tmp, "tag="); + tag = strcasestr(tmp, "tag="); if (tag) { tag += 4; c = strchr(tag, ';'); @@ -3429,7 +3431,7 @@ /* Add tag *unless* this is a CANCEL, in which case we need to send it exactly as our original request, including tag (or presumably lack thereof) */ - if (!strstr(ot, "tag=") && sipmethod != SIP_CANCEL) { + if (!strcasestr(ot, "tag=") && sipmethod != SIP_CANCEL) { /* Add the proper tag if we don't have it already. If they have specified their tag, use it. Otherwise, use our own tag */ if (ast_test_flag(p, SIP_OUTGOING) && !ast_strlen_zero(p->theirtag)) @@ -7470,7 +7471,7 @@ /* Get their tag if we haven't already */ to = get_header(req, "To"); - to = strstr(to, "tag="); + to = strcasestr(to, "tag="); if (to) { to += 4; strncpy(p->theirtag, to, sizeof(p->theirtag) - 1); @@ -8634,7 +8635,7 @@ /* Find their tag if we haven't got it */ if (ast_strlen_zero(p->theirtag)) { from = get_header(req, "From"); - from = strstr(from, "tag="); + from = strcasestr(from, "tag="); if (from) { from += 4; strncpy(p->theirtag, from, sizeof(p->theirtag) - 1);