diff --git a/channels/chan_sip.c b/channels/chan_sip.c index b0bdcdc3bdd9e832b9cbae823883bb8e744cfe2d..c11f740b8d20a4d1af39acc24c07de49f2936944 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -9773,7 +9773,7 @@ static int transmit_state_notify(struct sip_pvt *p, int state, int full, int tim ast_copy_string(to, get_header(&p->initreq, "To"), sizeof(to)); c = get_in_brackets(to); - if (strncasecmp(to, "sip:", 4) && strncasecmp(to, "sips:", 5)) { + if (strncasecmp(c, "sip:", 4) && strncasecmp(c, "sips:", 5)) { ast_log(LOG_WARNING, "Huh? Not a SIP header (%s)?\n", to); return -1; }