[Home]

Summary:ASTERISK-15902: [patch] Make transfer calls more pattern friendly
Reporter:dmartin (dmartin)Labels:
Date Opened:2010-04-01 14:15:45Date Closed:2011-06-07 14:05:10
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Applications/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) remove-ast_matchmore_extension-from-ast_app_dtget.diff
Description:Let these two patterns in a context:

_2XX => {
// do something
};

_X. => {
//do something else
};

If in a call between users in this context, we want to transfer the call to a number like, eg, 210, then it match _X. pattern instead of _2XX. and effectively tries to call extension '2'.

Tracing the code I found this may be because ast_app_dtget() looks for a match on the dialplan in every key stroke.

This patch avoid this and only tries to transfer the call when a timeout is reached (transferdigittimeout) or when the transferer party dials #.
Comments:By: Paul Belanger (pabelanger) 2010-04-05 14:04:37

Your patch is going to break other asterisk systems that rely on this functionality.  Your best solution would be to create more specific dialplans, rather then change the asterisk source code.

By: dmartin (dmartin) 2010-04-05 14:40:13

I'm sorry, it worked for me, so I submitted the patch. And sorry about the example, I'm seeing that I was mistaken. It won't change anything, but I will try to explain a better example.

Let the context with the patterns above, ( _2XX and _X. )

trying to transfer the call to number '91777' will stop accepting digits on '9' and will match _X. so it won't never reach '91777' but '9', being that dialplan absolutely compliant (I have it in fact on my dialplan to send all the calls to unmatched numbers to a trunk).

I'm with you on this patch would change Asterisk behaviour, but didn't find anything that can be broken  at the time of writing.

Feel free to discard the patch and close the bug, but I'm still thinking that this is a (minor) Asterisk issue, not my dialplan's.

By: Paul Belanger (pabelanger) 2010-04-05 15:02:03

Closing issue per reporters request.