Dialplan : Syntax & Length

Hi,

I am using the version 1.8-15
I have to write a line like :

Exten => _22[a,b,c,d,e,…]X.,1,Dial (…)
numbers between brackets are more than 60. Apparently, this is disturbing it.
I’ve got the message : Wrong usage of [] in the extension

  • Any idea if there is limit of character per ligne ?
  • If son what is the trick to get everyhting ?

Thanks

[ ] are like standard Unix regular expressions; they are character classes, not lists of sub-strings. As such, there can be no more than one “,” as comma is not a meta character.

how can I do ?
How can I define about about 70 extensions with the same dialplan declaration? / same provider ?
example :
exten ‘441x’ and ‘442x’ and ‘4470’, etc…etc… (70 numbers) to use with the same provider ?? dial (sip/xxx@tt) ?

thanks

It is probably best to use a subroutine to avoid too much duplication.

It is not clear which 70 you are wanting to cover, but for the eleven that you have given, you can use:

_44[12]X,1,first action
_4470,s,first action
_44[12]X,n,second action
_4470,s, second action.

Other approaches are are to provide a wild match for everything, then more specific matches for the ones you don’t want to process.

You could also try full regular expressions, in the parameters, but I’m not sure if Asterisk supports egrep type expressions.