From 35126a3593cf824faf84c51096eed8ed16b5c3a7 Mon Sep 17 00:00:00 2001 From: kapil Date: Mon, 13 Aug 2012 15:29:01 -0400 Subject: [PATCH] fixing T38 issue --- src/mod/endpoints/mod_media_gateway/media_gateway.c | 2 +- .../endpoints/mod_media_gateway/media_gateway_cmd_handler.c | 3 ++- src/mod/endpoints/mod_sofia/rtp.c | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/mod/endpoints/mod_media_gateway/media_gateway.c b/src/mod/endpoints/mod_media_gateway/media_gateway.c index 3652946bce..e3d9d7aafe 100644 --- a/src/mod/endpoints/mod_media_gateway/media_gateway.c +++ b/src/mod/endpoints/mod_media_gateway/media_gateway.c @@ -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); diff --git a/src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c b/src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c index 5aa1abb4a2..890d375df1 100644 --- a/src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c +++ b/src/mod/endpoints/mod_media_gateway/media_gateway_cmd_handler.c @@ -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), diff --git a/src/mod/endpoints/mod_sofia/rtp.c b/src/mod/endpoints/mod_sofia/rtp.c index d6284cc20a..a773a07590 100644 --- a/src/mod/endpoints/mod_sofia/rtp.c +++ b/src/mod/endpoints/mod_sofia/rtp.c @@ -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; }