]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fixing T38 issue
authorkapil <kgupta@sangoma.com>
Mon, 13 Aug 2012 19:29:01 +0000 (15:29 -0400)
committerkapil <kgupta@sangoma.com>
Mon, 13 Aug 2012 19:29:01 +0000 (15:29 -0400)
src/mod/endpoints/mod_media_gateway/media_gateway.c
src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c
src/mod/endpoints/mod_sofia/rtp.c

index 3652946bceb2ac118dda84cd35e97857a4bb710c..e3d9d7aafe909e02711161e60794d5d66bc78fbe 100644 (file)
@@ -128,7 +128,7 @@ switch_status_t megaco_activate_termination(mg_termination_t *term)
         
         switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, kMEDIATYPE, mg_media_type2str(term->u.rtp.media_type));
         switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "fax_enable_t38", "true");
-        switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "rtp_execute_on_image", "t38_gateway peer nocng");
+        switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "rtp_execute_on_image", "t38_gateway self nocng");
     } else if (term->type == MG_TERM_TDM) {
         switch_snprintf(dialstring, sizeof dialstring, "tdm/%s", term->name);
         
index 5aa1abb4a2ef1638e565b6a3eb500b95e83b171f..890d375df17bacb9d5f1ebc8fe0a144196c529b3 100644 (file)
@@ -1200,8 +1200,9 @@ switch_status_t handle_mg_modify_cmd(megaco_profile_t* mg_profile, MgMgcoCommand
 
                if(MG_TERM_RTP == term->type){
                        switch_log_printf(SWITCH_CHANNEL_LOG_CLEAN, SWITCH_LOG_ERROR,"MODIFY REQUEST - Updated RTP attributes:"
-                                       " local_addr[%s] local_port[%d] remote_addr[%s], remote_port[%d], ptime[%d] pt[%d], "
+                                       " Media_Type(%s),local_addr[%s] local_port[%d] remote_addr[%s], remote_port[%d], ptime[%d] pt[%d], "
                                        " rfc2833_pt[%d] rate[%d], codec[%s], term_id[%d]\n",
+                                       mg_media_type2str(term->u.rtp.media_type),
                                        ((NULL != term->u.rtp.local_addr)?term->u.rtp.local_addr:NULL),
                                        term->u.rtp.local_port,
                                        ((NULL != term->u.rtp.remote_addr)?term->u.rtp.remote_addr:NULL),
index d6284cc20a7fe4f6340884458e80e14de14eb9ed..a773a07590b35f85413279d04c53f2e4d0d44819 100644 (file)
@@ -529,8 +529,9 @@ static switch_status_t channel_receive_event(switch_core_session_t *session, swi
                
                if (!strcmp(newmode, "image")) {
                        switch_channel_set_variable(tech_pvt->channel, "has_t38", "true");
-                       switch_channel_set_app_flag_key("T38", tech_pvt->channel, CF_APP_T38);
                        switch_channel_execute_on(tech_pvt->channel, "rtp_execute_on_image");
+                       switch_channel_set_app_flag_key("T38", tech_pvt->channel, CF_APP_T38);
+
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Got IMAGE description\n");
                }
                
@@ -571,6 +572,7 @@ static switch_status_t channel_receive_message(switch_core_session_t *session, s
        case SWITCH_MESSAGE_INDICATE_UDPTL_MODE:
                {
                        switch_t38_options_t *t38_options = switch_channel_get_private(tech_pvt->channel, "t38_options");
+                       switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CONSOLE, "SWITCH_MESSAGE_INDICATE_UDPTL_MODE\n");
                        if (!t38_options) {
                                goto end;
                        }