Ticket #4024 (closed Bugs: fixed)

Opened 7 months ago

Last modified 6 months ago

Use of "|" in 1.6 gotoiftime command in extensions_additional.conf

Reported by: Nick_Lewis Assigned to: p_lindheimer
Priority: minor Milestone:
Component: Time Conditions Version: SVN-HEAD
Keywords: Cc:
Confirmation: Unreviewed SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

The timeconditions/groups module appears to use the "|" (pipe) symbol to delineate time,day,date,month etc in the gotoiftime() command in extensions_additional.conf

This delimiter is not valid for asterisk 1.6

Change History

02/02/10 08:55:27 changed by mbrevda

  • owner set to p_lindheimer.

02/02/10 10:55:17 changed by mickecarlsson

Nick,

Could you try this patch:

Index: extensions.class.php
===================================================================
--- extensions.class.php        (revision 8762)
+++ extensions.class.php        (working copy)
@@ -501,8 +501,15 @@
        var $true_priority;
        var $condition;
        function ext_gotoiftime($condition, $true_priority) {
-               $this->true_priority = $true_priority;
-               $this->condition = $condition;
+       global $version;
+       if (version_compare($version, "1.6", "ge")) {
+           // change from '|' to ','
+           $this->condition = str_replace("|", ",", $condition);
+               }
+           else {
+               $this->condition = $condition;
+               }
+       $this->true_priority = $true_priority;
        }
        function output() {
                return 'GotoIfTime(' .$this->condition. '?' .$this->true_priority. ')' ;

02/02/10 12:35:45 changed by p_lindheimer

mickecarlsson,

if that patch works on your system and generates the proper syntax, I would say just check it in. If you don't have a 1.6 system, just modify the code to fake it out and force it so you can check the dialplan generated. We should get that in before the next framework update.

02/02/10 14:34:59 changed by mickecarlsson

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

(In [8772]) Close #4024 add check for Asterisk 1.6 in GotoIfTime? extensions class

02/27/10 22:32:53 changed by p_lindheimer

(In [9043]) Merged revisions 8714-9042 via svnmerge from http://svn.freepbx.org/freepbx/branches/2.7

................

r8714 | p_lindheimer | 2010-01-30 08:02:33 -0800 (Sat, 30 Jan 2010) | 1 line

branch trunk to 2.7

................

r8731 | p_lindheimer | 2010-01-30 09:18:30 -0800 (Sat, 30 Jan 2010) | 1 line

Creating release 2.7.0beta1

................

r8750 | mickecarlsson | 2010-02-01 13:25:40 -0800 (Mon, 01 Feb 2010) | 1 line

Closes #2839 #3980 #3992 added setting in amportal.conf for using Google DNS for enumlookup.ago

................

r8751 | mickecarlsson | 2010-02-01 13:29:00 -0800 (Mon, 01 Feb 2010) | 1 line

Dont use language specific page in the url

................

r8763 | mickecarlsson | 2010-02-02 11:02:41 -0800 (Tue, 02 Feb 2010) | 1 line

Updated amp.pot for 2.7

................

r8764 | mickecarlsson | 2010-02-02 11:25:42 -0800 (Tue, 02 Feb 2010) | 1 line

Spelling error fix

................

r8766 | mickecarlsson | 2010-02-02 11:46:04 -0800 (Tue, 02 Feb 2010) | 1 line

Spelling error fixes for 2.7 branch

................

r8772 | mickecarlsson | 2010-02-02 14:34:58 -0800 (Tue, 02 Feb 2010) | 1 line

Close #4024 add check for Asterisk 1.6 in GotoIfTime? extensions class

................

r8829 | p_lindheimer | 2010-02-16 08:09:12 -0800 (Tue, 16 Feb 2010) | 9 lines

Merged revisions 8828 via svnmerge from http://svn.freepbx.org/freepbx/branches/2.6

........

r8828 | p_lindheimer | 2010-02-16 08:06:59 -0800 (Tue, 16 Feb 2010) | 1 line

sytax error == should be assignment =

........

................

r8843 | p_lindheimer | 2010-02-17 09:17:43 -0800 (Wed, 17 Feb 2010) | 1 line

change mohmp3 to moh, put moh as default in template, use mohmp3 as fallback default when not specified for compatibility re #4051

................

r8846 | p_lindheimer | 2010-02-17 12:15:05 -0800 (Wed, 17 Feb 2010) | 1 line

closes #4052 add option to force reinstall or downgrade modules

................

r8847 | p_lindheimer | 2010-02-17 12:23:23 -0800 (Wed, 17 Feb 2010) | 1 line

bump the base version to RC1 in prep for RC1 tarball

................

r8848 | p_lindheimer | 2010-02-17 12:27:26 -0800 (Wed, 17 Feb 2010) | 1 line

update CHANGES for RC release

................

r8849 | p_lindheimer | 2010-02-17 12:36:58 -0800 (Wed, 17 Feb 2010) | 1 line

closes #3575 check for ASTMANAGERHOST and ASTMANAGERPORT

................

r8860 | p_lindheimer | 2010-02-17 16:50:54 -0800 (Wed, 17 Feb 2010) | 1 line

Creating release 2.7.0RC1

................

r8861 | p_lindheimer | 2010-02-17 16:53:25 -0800 (Wed, 17 Feb 2010) | 1 line

Modify build tools to deal with change from mohmp3 to moh

................

r8862 | p_lindheimer | 2010-02-17 16:53:45 -0800 (Wed, 17 Feb 2010) | 1 line

Creating release 2.7.0RC1

................

r8873 | p_lindheimer | 2010-02-17 17:10:45 -0800 (Wed, 17 Feb 2010) | 1 line

remove the wihtmodules generation part of script, we don't use that anymore

................

r8880 | mickecarlsson | 2010-02-18 13:54:51 -0800 (Thu, 18 Feb 2010) | 1 line

Finally, an automated tool to generate all .pot files for localization, ugly but working. Requires some setup yet to be documented, should have merge from trunk but I did not manage that so here is another ci

................

r8881 | p_lindheimer | 2010-02-18 16:45:33 -0800 (Thu, 18 Feb 2010) | 1 line

fixes #4057 don't iterate through global array when calling hooks or hooks that do the same will end the loop prematurely

................

r8907 | p_lindheimer | 2010-02-22 16:59:53 -0800 (Mon, 22 Feb 2010) | 1 line

adds un-published option, USEDIALONE, to use the experimental macro-dial-one in place of macro-dial + dialparties.agi when dialing single extensions. The macro has been very little tested and is otherwise not used at all if this is not set. However, this will enable for those who want to start to test the macro and help flush out its operation for a 2.8 target re #4068

................

r8923 | mickecarlsson | 2010-02-24 12:38:40 -0800 (Wed, 24 Feb 2010) | 1 line

Commented out format_au.so as it is removed from Asterisk 1.4 and later.

................

r8950 | mickecarlsson | 2010-02-27 06:40:10 -0800 (Sat, 27 Feb 2010) | 1 line

Updated amp.pot, updated swedish language

................

r8952 | mickecarlsson | 2010-02-27 07:45:55 -0800 (Sat, 27 Feb 2010) | 1 line

Removed obsolete language tool

................

r8971 | p_lindheimer | 2010-02-27 21:48:35 -0800 (Sat, 27 Feb 2010) | 1 line

2.7.0 upgrade directory for release

................

r8972 | p_lindheimer | 2010-02-27 21:52:36 -0800 (Sat, 27 Feb 2010) | 1 line

update CHANGES

................

r9029 | p_lindheimer | 2010-02-27 22:17:38 -0800 (Sat, 27 Feb 2010) | 1 line

Creating release 2.7.0

................