Merge branch 'nsg-4.3' of ssh://git.sangoma.com/smg_freeswitch into nsg-4.3

This commit is contained in:
kapil 2012-08-13 10:48:29 -04:00
commit 9fcaa9e84c
2 changed files with 8 additions and 8 deletions

View File

@ -127,8 +127,8 @@ switch_status_t megaco_activate_termination(mg_termination_t *term)
switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, kCODEC, term->u.rtp.codec);
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, "fax_enable_t38", "true");
switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "rtp_execute_on_image", "t38_gateway peer nocng");
} else if (term->type == MG_TERM_TDM) {
switch_snprintf(dialstring, sizeof dialstring, "tdm/%s", term->name);
@ -143,14 +143,14 @@ switch_status_t megaco_activate_termination(mg_termination_t *term)
/* A UUID is present, check if the channel still exists */
switch_core_session_t *session;
if ((session = switch_core_session_locate(term->uuid))) {
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_channel_t *channel = switch_core_session_get_channel(session);
switch_event_add_header_string(var_event, SWITCH_STACK_BOTTOM, "command", "media_modify");
switch_core_session_receive_event(session, &var_event);
if (term->u.rtp.t38_options) {
if (term->u.rtp.t38_options) {
switch_channel_set_private(channel, "t38_options", term->u.rtp.t38_options);
}
switch_core_session_receive_event(session, &var_event);
switch_core_session_rwunlock(session);

View File

@ -509,7 +509,7 @@ static switch_status_t channel_receive_event(switch_core_session_t *session, swi
}
if (compare_var(event, channel, kRFC2833PT)) {
const char *szpt = switch_channel_get_variable(channel, kRFC2833PT);
const char *szpt = switch_event_get_header(event, kRFC2833PT);
int pt = !zstr(szpt) ? atoi(szpt) : 0;
tech_pvt->rfc2833_pt = pt;
@ -525,7 +525,7 @@ static switch_status_t channel_receive_event(switch_core_session_t *session, swi
}
if (compare_var(event, channel, kMEDIATYPE)) {
const char *newmode = switch_channel_get_variable(channel, kMEDIATYPE);
const char *newmode = switch_event_get_header(event, kMEDIATYPE);
if (!strcmp(newmode, "image")) {
switch_channel_set_variable(tech_pvt->channel, "has_t38", "true");