[asterisk-users] How do *you* test your changes to dialplans ruled by GotoIfTime?

Ernie Dunbar maillist at lightspeed.ca
Thu Dec 27 13:46:25 CST 2012


This past holiday weekend has resulted in some real groaners when it 
comes to bugs in our dialplan, making obvious the need for some changes 
in our procedures.

First, our hours of operation for Christmas Eve, Christmas, Boxing Day 
and New Year's Eve had changed with little to no notice. Okay, fine, 
whatever, I fix.

Our Christmas Eve hours (made worse by being Monday this year) dialplan 
was broken by me misspelling the correct dialplan to go to. Then our 
Boxing Day dialplan was broken when I copied and pasted the correct 
dialplan from one similar extension number to the other, like this:

; Christmas
; exten => 
YYYY821192,n,GotoIfTime(9:30-14:00,*,25,dec?ivr-lightspeed-tech-early,s,1)
exten => 
YYYY821192,n,GotoIfTime(8:00-17:00,*,24,dec?ivr-lightspeed-day,s,1)
exten => 
YYYY821192,n,GotoIfTime(*,*,25,dec?ivr-lightspeed-after-hours,s,1)
exten => 
YYYY821190,n,GotoIfTime(9:00-18:00,*,26,dec?ivr-lightspeed-day,s,1)


then failed to notice the problem until it was too late. Of course, 
that only applied on Boxing day and couldn't be noticed earlier, either.

I suppose the first problem where I misspelt the dialplan can be solved 
by testing the dialplan in another extension and modifying the time to 
"now + 2 minutes". But how can I avoid stupid errors in the extension 
number, when testing by definition requires that I change the extension 
number to and fro?

This appears to  boil down to "always remember to test it at the time 
that it becomes relevant". But if I was the kind of person who always 
remembered to do things at the right time, then there would never be a 
need for computers to do jobs like this in the first place.




More information about the asterisk-users mailing list