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

(Claudio Pelosi) #1

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?

(Avayax) #2

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

(Lorne Gaetz) #3

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

(Claudio Pelosi) #4

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?

(Communication Technologies) #5


or this are good places to learn: