What if I only wanted some extensions to use the predial hook context

I use this context

and inside there are rules of course …
I would like, however, that only some extensions were subject to it while other extensions must ignore these rules or better make other steps, how can I do an if and then an else?

Checkout the ExecIF function in Asterisk.
GotoIf or GoSubIf are also a possibility.
The calling party ID is saved in the AMPUSER variable.

See the part in this post titled, “How do I apply custom dialplan selectively on some outbound calls?”.

actually I would like to learn “IF” and also “ELSE” and act with “AND” and also “OR”
to use in contexts, can you give me simple examples or sign me adequate documentation?


or this are good places to learn:



1 Like

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