[asterisk-users] app_swift 1.6.2 DTMF issue

Jeremy Kister asterisk-01 at jeremykister.com
Mon Jan 11 00:47:01 CST 2010


On 1/10/2010 5:33 PM, Jeremy Kister wrote:
> With app_swift 1.6.2 + asterisk 1.6.1.12, I've found that if you 
> enter DTMF during cepstral playback, the first digit of ${SWIFT_DTMF} 
> is [un]set in an odd way.

The problem lies within f->subclass inside the else if of line 436.

the code seems to think the first digit of the DTMF lies within 
f->subclass, but that's not true; f->subclass is only filled with the 
last digit when max_digits is reached. does anyone see what's wrong here?


436 } else if (f->frametype == AST_FRAME_DTMF && timeout > 0 && 
max_digits > 0) {
[...]
445     if (max_digits > 1) {
446       rc = listen_for_dtmf(chan, timeout, max_digits - 1);
447     }
448
449     if (rc) {
450       sprintf(results, "%c%d", f->subclass, rc);
451     } else {
452       sprintf(results, "%c", f->subclass);
453     }
454
455     ast_log(LOG_NOTICE, "DTMF = %s\n", results);


-- 

Jeremy Kister
http://jeremy.kister.net./



More information about the asterisk-users mailing list