Sudhanshu Rajvaidya
2005-Nov-04 16:21 UTC
[Asterisk-Users] Different answering policies for two zap interfaces
Hi, 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. Thanks, Sudhu -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20051104/3e3743c1/attachment.htm
Rich Adamson
2005-Nov-04 16:49 UTC
[Asterisk-Users] Different answering policies for two zap interfaces
> I am wondering if it is possible to adapt different dial plan depending upon which channel answered thecall. 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 toswitch 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.