Custom Dailplan

Hi Guys,

I’m getting a dial planning error on asterisk, how can we do something about it.

For example;

exten => _.,1,NoOp(xxxx)
exten => _.,n,NoOp(xxx}
exten => _.,n,NoOp(xxxx)
exten => _1.,n,Goto(Settings1)
exten => _2.,n,Goto(Settings2)

Let’s assume that call starts with 2, since Settings1 is incompatible, it doesn’t go to the next stage, so if the rule is incompatible, how can we get through the next one?

Use “s” or “n-1” to repeat the last priority number.

I can’t use “s” because the purpose here is to distinguish by number,

Should I do as follows,

exten => _1.,n-1,Goto(Settings1)
exten => _2.,n,Goto(Settings2)

No. In your complete example that would producet the sequence: 1, 2, 3, 3, 4.

You want 1, 2, 3, 4, 4

Change the ‘n’ to an ‘s’.

Also _. is bad art since it matches everything and that is almost never what you want. Changing that to _[12]. and then using the FILTER() function before you do anything with the extension number is probably going to help you avoid problems in the future.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.