Does anyone have a program that could be used to compress the dialplan? I have lots of numbers in a list, for example if the file contains 12300 12310 123113 12320 12330 12340 12350 12360 12370 12380 12390 they all could have been written as two entries (123X0 and 123113) instead. Can anyone give me a hint please? Regards, Tobias J?nsson, Lund SE
Hi Tobias! Have you looked at http://voip-info.org/wiki-Asterisk+Dialplan+Patterns, The extensions _123X0 would handle all the extensions below except for the six digit extension. Regards, Maron Kristofersson, Staffanstorp SE Tobias J?nsson wrote:> Does anyone have a program that could be used to compress the dialplan? > I have lots of numbers in a list, for example if the file contains > > 12300 > 12310 > 123113 > 12320 > 12330 > 12340 > 12350 > 12360 > 12370 > 12380 > 12390 > > they all could have been written as two entries (123X0 and 123113) instead. > > Can anyone give me a hint please? > > Regards, > Tobias J?nsson, Lund SE > > > ------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
On Wed, 25 Aug 2004, Maron Krist?fersson wrote:> Tobias J?nsson wrote:>> Does anyone have a program that could be used to compress the dialplan? >> I have lots of numbers in a list, for example if the file contains >> >> 12300 >> 12310 >> 123113 >> 12320 >> 12330 >> 12340 >> 12350 >> 12360 >> 12370 >> 12380 >> 12390 >> >> they all could have been written as two entries (123X0 and 123113) >> instead. > > Have you looked at http://voip-info.org/wiki-Asterisk+Dialplan+Patterns, > > The extensions _123X0 would handle all the extensions below except for > the six digit extension.Yes exactly, that is why I ask for a program (or script or anything) that could do this transcription. My extensions.conf is about 60000 lines so I cannot do it manually. Regards, Tobias J?nsson, Lund SE
Hmm, that raises a lot of questions for the script... How many contexts do you have? Do they include each other. Is there any kind of rule around the extensions... etc. Personally I would think that unless you have a very simple 60000 line extensions.conf (hardly likely, unless created by strict rules or a script), then approaching the task in chunks would be both faster and probably less error phrone. I have done a similar thing at one location, but that was a 500 line extensions.conf. Regards, Maron Krist?fersson, Staffanstorp, Sweden Tobias J?nsson wrote:> On Wed, 25 Aug 2004, Maron Krist?fersson wrote: > >> Tobias J?nsson wrote: > > >>> Does anyone have a program that could be used to compress the >>> dialplan? I have lots of numbers in a list, for example if the file >>> contains >>> >>> 12300 >>> 12310 >>> 123113 >>> 12320 >>> 12330 >>> 12340 >>> 12350 >>> 12360 >>> 12370 >>> 12380 >>> 12390 >>> >>> they all could have been written as two entries (123X0 and 123113) >>> instead. >> >> >> Have you looked at http://voip-info.org/wiki-Asterisk+Dialplan+Patterns, >> >> The extensions _123X0 would handle all the extensions below except for >> the six digit extension. > > > Yes exactly, that is why I ask for a program (or script or anything) > that could do this transcription. My extensions.conf is about 60000 > lines so I cannot do it manually. > > Regards, > Tobias J?nsson, Lund SE > > > ------------------------------------------------------------------------ > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users