<snip>The resulting extensions_from_mysql.conf file looks something like this: [vp_context] exten => 1000,1,Record(/tmp/rec:gsm) ; exten => 1000,2,Playback(/tmp/rec) ; exten => 1000,3,Background(goodbye) ; exten => 1000,4,Hangup() ;
I decided to #include this in my main extensions.conf, like so:
[main_vp_context] exten => s,1,Answer #include <extensions_from_mysql.conf> exten => #,1,Background(goodbye) ; Notify caller exten => #,2,Hangup() ; Hang up exten => t,1,Hangup() ; Hang up if timeout exten => i,1,Playback(invalid) ; Play "invalid ; extension" if caller ; misdials an extension
Anyone see a possible reason for the problem? Do you have any ideas how to use an include file which contains multiple contexts? Or will I have to generate multiple include files, one per included context, without the context lines in these files?
The only thing that seems out of place to me is your #include in [main_vp_context]. It looks to me like you intend for the s, #, t, and i extensions to be in [main_vp_context]. The way you layed out this example, that's not what is happenning.
I think you wanted this:
Your extensions_from_mysql.conf should still look like:
[vp_context] exten => 1000,1,Record(/tmp/rec:gsm) ; exten => 1000,2,Playback(/tmp/rec) ; exten => 1000,3,Background(goodbye) ; exten => 1000,4,Hangup() ;
Then, in extensions.conf:
#include <extensions_from_mysql.conf>
[main_vp_context] exten => s,1,Answer exten => #,1,Background(goodbye) ; Notify caller exten => #,2,Hangup() ; Hang up exten => t,1,Hangup() ; Hang up if timeout exten => i,1,Playback(invalid) ; Play "invalid ; extension" if caller ; misdials an extension include => vp_context
This way, you define both contexts, and include the extensions that were defined in [vp_context] into [main_vp_context].
I don't know if this will resolve your other problem, but I believe this is the dialplan you were trying to build.
-- Andrew Thompson http://aktzero.com/ http://dev.asteriskdocs.org/ _______________________________________________ Asterisk-Users mailing list Asterisk-Users@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-users To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users