How to use includes in configurations files?


Actualy I’ve created an IVR there are 2 choices, but I want to edit that configuration.
I want to changed channel language depending on the choice (button 1 or button 2).

like that : “exten => 1,1,Set(CHANNEL(language)=es)”

IVR configuration’s is automaticaly created in extensions_additional.conf where the first line is "include => ivr-25-custom"
I know this file shouldn’t never be modified. I’m trying to use the custom file, but right now I can’t do it.

I trying : in (extensions_custom.conf)

exten => 1,1,Set(CHANNEL(language)=es)
exten => 2,1,Set(CHANNEL(language)=en)

But it doesn’t work…

Could you tell me how to use “include” section ?
Sorry if my english is wrong :slight_smile:

You don’t need custom code for that, use Applications, Languages

Thank you for your reply.

Currently IVR redirects to conference calls (same application for key 1 and key 2).

If I use language module, should I create two conference applications in that case ?
I would like to keep a single conference application.

If I add the previous code inside the code already generated in extensions_additional.conf this works well.

But if it is possible I would like to understand and use this “include” system.

EDIT : It’s work perfectly with language module, thank you !