Index: drivers/dahdi/dahdi-base.c =================================================================== --- drivers/dahdi/dahdi-base.c (revision 10722) +++ drivers/dahdi/dahdi-base.c (working copy) @@ -225,6 +225,11 @@ .tonesamples = DAHDI_MS_TO_SAMPLES(DAHDI_CONFIG_PAUSE_LENGTH), }; +/* A double pause in the dialing */ +static struct dahdi_tone tone_double_pause = { + .tonesamples = DAHDI_MS_TO_SAMPLES(2 * DAHDI_CONFIG_PAUSE_LENGTH), +}; + static struct dahdi_dialparams global_dialparams = { .dtmf_tonelen = DAHDI_MS_TO_SAMPLES(DAHDI_CONFIG_DEFAULT_DTMF_LENGTH), .mfv1_tonelen = DAHDI_MS_TO_SAMPLES(DAHDI_CONFIG_DEFAULT_MFR1_LENGTH), @@ -3564,11 +3569,16 @@ switch (digitmode) { case DIGIT_MODE_PULSE: /* We should only get here with a pulse digit if we need - * to "dial" 'W' (wait 0.5 second) + * to "dial" 'w' or 'W' to briefly pause dialing. */ - if (digit == 'W') + switch (digit) { + case 'w': return &tone_pause; - + case 'W': + return &tone_double_pause; + default: + break; + } return NULL; case DIGIT_MODE_DTMF: switch (digit) { @@ -3596,8 +3606,10 @@ case 'D': tone_index = DAHDI_TONE_DTMF_A + (digit - 'A'); break; + case 'w': + return &tone_pause; case 'W': - return &tone_pause; + return &tone_double_pause; default: return NULL; } @@ -3631,8 +3643,10 @@ case 'C': tone_index = DAHDI_TONE_MFR1_ST3P; break; + case 'w': + return &tone_pause; case 'W': - return &tone_pause; + return &tone_double_pause; default: return NULL; } @@ -3658,8 +3672,10 @@ case 'F': tone_index = DAHDI_TONE_MFR2_FWD_10 + (digit - 'A'); break; + case 'w': + return &tone_pause; case 'W': - return &tone_pause; + return &tone_double_pause; default: return NULL; } @@ -3685,8 +3701,10 @@ case 'F': tone_index = DAHDI_TONE_MFR2_REV_10 + (digit - 'A'); break; + case 'w': + return &tone_pause; case 'W': - return &tone_pause; + return &tone_double_pause; default: return NULL; } @@ -3725,21 +3743,25 @@ chan->tonep = 0; break; default: - if ((c != 'W') && (chan->digitmode == DIGIT_MODE_PULSE)) { + if (chan->digitmode == DIGIT_MODE_PULSE) { if ((c >= '0') && (c <= '9') && (chan->txhooksig == DAHDI_TXSIG_OFFHOOK)) { chan->pdialcount = (c == '0') ? 10 : c - '0'; dahdi_rbs_sethook(chan, DAHDI_TXSIG_ONHOOK, DAHDI_TXSTATE_PULSEBREAK, chan->pulsebreaktime); return; } - } else { - chan->curtone = dahdi_mf_tone(chan, c, chan->digitmode); - chan->tonep = 0; - if (chan->curtone) { - dahdi_init_tone_state(&chan->ts, chan->curtone); - return; - } + break; } + /* Fall through */ + case 'w': + case 'W': + chan->curtone = dahdi_mf_tone(chan, c, chan->digitmode); + chan->tonep = 0; + if (chan->curtone) { + dahdi_init_tone_state(&chan->ts, chan->curtone); + return; + } + break; } } @@ -5353,8 +5375,12 @@ rv = 0; /* Force proper NULL termination and uppercase entry */ tdo->dialstr[DAHDI_MAX_DTMF_BUF - 1] = '\0'; - for (s = tdo->dialstr; *s; s++) + for (s = tdo->dialstr; *s; s++) { + if (*s == 'w') + /* 'w' is different from 'W'. */ + continue; *s = toupper(*s); + } spin_lock_irqsave(&chan->lock, flags); if (!chan->curzone) { spin_unlock_irqrestore(&chan->lock, flags);