res_pjsip: Use ast_sip_is_content_type() where appropriate

Change-Id: If3ab0d73d79ac4623308bd48508af2bfd554937d
This commit is contained in:
Sean Bright
2017-09-22 11:02:11 -04:00
parent 9576ae0e7e
commit f39af4d36d
4 changed files with 13 additions and 17 deletions

View File

@@ -3181,8 +3181,9 @@ static void session_outgoing_nat_hook(pjsip_tx_data *tdata, struct ast_sip_trans
int stream;
/* SDP produced by us directly will never be multipart */
if (!transport_state || hook || !tdata->msg->body || pj_stricmp2(&tdata->msg->body->content_type.type, "application") ||
pj_stricmp2(&tdata->msg->body->content_type.subtype, "sdp") || ast_strlen_zero(transport->external_media_address)) {
if (!transport_state || hook || !tdata->msg->body ||
!ast_sip_is_content_type(&tdata->msg->body->content_type, "application", "sdp") ||
ast_strlen_zero(transport->external_media_address)) {
return;
}