Merged revisions 50466 via svnmerge from
[asterisk/asterisk.git] / channels / chan_sip.c
index 2707f0c..010a408 100644 (file)
@@ -16894,7 +16894,9 @@ static enum ast_rtp_get_result sip_get_rtp_peer(struct ast_channel *chan, struct
 
        *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;