[asterisk-users] How do *you* test your changes to dialplans ruled by GotoIfTime?
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 = 821192,n,GotoIfTime(9:30-14:00,*,25,dec?ivr-lightspeed-tech-early,s,1) exten = 821192,n,GotoIfTime(8:00-17:00,*,24,dec?ivr-lightspeed-day,s,1) exten = 821192,n,GotoIfTime(*,*,25,dec?ivr-lightspeed-after-hours,s,1) exten = 821190,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. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How do *you* test your changes to dialplans ruled by GotoIfTime?
Ernie Dunbar wrote: 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. I no longer use GotoIfTime for these events. I do database lookups based on date. At the beginning of each year, our HR department releases the holiday schedule and I enter them into the database. All inbound calls query the database to see if there is a match and jump to the appropriate sub-routine. Doug -- Ben Franklin quote: Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How do *you* test your changes to dialplans ruled by GotoIfTime?
The simplest way to address this kind of change is to test it a week (month) or so in advance on your test machine (we have VM's set up to mock our live machines). A protection against last minute changes is to have this kind of thing controlled by variables so you can possibly even avoid dialplan changes by controlling the variables with an AGI script. In your case, the dialplan could have been written like this: ; Christmas Exten = s,1,Set(christday=25) Exten = s,n,Set(eveday=24) Exten = s,n,Set(boxday=26) Exten = s,n,Set(christmon=Dec) Exten = s,n,set(christopen=9:30) ... ; exten = 821192,n,GotoIfTime(${christopen}-${christclose},*,${christday},${christ mon}?ivr-lightspeed-tech-early,s,1) exten = 821192,n,GotoIfTime(${eveopen}-${eveclose},*,${eveday},${christmon}?ivr- lightspeed-day,s,1) exten = 821192,n,GotoIfTime(*,*,${christday},${christmon}?ivr-lightspeed-after-h ours,s,1) exten = 821190,n,GotoIfTime(${boxopen}-${boxclose},*,${boxday},${christmon}?ivr- lightspeed-day,s,1) -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Ernie Dunbar Sent: Thursday, December 27, 2012 1:46 PM To: asterisk-users@lists.digium.com Subject: [asterisk-users] How do *you* test your changes to dialplans ruled by GotoIfTime? 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 = 821192,n,GotoIfTime(9:30-14:00,*,25,dec?ivr-lightspeed-tech-early,s,1) exten = 821192,n,GotoIfTime(8:00-17:00,*,24,dec?ivr-lightspeed-day,s,1) exten = 821192,n,GotoIfTime(*,*,25,dec?ivr-lightspeed-after-hours,s,1) exten = 821190,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. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How do *you* test your changes to dialplans ruled by GotoIfTime?
I'm a fan of your method. I haven't had good luck with GotoIfTime in the past. A lot of my dialplan is actually handled by an AGI script. I've always found that to be the easiest. On Thu, Dec 27, 2012 at 2:00 PM, Doug Lytle supp...@drdos.info wrote: Ernie Dunbar wrote: 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. I no longer use GotoIfTime for these events. I do database lookups based on date. At the beginning of each year, our HR department releases the holiday schedule and I enter them into the database. All inbound calls query the database to see if there is a match and jump to the appropriate sub-routine. Doug -- Ben Franklin quote: Those who would give up Essential Liberty to purchase a little Temporary Safety, deserve neither Liberty nor Safety. -- __**__**_ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/**mailman/listinfo/asterisk-**usershttp://lists.digium.com/mailman/listinfo/asterisk-users -- Best regards, Logan Logan Bibby, CEO Ke*o*bi Communications Tuscaloosa, Alabama -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How do *you* test your changes to dialplans ruled by GotoIfTime?
We bypass this problem by storing business hours and holidays in a database table. We use an ODBC call to return whether or not to play the day or night greeting based on the database. We also store the name of a custom greeting file to play. The database is fairly easy to manipulate with test data. Mitch On 12/27/2012 01:46 PM, Ernie Dunbar wrote: 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 = 821192,n,GotoIfTime(9:30-14:00,*,25,dec?ivr-lightspeed-tech-early,s,1) exten = 821192,n,GotoIfTime(8:00-17:00,*,24,dec?ivr-lightspeed-day,s,1) exten = 821192,n,GotoIfTime(*,*,25,dec?ivr-lightspeed-after-hours,s,1) exten = 821190,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. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How do *you* test your changes to dialplans ruled by GotoIfTime?
I would say that the database method has the advantage over GotoIfTime in that it should stay the same between releases. More headache on the front end, but easier once it is up and running. -Original Message- From: asterisk-users-boun...@lists.digium.com [mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Mitch Claborn Sent: Thursday, December 27, 2012 2:06 PM To: asterisk-users@lists.digium.com Subject: Re: [asterisk-users] How do *you* test your changes to dialplans ruled by GotoIfTime? We bypass this problem by storing business hours and holidays in a database table. We use an ODBC call to return whether or not to play the day or night greeting based on the database. We also store the name of a custom greeting file to play. The database is fairly easy to manipulate with test data. Mitch On 12/27/2012 01:46 PM, Ernie Dunbar wrote: 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 = 821192,n,GotoIfTime(9:30-14:00,*,25,dec?ivr-lightspeed-tech-early, s,1) exten = 821192,n,GotoIfTime(8:00-17:00,*,24,dec?ivr-lightspeed-day,s,1) exten = 821192,n,GotoIfTime(*,*,25,dec?ivr-lightspeed-after-hours,s,1) exten = 821190,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. -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How do *you* test your changes to dialplans ruled by GotoIfTime?
On Thu, Dec 27, 2012 at 12:46 PM, Ernie Dunbar maill...@lightspeed.cawrote: 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. Boxing day??? Seriously? There's a holiday for people who beat each other up? TIL. But anyway the best way to test time-based rules is on a VM that has a copy of your configs, and just change the time. You can easily run a small VM to accomodate a copy of your main server on almost any computer. -- Carlos Alvarez TelEvolve 602-889-3003 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How do *you* test your changes to dialplans ruled by GotoIfTime?
On 27/12/2012 3:14 PM, Carlos Alvarez wrote: On Thu, Dec 27, 2012 at 12:46 PM, Ernie Dunbar maill...@lightspeed.ca mailto:maill...@lightspeed.ca wrote: 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. Boxing day??? Seriously? There's a holiday for people who beat each other up? TIL. That is the day you box up all the crap you got and exchange it for what you really wanted. It is a religious holiday in the old British Commonwealth (probably Scottish in origin). Ron But anyway the best way to test time-based rules is on a VM that has a copy of your configs, and just change the time. You can easily run a small VM to accomodate a copy of your main server on almost any computer. -- Carlos Alvarez TelEvolve 602-889-3003 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Ron Wheeler President Artifact Software Inc email: rwhee...@artifact-software.com skype: ronaldmwheeler phone: 866-970-2435, ext 102 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] How do *you* test your changes to dialplans ruled by GotoIfTime?
On 12/27/2012 07:36 PM, Ron Wheeler wrote: On 27/12/2012 3:14 PM, Carlos Alvarez wrote: On Thu, Dec 27, 2012 at 12:46 PM, Ernie Dunbar maill...@lightspeed.ca mailto:maill...@lightspeed.ca wrote: 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. Boxing day??? Seriously? There's a holiday for people who beat each other up? TIL. That is the day you box up all the crap you got and exchange it for what you really wanted. It is a religious holiday in the old British Commonwealth (probably Scottish in origin). Ron But anyway the best way to test time-based rules is on a VM that has a copy of your configs, and just change the time. You can easily run a small VM to accomodate a copy of your main server on almost any computer. -- Carlos Alvarez TelEvolve 602-889-3003 What about using TESTTIME core show function TESTTIME -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users