|Summary:||ASTERISK-09444: Realtime incorrect dialplan extension checking|
|Reporter:||Afshin Mashayekhi (afshin)||Labels:|
|Date Opened:||2007-05-14 22:37:50||Date Closed:||2011-06-07 14:07:20|
|Environment:||Attachments:||( 0) res_config_mysql.c.diff|
( 1) res_config_mysql.c-svn61557.diff
( 2) res_config_odbc.c.diff
( 3) res_config_odbc.c-svn61557.diff
|Description:||When making a catchall extension like '_.' with realtime asterisk it will be greedy.|
Attached is the small change to the affected files in diff format
against asterisk 1.4.4
****** STEPS TO REPRODUCE ******
In database you have..
Realtime will incorrectly grab _. first and play back 'pbx-invalid'
Instead of _XXX which would dial CONA-300 as expected
|Comments:||By: Afshin Mashayekhi (afshin) 2007-05-14 22:50:20|
Disclaimer should be in the system, was sent with Bug 8594
These patches add a simple check to return the biggest match found because it sorts on length of the extension then the extension itself.
By: Afshin Mashayekhi (afshin) 2007-05-15 02:03:07
The new diffs are against the svn.
res_config_mysql - asterisk-addon svn version 383
res_config_odbc - asterisk svn 61557
The older ones are against asterisk 1.4.4 and asterisk-addons 1.4.1
By: Afshin Mashayekhi (afshin) 2007-05-16 02:01:54
Found issue with my patch,
trying to think of another solution
By: Joshua C. Colp (jcolp) 2007-05-16 13:23:47
We will also need a disclaimer on file from you, but for now I'm switching this to feedback until you have the bugs worked out.
By: Afshin Mashayekhi (afshin) 2007-05-17 00:45:25
File can you please delete the files I uploaded.
Hopefully will have better solution within the week.
By: Denes Dolhay (denke) 2007-05-29 13:13:19
I found the problem too. If I use catchall extensions in realtime (res_config_mysql) then asterisk makes hundreds of query-s to the database server continously, and only then connects to the matched extension, if the timeout has expired. (even then if there is only one extension which would match, and there is no '.' at the end...)
By: Jason Parker (jparker) 2007-06-26 15:01:59
Note that sorting on length isn't going to automatically give you the best match either. You could have something like _800555212, and it would be longer than 8005551212
Perhaps I'm missing the point of ordering by length?
By: Afshin Mashayekhi (afshin) 2007-06-27 01:02:32
Yes I realised that after further testing
The ideal parsing of extensions i realised would require serious editing of how asterisk determines and handles _. etc.
It got out of my depth.
This can be closed
By: Tilghman Lesher (tilghman) 2007-06-27 03:13:57
Closed by request of reporter.