[asterisk-dev] [Code Review] Fax Gateway Implementation T30<->T38

Pavel Selivanov biohumanoid.lists at gmail.com
Thu Apr 14 13:32:24 CDT 2011


> No, this is not correct. DAHDI can report detection of CNG tones if an 
> echocan (usually a hardware echocan) reports them, but it does *not* 
> setup a CNG detector.
>
> DAHDI *does* setup a CED detector and react to detection of CED when 
> appropriate. In addition, in current DAHDI releases, it does not 
> 'switch the echocan off', instead it tells the echocan to switch into 
> 'FAX' mode; the exact effects that result are dependent on how the 
> echocan implements that operation.
This is not correct too :-)
if chan->ec_state->features.NLP_automatic is true => setting mode to 
ECHO_MODE_FAX
if chan->ec_state->features.NLP_toggle => setting mode to ECHO_MODE_FAX 
& sending DAHDI_EVENT_EC_NLP_DISABLED event to asterisk.
if no features registered => setting mode to ECHO_MODE_IDLE.
In __dahdi_ec_chunk, echocan_process is called if 
(ss->ec_state->status.mode != ECHO_MODE_IDLE)

For example, DAHDI will not pass data to OSLEC, because OSLEC do not 
support any "features".
DAHDI will not switch off OSLEC echocanceller. It will not call it :-)


             if 
(echo_can_disable_detector_update(&ms->ec_state->txecdis, getlin[x])) {
                 set_echocan_fax_mode(ms, ss->channo, "CED tx detected", 1);
                 dahdi_qevent_nolock(ms, DAHDI_EVENT_TX_CED_DETECTED);
                 break;
             }

static void set_echocan_fax_mode(struct dahdi_chan *chan, unsigned int 
channo, const char *reason, unsigned int enable)
         if (!chan->ec_state)
            // checking chan->ec_state->status.mode & 
chan->ec_state->features
         } else { //none of the features found
             module_printk(KERN_NOTICE, "Idled echo canceller because of 
%s on channel %d\n", reason, channo);
             chan->ec_state->status.mode = ECHO_MODE_IDLE;
         }

and finally __dahdi_ec_chunk
         } else if (ss->ec_state->status.mode != ECHO_MODE_IDLE) {
                 //cutted code
                 ss->ec_state->ops->echocan_process(ss->ec_state, 
rxlins, txlins, DAHDI_CHUNKSIZE);




More information about the asterisk-dev mailing list