]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
adding a couple of notes and eventually disable jitterbuffer
authorMassimo Cetra <ctrix+fs@navynet.it>
Fri, 5 Sep 2008 12:22:19 +0000 (12:22 +0000)
committerMassimo Cetra <ctrix+fs@navynet.it>
Fri, 5 Sep 2008 12:22:19 +0000 (12:22 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9461 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_fax/mod_fax.c

index 69cb1fe3b81e391958c98ed7ced548247677a973..1bd4a41f5bf6b724151da18020665d4aa26f11ef 100644 (file)
@@ -297,7 +297,6 @@ static switch_status_t spanfax_init( pvt_t *pvt, transport_mode_t trans_mode )
                                        T30_SUPPORT_STANDARD_RESOLUTION | T30_SUPPORT_FINE_RESOLUTION | T30_SUPPORT_SUPERFINE_RESOLUTION
                                        | T30_SUPPORT_R8_RESOLUTION | T30_SUPPORT_R16_RESOLUTION);
 
-                       //TODO Disable V17
 
                        if ( pvt->disable_v17 ) 
                        {
@@ -545,9 +544,9 @@ void process_fax(switch_core_session_t *session, const char *data, application_m
        }
 
        /*
-           Initialize the SpanDSP elements
+           *** Initialize the SpanDSP elements ***
 
-           NOTE, we could analyze if a fax was already detected in previous stages
+           Note: we could analyze if a fax was already detected in previous stages
            and if so, when T.38 will be supported, send a reinvite in T38_MODE,
            bypassing AUDIO_MODE.
         */
@@ -558,11 +557,17 @@ void process_fax(switch_core_session_t *session, const char *data, application_m
                return;
        }
 
-       /* Answer the call */
-       switch_channel_answer(channel);
-
        /* Note: Disable echocan on the channel, it there is an API call to do that */
 
+       /*
+          Note: We should eventually disable JB before answering. JB is bad for faxing
+
+           switch_channel_set_variable(channel, "jitterbuffer_msec", "0" );
+       */
+
+
+       /* Finally answer the call */
+       switch_channel_answer(channel);
 
        /* We store the original channel codec before switching both
         * legs of the calls to a linear 16 bit codec that is the one
@@ -644,6 +649,13 @@ void process_fax(switch_core_session_t *session, const char *data, application_m
                        goto done;
                }
 
+               /* Note: more analysys on this. RTP timing maybe inaccurate and, if so,
+                        shoule be improved.
+                  agx proposes to add a channel variable to disable this check and don't skip CNG frames
+                  to improve the compatibility with the problems that another (??)famous pbx that 
+                  has always had serious problems with timers (or lack of).
+               */
+
                /* Skip CNG frames (autogenerated by FreeSWITCH, usually) */
                if (switch_test_flag(read_frame, SFF_CNG)) {
                        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Skipping CNG frame\n" );