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. for example consider: 999,1,Swift(some long message that you dont want to wait for|5000|5) 999,n,NoOp(DTMF: ${SWIFT_DTMF}) if while I am listening to the playback, i interrupt and dial: - "12345", SWIFT_DTMF is set to "52345" - "12346", SWIFT_DTMF is set to "62346" - "1478" , SWIFT_DTMF is set to "478" - "123" , SWIFT_DTMF is set to "23" - "12" , SWIFT_DTMF is set to "2" - "1" , SWIFT_DTMF is set to "" also consider: 998,1,Swift(some long message that you dont want to wait for|5000|1) 998,n,NoOp(DTMF: ${SWIFT_DTMF}) - "1", SWIFT_DTMF is set to "1-1210679308" - "2", SWIFT_DTMF is set to "2-1210679308" im not sure if it's relevant, but epoch(1210679308) in ET is may/2008. in each case, if i wait for the playback to complete before dialing the DTMF, all works as i'd expect. Do you see a reason that this'd happen ? I wrote to the author of app_swift, but got no reply. Since the code is relatively short, can someone take a peek ? app_swift is [temporarily] available at: http://jeremy.kister.net/code/app_swift-1.6.2.tar.gz http://jeremy.kister.net/code/app_swift-1.6.2.patch -- Jeremy Kister http://jeremy.kister.net./
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./
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.I fixed it up by ignoring the f->subclass and starting the dtmf_listener right away. the fix is in my app_swift patch. http://jeremy.kister.net/code/app_swift-1.6.2.patch -- Jeremy Kister http://jeremy.kister.net./