]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak
authorAnthony Minessale <anthony.minessale@gmail.com>
Fri, 9 Mar 2007 01:15:54 +0000 (01:15 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Fri, 9 Mar 2007 01:15:54 +0000 (01:15 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4488 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/mod_sofia.c

index b1998af16cfaf994cd3a1f56e41100a99d39fb8c..ceadb1ae4ef69f7ba10cf12b0d5b7a60dd34e1e2 100644 (file)
@@ -1647,7 +1647,9 @@ static switch_status_t activate_rtp(private_object_t *tech_pvt)
                               vad_in ? "in" : "", vad_out ? "out" : "");
                }
 
-               switch_rtp_set_telephony_event(tech_pvt->rtp_session, tech_pvt->te);
+               if (tech_pvt->te) {
+                       switch_rtp_set_telephony_event(tech_pvt->rtp_session, tech_pvt->te);
+               }
                if (tech_pvt->cng_pt) {
                        switch_rtp_set_cng_pt(tech_pvt->rtp_session, tech_pvt->cng_pt);
                }
@@ -2471,6 +2473,9 @@ static uint8_t negotiate_sdp(switch_core_session_t *session, sdp_session_t *sdp)
                                if (!te && !strcasecmp(map->rm_encoding, "telephone-event")) {
                                        te = tech_pvt->te = (switch_payload_t)map->rm_pt;
                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Set 2833 dtmf payload to %u\n", te);
+                                       if (tech_pvt->rtp_session) {
+                                               switch_rtp_set_telephony_event(tech_pvt->rtp_session, tech_pvt->te);
+                                       }
                                }
 
                                if (!cng_pt && !strcasecmp(map->rm_encoding, "CN")) {