add sip_execute_on_image variable similar to execute_on_answer etc so you can run t38_gateway or rxfax etc when you get a T.38 re-invite but no CNG tone or you want to ignore the tone and only react when getting a T.38 re-invite

This commit is contained in:
Anthony Minessale 2011-02-28 12:43:05 -06:00
parent fe152626db
commit 53fc3f7f78
1 changed files with 16 additions and 0 deletions

View File

@ -3820,6 +3820,7 @@ static switch_t38_options_t *tech_process_udptl(private_object_t *tech_pvt, sdp_
{
switch_t38_options_t *t38_options = switch_channel_get_private(tech_pvt->channel, "t38_options");
sdp_attribute_t *attr;
const char *var;
if (!t38_options) {
t38_options = switch_core_session_alloc(tech_pvt->session, sizeof(switch_t38_options_t));
@ -3899,6 +3900,21 @@ static switch_t38_options_t *tech_process_udptl(private_object_t *tech_pvt, sdp_
switch_channel_set_private(tech_pvt->channel, "t38_options", t38_options);
switch_channel_set_app_flag_key("T38", tech_pvt->channel, CF_APP_T38);
if ((var = switch_channel_get_variable(tech_pvt->channel, "sip_execute_on_image"))) {
char *app, *arg = NULL;
app = switch_core_session_strdup(tech_pvt->session, var);
if (strstr(app, "::")) {
switch_core_session_execute_application_async(tech_pvt->session, app, arg);
} else {
if ((arg = strchr(app, ' '))) {
*arg++ = '\0';
}
switch_core_session_execute_application(tech_pvt->session, app, arg);
}
}
return t38_options;
}