Time Groups - 1.6+ move from pipe to comma

Hi,

I was going to file a bug (feature request?) against 2.8 beta1.2 but 2.8 doesn’t appear in the bug system - should I use SVN HEAD?

Anyway, I found that Time Groups against outbound routes were not working (always being excluded).

Found cause was as described here: http://www.voip-info.org/tiki-index.php?page=Asterisk%20tips%20openhours where comma has replaced pipe as the delimiter in Asterisk 1.6.something (I’m using SVN).

Thanks,
Chris.

please do file a bug. You can always file it against svn head if the version is not there though I just added it.

habile,

while you are discovering bug, is timeconditions (e.g. gotoiftime()) also broken because of this?

If I’m not mistaken, it produces the time conditions with pipes also in the goto statement.

Can you check this and if broken, file a bug against that also please?

thanks.

I’ll check it and file accordingly… Now, I thought you were on vacation!!! You are too dedicated :slight_smile: but so appreciated :wink: - enjoy the rest of it…

I am, just in from happy hour, changing and heading out again.

Problem is this darn internet!

That’s why I like sailing in the Caribbean more, no internet so no chance to find out what is going on!

gotoiftime is already checking for Asterisk 1.6 and insert a ‘,’ instead of ‘|’.

You write:

Could it be that the check does not detect the correct version of Asterisk?
Could you please do a show version in Asterisk so that we can see the full version string returned?

Doh! That’ll teach me for using the SVN version:

thepbx2*CLI> core show version Asterisk SVN-trunk-r256104M built by root @ thepbx2.acme.net on a i686 running Linux on 2010-03-29 16:33:19 UTC

What does FreePBX check for, I guess I’ll change the version string to keep it happy.

Thanks Mikael

The function is in admin/functions.inc.php, engine_getinfo().
There is a check that detects the SVN-trunk-r and set the version to 1.6:

elseif (preg_match('/Asterisk SVN-trunk-r(-?(\S*))/', $verinfo, $matches)) {
                                return array('engine'=>'asterisk', 'version' => '1.6', 'additional' => $matches[1], 'raw' => $verinfo);

Could you check the dialplan for other sections that contain ‘|’ so we make sure that running SVN-trunk-r is detected properly?

Hi Mikael,

Not sure which functions off hand I should be looking for but here’s what grep ‘|’ /etc/asterisk/* finds (I’ve listed unique functions only):

extensions_additional.conf:exten => 1269,n,GotoIf($[$[ "${DB(AMPUSER/1269/followme/prering)}" = "0" ] | $[ "${DB(AMPUSER/1269/followme/prering)}" = "" ]] ?skipsimple)
extensions_additional.conf:exten => s,n,ExecIf($["${CUT(DB(AMPUSER/${ARG1}/recording),\\\|,1):4}" != "Always"]?MacroExit())
extensions_additional.conf:exten => s,n,Set(RT=${IF($[$["${VMBOX}"!="novm"] | $["${CFUEXT}"!=""]]?${RINGTIMER}:"")})
voicemail.conf:1270 => ,Paging Amy,,,attach=no|saycid=no|envelope=no|delete=no
include => outrt-7|00:00-23:59|sat-sun|*|* ; Local_Calls
include => outrt-7|19:00-07:00|mon-fri|*|* ; Local_Calls
include => outrt-17|00:00-23:59|sat-sun|*|* ; Regional_Calls
include => outrt-17|19:00-07:00|mon-fri|*|* ; Regional_Calls

The GotoIfTime seems to be defined OK:

extensions_additional.conf:exten => 1,1,GotoIfTime(07:00-21:30,*,*,*?ext-group,600,1)

Hope this is what you need :slight_smile:

Thanks,
Chris

OK, now we are narrowing it down, where are these lines coming from?

include => outrt-7|00:00-23:59|sat-sun|*|* ; Local_Calls
include => outrt-7|19:00-07:00|mon-fri|*|* ; Local_Calls
include => outrt-17|00:00-23:59|sat-sun|*|* ; Regional_Calls
include => outrt-17|19:00-07:00|mon-fri|*|* ; Regional_Calls

Do you have a third-party module installed?

These were added by 2.8beta1.2 when I assigned a Time Group to 2 outbound routes…

And sorry, these are in extensions_additional.conf in the [outbound-allroutes] context.

C.

Yup, just discovered that. I will file a ticket for that. Thank you for reporting it.

please check the fix just checked into the ticket

I would be happy to try it but I’m not using SVN for FreePBX… is that the only way I can test it?

Thanks,
C.

looks like Mike tested it and it works. You can always apply the patches to try, or pull down the affected files.

For not, as soon as core and timeconditions get published it will be available. If someone doesn’t beat me to it, I’ll probably push them out tonight if I have 5 minutes before happy hour.

(I guess I could publish it after happy hour, but given I’m getting on a plane in the morning, and the “creative” effects that happy hour can have, it may not be such a good idea to do that on production code :slight_smile:

I know what I’d do ;0)

it’s a beta anyway and as you say I can pull the files directly if I get desperate - now that I’ve found the ticket :slight_smile:

Safe flight and more importantly, happy Happy Hour…

Thanks to you BOTH for such a quick response!