[Home]

Summary:ASTERISK-03368: Problem with vpb channel driver extension handling
Reporter:Paul Dugas (pdugas)Labels:
Date Opened:2005-01-27 14:55:46.000-0600Date Closed:2005-02-13 19:03:56.000-0600
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) patch.gz
Description:Dialed digits from stations on Voicetronix card doesn't wait for a timeout if the dialplan indicates the entered extnsion matched one entry but could also match a longer one.

My dialplan allows 7-digit dialing as well as 10-digit dialing and worked with the zaptel channels.  Enter the first 7 digits and a # or a long enough pause and the call was placed.  Enter the same 7 then continue dialing to 10 digits also worked.

With the Voicetronix channel driver, the first minimal match is chosen and dialed.

****** ADDITIONAL INFORMATION ******

chan_zap appears to go something like so:

 while ( ... ) {
    exten += nextDigit();
    if ( ast_exists_exension( exten ) ) {
      if ( timedout || !ast_matchmore_extension( exten ) {
         do it...
      }
    }
    else ...
 }

chan_vpb instead goes something like so:

 while ( ... ) {
    exten += nextDigit();
    if ( ast_exists_exension( exten ) ) {
      do it...
    }
    else if ( !ast_matchmore_extension( exten ) ) {
      no extension found.
    }
 }

As soon as at least one match is possible, that action is taken.  Could the chan_vpb implementation mimic or even reuse the logic in chan_zap?
Comments:By: nick (nick) 2005-01-27 20:54:25.000-0600

Do you have a disclaimer?

By: Paul Dugas (pdugas) 2005-01-27 20:55:18.000-0600

After applying the attached patch.gz, I find that this channel driver doesn't apparently generated "timeout" events so even with the additions to not select the first matching extention for a given input, it also now stalls at that point.

As an aside, I find it odd that this functionality has to be repeated in each channel.  Wouldn't it be possible to "promote" this generic behavior (as well as the distinctive ring, vertical service codes, etc from chan_zap) into a generic "analog station" channel with sub-channel drivers for zap, vpb, and others like them.

By: Paul Dugas (pdugas) 2005-01-27 20:56:19.000-0600

No disclaimer yet.  Will work on that now.

By: VoiceTronix (benkramer) 2005-01-31 17:56:38.000-0600

I have implemented a similar fix and also added the time out. Should be available from CVS very shortly.

By: Paul Dugas (pdugas) 2005-01-31 21:16:06.000-0600

Am testing Ben's updates.  Looks good so far.  Will report back if I run into any further issues.

Thank you Ben!

By: Olle Johansson (oej) 2005-02-13 13:21:04.000-0600

Fixed in cvs. Reopen if not.