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);
/* 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);
}
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;
}
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");