mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-16 00:41:41 +00:00
t38
This commit is contained in:
parent
2dd7ab104d
commit
540c2a91da
@ -147,6 +147,10 @@ switch_status_t megaco_activate_termination(mg_termination_t *term)
|
||||
|
||||
switch_core_session_receive_event(session, &var_event);
|
||||
|
||||
if (term->u.rtp.t38_options) {
|
||||
switch_channel_set_private(channel, "t38_options", term->u.rtp.t38_options);
|
||||
}
|
||||
|
||||
switch_core_session_rwunlock(session);
|
||||
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Sent refresh to channel [%s], for termination [%s]\n", term->uuid, term->name);
|
||||
@ -170,6 +174,11 @@ switch_status_t megaco_activate_termination(mg_termination_t *term)
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Termination [%s] successfully instanciated as [%s] [%s]\n", term->name, dialstring, switch_core_session_get_uuid(session));
|
||||
channel = switch_core_session_get_channel(session);
|
||||
switch_channel_set_private(channel, PVT_MG_TERM, term);
|
||||
|
||||
if (term->u.rtp.t38_options) {
|
||||
switch_channel_set_private(channel, "t38_options", term->u.rtp.t38_options);
|
||||
}
|
||||
|
||||
switch_core_event_hook_add_recv_dtmf(session, mg_on_dtmf);
|
||||
|
||||
if (term->type == MG_TERM_TDM) {
|
||||
|
@ -40,7 +40,7 @@
|
||||
#define kPTIME "ptime"
|
||||
#define kPT "pt"
|
||||
#define kRFC2833PT "rfc2833_pt"
|
||||
#define kMODE "mode"
|
||||
#define kMEDIATYPE "media_type"
|
||||
#define kRATE "rate"
|
||||
|
||||
static struct {
|
||||
@ -524,9 +524,8 @@ static switch_status_t channel_receive_event(switch_core_session_t *session, swi
|
||||
switch_rtp_set_telephony_event(tech_pvt->rtp_session, pt);
|
||||
}
|
||||
|
||||
if (compare_var(event, channel, kMODE)) {
|
||||
const char *newmode = switch_channel_get_variable(channel, kMODE);
|
||||
const char *mode = switch_channel_get_variable(channel, kMODE);
|
||||
if (compare_var(event, channel, kMEDIATYPE)) {
|
||||
const char *newmode = switch_channel_get_variable(channel, kMEDIATYPE);
|
||||
|
||||
if (!strcmp(newmode, "image")) {
|
||||
switch_channel_set_variable(tech_pvt->channel, "has_t38", "true");
|
||||
@ -535,7 +534,7 @@ static switch_status_t channel_receive_event(switch_core_session_t *session, swi
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_INFO, "Got IMAGE description\n");
|
||||
}
|
||||
|
||||
switch_channel_set_variable(channel, kMODE, newmode);
|
||||
switch_channel_set_variable(channel, kMEDIATYPE, newmode);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user