[Home]

Summary:ASTERISK-11768: [patch] Permit dialplan to control if more digits should be entered
Reporter:Tilghman Lesher (tilghman)Labels:
Date Opened:2008-04-02 01:32:06Date Closed:2011-05-19 14:38:03
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/NewFeature
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20080402__pbx_incomplete__2.diff.txt
( 1) 20080402__pbx_incomplete__3.diff.txt
( 2) 20080402__pbx_incomplete.diff.txt
( 3) pbx_incomplete_with_timeout.diff
Description:Inspired by a post on the mailing list, this new application, Incomplete, permits a user to specify that an extension is incomplete and that the PBX should wait for more digits to add to the current extension.

exten => _8111!,1,Incomplete
exten => 8111222333,1,SayUnixtime

will wait until either "8111222333" is fully dialled (even if 8111 is sent from a SIP INVITE) or until the digits entered can no longer match that extension.
Comments:By: Tilghman Lesher (tilghman) 2008-04-02 01:35:31

This is already pretty well tested; let me know if you come up with any edge cases that need to be handled.

By: Timo Teräs (fabled) 2008-04-02 02:05:10

I think you should have flag for whether or not to answer. E.g. bri zaptel can receive the additional digits via overlapped signaling even when the channel is still in non-answered state. Actually, answering would make the PBX think that the number was complete already and it would generate invalid CDRs.

By: Tilghman Lesher (tilghman) 2008-04-02 08:41:42

Okay, new patch uploaded, implementing the 'n' option flag.

By: Steve Murphy (murf) 2008-04-02 11:01:43

**murf wipes sweat from brow*** hopes that this works OK with new pattern matching algorithm. It should...! File a bug if it doesn't, I guess.

By: Timo Teräs (fabled) 2008-04-02 11:35:36

Basic functionality work as expected.

I have two corner cases though:

1. If Incomplete timeouts (and no additional digits was received), it restarts itself (that is, it re-enters the same _8111! it originally matched). Better would be to detect timeout and go to 't' (or to next priority).

2. It properly detects if the additional digits make the extension invalid. But when that happens, it apparently just hangups(?). How about going to 'i'?

By: Tilghman Lesher (tilghman) 2008-04-02 12:34:10

I'll look at 2.  For 1, you can implement that yourself, by using a counter within that Incomplete extension.

By: Timo Teräs (fabled) 2008-04-03 07:54:15

The invalid part didn't work. Later on in the code, it would go to else block with comment "keypress received, get more digits for a full extension". Since digit would be zero, it would do whatever autofallthrough says. I updated that to work and also added timeout functionality.

By: Digium Subversion (svnbot) 2008-04-28 11:32:24

Repository: asterisk
Revision: 114773

U   trunk/apps/app_dial.c
U   trunk/include/asterisk/pbx.h
U   trunk/main/pbx.c

------------------------------------------------------------------------
r114773 | tilghman | 2008-04-28 11:32:23 -0500 (Mon, 28 Apr 2008) | 8 lines

Add incomplete matching to PBX code and app_dial
(closes issue ASTERISK-11768)
Reported by: Corydon76
Patches:
      20080402__pbx_incomplete__3.diff.txt uploaded by Corydon76 (license 14)
      pbx_incomplete_with_timeout.diff uploaded by fabled (license 448)
Tested by: Corydon76, fabled

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=114773

By: Digium Subversion (svnbot) 2008-04-28 11:34:07

Repository: asterisk
Revision: 114774

_U  branches/1.6.0/

------------------------------------------------------------------------
r114774 | tilghman | 2008-04-28 11:34:06 -0500 (Mon, 28 Apr 2008) | 15 lines

Blocked revisions 114773 via svnmerge

........
r114773 | tilghman | 2008-04-28 11:37:45 -0500 (Mon, 28 Apr 2008) | 8 lines

Add incomplete matching to PBX code and app_dial
(closes issue ASTERISK-11768)
Reported by: Corydon76
Patches:
      20080402__pbx_incomplete__3.diff.txt uploaded by Corydon76 (license 14)
      pbx_incomplete_with_timeout.diff uploaded by fabled (license 448)
Tested by: Corydon76, fabled

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=114774