]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-5358 --resolve use allow-transcoding=true param in global settings or fifo_allow_t...
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 30 Apr 2013 14:39:35 +0000 (09:39 -0500)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 30 Apr 2013 14:42:11 +0000 (09:42 -0500)
Conflicts:
src/mod/applications/mod_fifo/mod_fifo.c

src/mod/applications/mod_fifo/mod_fifo.c

index 99d17a44fa1aedb4b3fa99d16403c92f6223dfa5..ca6fd907d09e4b819291ff7fae90451f5b4f834a 100644 (file)
@@ -599,6 +599,7 @@ static struct {
        char *inner_pre_trans_execute;
        char *inner_post_trans_execute; 
        switch_sql_queue_manager_t *qm;
+       int allow_transcoding;
 } globals;
 
 
@@ -1415,7 +1416,8 @@ static void *SWITCH_THREAD_FUNC ringall_thread_run(switch_thread_t *thread, void
 
        if (!total) goto end;
 
-       if ((codec = switch_event_get_header(pop, "variable_sip_use_codec_name"))) {
+       if (!globals.allow_transcoding && !switch_true(switch_event_get_header(pop, "variable_fifo_allow_transcoding")) && 
+               (codec = switch_event_get_header(pop, "variable_sip_use_codec_name"))) {
                const char *rate = switch_event_get_header(pop, "variable_sip_use_codec_rate");
                const char *ptime = switch_event_get_header(pop, "variable_sip_use_codec_ptime");
                char nstr[256] = "";
@@ -4064,6 +4066,8 @@ static switch_status_t load_config(int reload, int del_all)
                                } else {
                                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ODBC IS NOT AVAILABLE!\n");
                                }
+                       } else if (!strcasecmp(var, "allow-transcoding") && !zstr(val)) {
+                               globals.allow_transcoding = switch_true(val);
                        } else if (!strcasecmp(var, "db-pre-trans-execute") && !zstr(val)) {
                                globals.pre_trans_execute = switch_core_strdup(globals.pool, val);
                        } else if (!strcasecmp(var, "db-post-trans-execute") && !zstr(val)) {