Index: channels/chan_sip.c =================================================================== --- channels/chan_sip.c (revision 38166) +++ channels/chan_sip.c (working copy) @@ -4380,6 +4380,9 @@ const char *content_type; const char *search; char *boundary; + + char *boundary2; + char *search2; unsigned int x; content_type = get_header(req, "Content-Type"); @@ -4406,14 +4409,21 @@ /* make a duplicate of the string, with two extra characters at the beginning */ - boundary = ast_strdupa(search - 2); + boundary2 = ast_strdupa(search - 2); + if ((search2 = strcasestr(boundary2, "\""))) { + boundary = ast_strdupa(search -1); + } + else { + strcpy(boundary2,boundary); + } + boundary[0] = boundary[1] = '-'; /* search for the boundary marker, but stop when there are not enough lines left for it, the Content-Type header and at least one line of body */ for (x = 0; x < (req->lines - 2); x++) { - if (!strncasecmp(req->line[x], boundary, strlen(boundary)) && + if (!strncasecmp(req->line[x], boundary, strlen(boundary) -1) && !strcasecmp(req->line[x + 1], "Content-Type: application/sdp")) { req->sdp_start = x + 2; /* search for the end of the body part */