Thanks for the idea. This may answer my question.
I was thinking that I could have a separate exten => h for each context.
The way I have my contexts at present is as follows
[general]
static = yes
[global]
[default]
include => Extn1
include => Extn2
include => Extn3
exten => h,1,Verbose(4,################# H in default context #################)
exten => h,2,Hangup()
exten => t,1,Hangup()
[Extn1]
exten => 11,1,Dial(SIP/11)
exten => h,1,Verbose(4,################# H in extn1 context #################)
exten => h,2,Hangup()
exten => t,1,Hangup()
[Extn2]
exten => 22,1,Dial(SIP/22)
exten => h,1,Verbose(4,################# H in extn2 context #################)
exten => h,2,Hangup()
exten => t,1,Hangup()
[Extn3]
exten => 33,1,Dial(SIP/33)
exten => h,1,Verbose(4,################# H in extn3 context #################)
exten => h,2,Hangup()
exten => t,1,Hangup()
If I dial from extn 11 to 22 and hang up I will get the exten => h from default. OK that’s fare it is the default. So I will take that out
If perform the same test I then get the exten => h from Extn1 context. This looks better as I originated the call from that context. However if I take the exten => h statement from the Extn1 context and call from extn 11 to 33 I get the exten => h from context Extn2.
So it appears that the first exten => h found in the order of the include context is the first and only which is executed.
So my question is there a way each context can call each other but only execute the exten => h for the context called?
can you only have one exten => h extension in your dialplan?
Thanks