It says at voip-info realtime extensions page that one can have multiple switch statements in a dialplan. But how exactly does it work? Or better, what did the page author mean with that?
I tried to simply stack switch statements one after the other, just as a crash test, like this:
switch => Realtime/@someextens
switch => Realtime/@otherextens
The second switch statement will never get loaded. Another interesting thing is when you have mixed dialplans (database and file). Say you call “switch =>” in the flat file (going then to the database one), and at some point in the database dialplan you have a Goto which actually throws execution back to the file (yeah, I know it’s all in memory, I’m just making it simple to understand), that works fine. But the thing is, if you call “switch =>” again in the current context (file), it will never get executed. So once you switched, you can never do it again.
Does anybody know why? Is the wiki page plain and simply wrong? Maybe I got the wrong idea of “having multiple switch statements”, so if anybody could clarify that, it would be most helpful.
Thanks a lot.