diff --git a/channels/chan_sip.c b/channels/chan_sip.c index cb45e76522..262495223b 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -4660,7 +4660,9 @@ static int find_sdp(struct sip_request *req) for (x = 0; x < (req->lines - 2); x++) { if (!strncasecmp(req->line[x], boundary, strlen(boundary)) && !strcasecmp(req->line[x + 1], "Content-Type: application/sdp")) { - req->sdp_start = x + 2; + x += 2; + req->sdp_start = x; + /* search for the end of the body part */ for ( ; x < req->lines; x++) { if (!strncasecmp(req->line[x], boundary, strlen(boundary)))