[Asterisk-Users] Different answering policies for two zap interfaces

Rich Adamson radamson at routers.com
Fri Nov 4 16:49:50 MST 2005


> I am wondering if it is possible to adapt different dial plan depending upon which channel answered the 
call. I am pretty sure we can do this by
> putting them in to two different context but I want to avoid multiple context as far as possible.
> 
> Is it possible to know which channel answered the call(zap/3 or zap/4)? If yes, I can use goto command to 
switch to one of the two dialplans.
> 

Sure you can, just think about it in the opposite direction.

Each channel that you define (in sip.conf, iax.conf, zapata.conf, etc) 
has contexts assigned to them, and usually at the channel and/or subchannel
basis. Use those as your basis for developing a dialplan, and then
use "include" statements to include shared contexts into those.

So, if you have an entry in zapta.conf (as an example only), assign
a context=incoming-business to that channel.

Then in extensions.conf do something like this...
[incoming-business]
include => local-extensions
include => mother-in-law
etc.





More information about the asterisk-users mailing list