Only check the first value of the first Via header diff -r 8fd95ab3ddf0 channels/chan_sip.c --- a/channels/chan_sip.c Wed Dec 06 13:10:33 2006 +0100 +++ b/channels/chan_sip.c Wed Dec 06 14:06:16 2006 +0100 @@ -8894,7 +8894,11 @@ static void check_via(struct sip_pvt *p, struct hostent *hp; struct ast_hostent ahp; + /* Work on the leftmost value of the topmost Via header */ ast_copy_string(via, get_header(req, "Via"), sizeof(via)); + c = strchr(via, ','); + if (c) + *c = '\0'; /* Check for rport */ c = strstr(via, ";rport");