Ticket #4174 (closed Bugs: fixed)

Opened 3 years ago

Last modified 3 years ago

Context as coded causes second problem with phones that use the "early dial" feature

Reported by: matt_001 Assigned to: p_lindheimer
Priority: minor Milestone: 2.8
Component: Core Version: 2.7-branch
Keywords: grandstream quick dial Cc:
Confirmation: Need testing Distro:
Backend Engine: All Distro Ver:
Backend Ver: FreePBX 2.7.0.1 SVN Revision (if applicable):

Description

A previous bug resolves an issue that stops the 'Quick Dial' feature on Grandstream phones from working (Trac bug #2295.)

A second problem now prevents the Quick Dial feature on Grandstream phones from working. No extension can dial anything.

In extensions_additional.conf the last line of the following code is the cause:

[outbound-allroutes]
include => outbound-allroutes-custom
include => outrt-001-9_outside
exten => _!,1,Macro(user-callerid,SKIPTTL,)

The last line catches all extensions when dialling from an internal extension and prevents quick-dial from working correctly. Commenting-out the line fixes the problem.

The code is generated by /var/www/html/admin/modules/core/functions.inc.php, line 1533:

                        /* outbound routes */
                        // modules should use their own table for storage (and module_get_config() to add dialplan)
                        // modules should NOT use the extension table to store anything!
                        $sql = "SELECT application FROM extensions where context = 'outbound-allroutes' ORDER BY application";
                        $outrts = sql($sql,"getAll",DB_FETCHMODE_ASSOC);
                        $ext->addInclude('from-internal-additional','outbound-allroutes');
                        $ext->add('outbound-allroutes', '_!', '', new ext_macro('user-callerid,SKIPTTL'));

Commenting out the last line leaves a clean dial plan, resolving the quick dial issue.

Change History

03/27/10 14:08:39 changed by p_lindheimer

  • priority changed from major to minor.
  • confirmation changed from Unreviewed to Pending.

commenting out the line breaks other features, will have to look at alternative solutions for this.

03/27/10 14:13:20 changed by matt_001

Dialling out with 9 is also affected. The phone doesn't get it's expected 484 - Incomplete Address response, instead getting an immediate 404 - Wrong number when 9 is pressed. Need a workaround to this - can't find any match-all extens to comment out :/

(follow-up: ↓ 6 ) 03/27/10 16:01:44 changed by p_lindheimer

  • confirmation changed from Pending to Need testing.

try this patch to core/functions.inc.php and see if it works. If possible, once confirming, try experimenting with outbound routes that include CID specific routing as well and see if those work properly as well.

Index: functions.inc.php
===================================================================
--- functions.inc.php	(revision 9402)
+++ functions.inc.php	(working copy)
@@ -1531,7 +1531,7 @@
 			$sql = "SELECT application FROM extensions where context = 'outbound-allroutes' ORDER BY application";
 			$outrts = sql($sql,"getAll",DB_FETCHMODE_ASSOC);
 			$ext->addInclude('from-internal-additional','outbound-allroutes');
-			$ext->add('outbound-allroutes', '_!', '', new ext_macro('user-callerid,SKIPTTL'));
+			$ext->add('outbound-allroutes', 'foo', '', new ext_noop('bar'));
 			foreach($outrts as $outrt) {
 				$ext->addInclude('outbound-allroutes',$outrt['application']);
 				$sql = "SELECT * FROM extensions where context = '".$outrt['application']."' ORDER BY extension, CAST(priority AS UNSIGNED) ASC";
@@ -1547,6 +1547,10 @@
             // This will not get called, but it fixes some things like custom-context or other possible custom uses of these
             // generated contexts that don't have an 'outbound-allroutes' wrapper around them, of course in those cases the
             // CID part of the dialplan will not get executed
+            $exten_parts = explode('/',$exten['extension']);
+            if (isset($exten_parts[1])) {
+              $ext->add($outrt['application'], $exten_parts[0], '', new ext_macro('user-callerid,SKIPTTL')); 
+            }
             $ext->add($outrt['application'], $exten['extension'], '', new ext_macro('user-callerid,SKIPTTL')); 
             $pri_noop = false;
           }

03/27/10 17:01:53 changed by p_lindheimer

(In [9409]) changes to try rearrange dialplan format to address probs with early dial phone features re #4174

03/27/10 17:34:32 changed by p_lindheimer

(In [9415]) addresses early dial issues re #4174 needs testing confirmation before closing and publishing

(in reply to: ↑ 3 ) 03/28/10 07:48:04 changed by matt_001

Replying to p_lindheimer:

The provided patch works, allowing internal extensions and 9 to be dialled successfully with quick dial. Thank you!!! This patch will allowed us to go live with a switch to FreePBX on the third attempt - if we can resolve the one outstanding issue we have with getting music-on-hold to work.

FYI here is the closed outbound dialplan we use (UK ISDN30E):

9|999
9|001XXXXXXXXXX
9|0031XXXXXXXXX
9|0044XXXXXXXXXX
9|0080XXXXXXXX
9|0091XXXXXXXXXX
9|01XXXXXXXXX
9|02XXXXXXXXX
9|03XXXXXXXXX
9|07XXXXXXXXX
9|08009XXXXXX
9|0800[0-3]XXXXXX
9|0800[4-8]XXXXXX
9|0808XXXXXXX
9|08[1-9]XXXXXXXX
9|118XXX
9|1XX
9|[2-8]XXXXX

I am willing to test CID specific routing but we are unfamiliar with how CID specific routing works.

03/28/10 10:44:51 changed by p_lindheimer

an example of CID specific routing, say you have extension 200 and you want it to use a different trunk when calling certain numbers (or maybe all numbers). You would put for example:

9|07XXXXXXXXX/200

that route would go prior to the above listed route. Then when extension 200 makes a call, it would use the trunks identified in this route.

Even if you don't have other trunks, if you could add this and then paste here the generated outbound route dialplan context (it will be something like 001-ourt-routename) that would help. I can look at the dialplan to see if it is being generated properly as I have already tested that scenario on 2.8 but the fix on 2.8 is different then 2.7 because all outbound route schema has changed, though the resulting dialplan should be the same which is what I would like to see.

Thanks.

04/07/10 13:05:38 changed by p_lindheimer

  • status changed from new to closed.
  • resolution set to fixed.

04/11/10 16:54:26 changed by p_lindheimer

(In [9485]) closes #4202 only create one extra macro-user-callerid exten, re #4174