--- chan_dahdi.c.svn 2009-03-04 23:30:17.000000000 +1300 +++ chan_dahdi.c 2009-03-04 23:31:28.000000000 +1300 @@ -1064,8 +1064,10 @@ static struct dahdi_pvt { int msgstate; #ifdef HAVE_DAHDI_LINEREVERSE_VMWI struct dahdi_vmwi_info mwisend_setting; /*!< Which VMWI methods to use */ - unsigned int mwisend_fsk: 1; /*! Variable for enabling FSK MWI handling in chan_dahdi */ + unsigned int mwisend_fsk:1; /*! Variable for enabling FSK MWI handling in chan_dahdi */ unsigned int mwisend_rpas:1; /*! Variable for enabling Ring Pulse Alert before MWI FSK Spill */ + unsigned int mwisend_lrdtas:1; /*! Variable for enabling Line Reversal and Dual Tone Alert Signal before MWI FSK Spill */ + unsigned int mwisend_dtas:1; /*! Variable for enabling Dual Tone Alert Signal before MWI FSK Spill */ #endif int distinctivering; /*!< Which distinctivering to use */ int cidrings; /*!< Which ring to deliver CID on */ @@ -9451,6 +9453,8 @@ static struct dahdi_pvt *mkintf(int chan #ifdef HAVE_DAHDI_LINEREVERSE_VMWI tmp->mwisend_setting = conf->chan.mwisend_setting; tmp->mwisend_fsk = conf->chan.mwisend_fsk; + tmp->mwisend_lrdtas = conf->chan.mwisend_lrdtas; + tmp->mwisend_dtas = conf->chan.mwisend_dtas; tmp->mwisend_rpas = conf->chan.mwisend_rpas; #endif if (chan_sig & __DAHDI_SIG_FXO) { @@ -14812,11 +14816,26 @@ static int process_dahdi(struct dahdi_ch } else { /* Default FSK */ confp->chan.mwisend_fsk = 1; } - if (strcasestr(v->value, "rpas")) { /* Ring Pulse Alert Signal, normally followed by FSK */ + /* TAS: TE Alerting Signal before FSK.*/ + /* Reference ETSI EN 300 659-1 V1.3.1 (2001-01) */ + if (strcasestr(v->value, "lrdtas")) { /* LR+DT-AS: Line reversal followed by DT-AS */ + confp->chan.mwisend_lrdtas = 1; + confp->chan.mwisend_dtas = 0; + confp->chan.mwisend_rpas = 0; + } else if (strcasestr(v->value, "dtas")) { /* DT-AS: Dual Tone Alerting Signal */ + confp->chan.mwisend_lrdtas = 0; + confp->chan.mwisend_dtas = 1; + confp->chan.mwisend_rpas = 0; + } else if (strcasestr(v->value, "rpas")) { /* RP-AS: Ring Pulse Alert Signal */ + confp->chan.mwisend_lrdtas = 0; + confp->chan.mwisend_dtas = 0; confp->chan.mwisend_rpas = 1; } else { + confp->chan.mwisend_lrdtas = 0; + confp->chan.mwisend_dtas = 0; confp->chan.mwisend_rpas = 0; } + if (strcasestr(v->value, "lrev")) { /* Line Reversal */ confp->chan.mwisend_setting.vmwi_type |= DAHDI_VMWI_LREV; }