Only set the RTP DTMF information of an RTP structure does indeed exist.
authorJoshua Colp <jcolp@digium.com>
Wed, 17 May 2006 22:02:15 +0000 (22:02 +0000)
committerJoshua Colp <jcolp@digium.com>
Wed, 17 May 2006 22:02:15 +0000 (22:02 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@27972 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index ac1fd58..730de65 100644 (file)
@@ -2195,18 +2195,19 @@ static int create_addr_from_peer(struct sip_pvt *r, struct sip_peer *peer)
                ast_rtp_destroy(r->vrtp);
                r->vrtp = NULL;
        }
-       ast_rtp_setdtmf(r->rtp, ast_test_flag(&r->flags[0], SIP_DTMF) != SIP_DTMF_INFO);
        r->prefs = peer->prefs;
        natflags = ast_test_flag(&r->flags[0], SIP_NAT) & SIP_NAT_ROUTE;
        if (r->rtp) {
                if (option_debug)
                        ast_log(LOG_DEBUG, "Setting NAT on RTP to %d\n", natflags);
                ast_rtp_setnat(r->rtp, natflags);
+               ast_rtp_setdtmf(r->rtp, ast_test_flag(&r->flags[0], SIP_DTMF) != SIP_DTMF_INFO);
        }
        if (r->vrtp) {
                if (option_debug)
                        ast_log(LOG_DEBUG, "Setting NAT on VRTP to %d\n", natflags);
                ast_rtp_setnat(r->vrtp, natflags);
+               ast_rtp_setdtmf(r->vrtp, 0);
        }
        ast_string_field_set(r, peername, peer->username);
        ast_string_field_set(r, authname, peer->username);