diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 85086d044c..9c0c2b1f2f 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11638,10 +11638,12 @@ static struct ast_custom_function sipchaninfo_function = { static void parse_moved_contact(struct sip_pvt *p, struct sip_request *req) { char tmp[BUFSIZ]; - char *s, *e, *uri; + char *s, *e, *uri, *t; char *domain; ast_copy_string(tmp, get_header(req, "Contact"), sizeof(tmp)); + if ((t = strchr(tmp, ','))) + *t = '\0'; s = get_in_brackets(tmp); uri = ast_strdupa(s); if (ast_test_flag(&p->flags[0], SIP_PROMISCREDIR)) {