I'm sure how -context works

I’m try to modify how app-chanspy works. Now:

include => app-chanspy-custom
exten => 555,1,Macro(user-callerid,)
exten => 555,n,Answer
exten => 555,n,Wait(1)
exten => 555,n,ChanSpy()
exten => 555,n,Hangup

so I added in extensions_custom.conf


exten => 555,1,Macro(user-callerid,)
exten => 555,n,Verbose(0,Entering ChanSpy from app-chanspy-custom)
exten => 555,n,Answer
exten => 555,n,Wait(1)
exten => 555,n,ChanSpy(,s) ; <== adding 's’
exten => 555,n,Hangup

But asterisk is ignoring app-chanspy-custom

What am I doing wrong?

Chanspy doesn’t work how you think it works… I would suggest reading the docs

Huh? It works exactly as intended. Or should I say it as I desired

The auto generated ‘extensions_additional.conf’ does not include the ‘s’ option for chanspy as shown in my post.

The question I have why it doesn’t use [app-chanspy-custom] where my changes have been made. Also shown in my post


Your edits won’t work, and the reasoning goes deep into the workings of Asterisk and how included contexts work. What you want to do is overwrite the exiting context, you need to add it to /etc/asterisk/extensions_override_freepbx.conf and name it identically to the context you are replacing.

Alternatively, you can do what you’ve done in extensions_custom.conf, rename the context to something like [app-chanspy-bhfisher] then create a Custom Destination in FreePBX that goes to:


You can then create a new feature code with a Misc Application that points to the custom destination.


“,s” is not (ever) valid.

by default no args would be the same as:


so when you dial 1234# it spy’s on Agent/1234

well actually it is is asterisk 13

see https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_ChanSpy

s - Skip the playback of the channel type (i.e. SIP, IAX, etc) when speaking the selected channel name.

funny, it’s already included in extensions.conf at line 31.
Along with:

Line 29 => #include extensions_override_freepbx.conf
Line 30 => #include extensions_additional.conf
Line 31 => #include extensions_custom.conf

So why would I need to include it again?

No one said anything about adding another file include.

OK, miss read that. So my understanding whatever you add to extensions_custom.conf should be included in the dial plan. Apparently it’s not (or not working as expected) Logic tell me Line 31 above should before line 30 to be seen first - but I assume you guys know more than I do

@lgaetz already answered your question in full. I think you are just skimming. You need to stop using the _custom.conf file and use the override.conf file instead. I suggest you fully re-read what he wrote. Take the time to take it all in.

Explanation: Your include happens at line 0. All of your lines are then overridden by the rest of regular app-chanspy. This is why you need to use the override file.