[asterisk-users] pattern matching "+"

Administrator TOOTAI admin at tootai.net
Fri Mar 15 10:08:42 CDT 2019


Le 15/03/2019 à 15:18, sean darcy a écrit :
>  From my provider I get extensions of:
> 
> +1<10digit number>
> 1<10 digit number>
> <10 digit number>
> 
> seemingly randomly.
> 
> What I'd like to do is
> 
> exten=_!1234567890,1,Answer()
> 
> which would match anything ending in 1234567890.
> 
> But that doesn't work since ! can only be used at the end of a pattern.
> 
> I tried
> 
> [+\ ][1\ ]1234567890
> 
> which didn't work, probably because "\ " means  space, not nothing.
> 
> Any suggestions?

exten = _+.,1,Goto(${EXTEN:-10})
exten = _X.,1,Goto(${EXTEN:-10})
...

Daniel



More information about the asterisk-users mailing list