*rtp = p->rtp;
- if (ast_test_flag(&p->flags[0], SIP_CAN_REINVITE))
+ if (ast_rtp_getnat(*rtp) && !ast_test_flag(&p->flags[0], SIP_CAN_REINVITE_NAT))
+ res = AST_RTP_TRY_PARTIAL;
+ else if (ast_test_flag(&p->flags[0], SIP_CAN_REINVITE))
res = AST_RTP_TRY_NATIVE;
else if (ast_test_flag(&global_jbconf, AST_JB_FORCED))
res = AST_RTP_GET_FAILED;
void ast_rtp_setnat(struct ast_rtp *rtp, int nat);
+int ast_rtp_getnat(struct ast_rtp *rtp);
+
/*! \brief Indicate whether this RTP session is carrying DTMF or not */
void ast_rtp_setdtmf(struct ast_rtp *rtp, int dtmf);
rtp->nat = nat;
}
+int ast_rtp_getnat(struct ast_rtp *rtp)
+{
+ return ast_test_flag(rtp, FLAG_NAT_ACTIVE);
+}
+
void ast_rtp_setdtmf(struct ast_rtp *rtp, int dtmf)
{
ast_set2_flag(rtp, dtmf ? 1 : 0, FLAG_HAS_DTMF);