Problem in my conf

Hi all,

I’m investigating asterisk with asteriskNow. My objective is to record a call in several separate file of some seconds, so to do that I wanted to write an extension in a separate configuration file.
So I have my extension.conf with the context [ext-local] where I’m making several operation.
My first question is to know how to do to include a context in that one

[ext-local-custom]
exten => 1000,2,Set(TOTO=2)

[ext-local]
include => ext-local-custom
exten => 1000,1,Answer()
exten => 1000,n,Hangup()

Well when I’m reloading the dialplan in asterisk and performing a call, the variable is not setted, I see nothing in my console.

Someone can tell me what i’m making wrong?

This is not a support forum.

This is a better match for 1000,2 than the included one.

It would probably work if you changed the n into a 3, but that would confuse people trying to mainain it.

Also note that calling hangup at the end of an answered call does nothing, as simply dropping off the end of the dialplan is sufficient (i.e. it would probably work if you deleted the line entirely!). Also, why do you explicitly answer the call?

It is only for testing, I just want to understand the philosophy