[Home]

Summary:ASTERISK-00817: [patch] Time based includes are no longer working
Reporter:jrollyson (jrollyson)Labels:
Date Opened:2004-01-12 19:47:57.000-0600Date Closed:2004-09-25 02:55:01
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) 20040113__pbx_fix.diff.txt
Description:For some reason, my time based includes are not working anymore. I'm running CVS as of early this morning.

Here are the include's I'm trying to use.

include => night|00:01-07:29|mon-sat
include => night|21:01-00:00|sun
include => night|00:01-10:00|sun
include => day|09:00-17:00|mon-fri
include => day|09:00-13:00|sat
include => earlylate|07:30-08:59|mon-sat
include => earlylate|17:01-00:00|mon-fri
include => earlylate|13:01-00:00|sat
include => earlylate|10:01-21:00|sun

I added an invalid match to prevent customers from falling through to a hangup.
  -- Executing Dial("SIP/226-f6f7", "Zap/g1/2402335") in new stack
   -- Called g1/2402335
   -- Zap/1-1 is ringing
Jan 12 20:31:31 NOTICE[2175000]: chan_zap.c:3587 zt_read: Fax detected, but no fax extension
 == Manager 'admin' logged off from 127.0.0.1
   -- Starting simple switch on 'Zap/25-1'
   -- Executing Answer("Zap/25-1", "") in new stack
   -- Executing Goto("Zap/25-1", "internet-timeroute|s|1") in new stack
   -- Goto (internet-timeroute,s,1)
   -- Sent into invalid extension 's' in context 'internet-timeroute' on Zap/25-1
   -- Executing Goto("Zap/25-1", "earlylate|s|1") in new stack
   -- Goto (earlylate,s,1)

The invalid match happens even though the includes should have sent it into a context with a valid s extension.
Comments:By: Brian West (bkw918) 2004-01-12 20:18:41.000-0600

include => night|00:00-23:59|sun|*|* ; closed sundays
include => night|00:00-23:59|sat|*|* ; closed saturdays
include => night|00:00-09:59|mon-fri|*|* ; closed
include => night|19:01-23:59|mon-fri|*|* ; closed
include => day|10:00-19:00|mon-fri|*|* ; OPEN w00t!

By: jrollyson (jrollyson) 2004-01-12 20:35:32.000-0600

is the last "|*|*" required?

By: Brian West (bkw918) 2004-01-12 20:43:38.000-0600

works fine here with 10 min ago CVS.  Maybe it is.. I have always done it?

By: jrollyson (jrollyson) 2004-01-12 20:49:18.000-0600

Apparently so. Ok. not a bug, thanks bkw.

By: jrollyson (jrollyson) 2004-01-13 01:02:39.000-0600

apparently not working...

By: jrollyson (jrollyson) 2004-01-13 06:32:01.000-0600

On line 2925 of pbx.c, changing #if 0 to #if 1 fixes this

By: jrollyson (jrollyson) 2004-01-13 06:34:55.000-0600

Attaching Tilghman's patch as it fixes this.

By: zoa (zoa) 2004-01-13 07:11:32.000-0600

as its only a 1 byte patch, do we need a disclaimer ?
(or does tilghman own a patent on the number 1 ? :)

By: Brian West (bkw918) 2004-01-14 00:43:13.000-0600

Fixed in CVS