Starting the world of Asterisk is better from scratch, i.e. clear
installation without any GUI (FreePBX) on top ( seems extensions_custom.conf
is used by FreePBX ? )
in any case, before opening the world, always good to do some homework by
reading this: https://wiki.asterisk.org/wiki/display/AST/Dialplan
My help could be copy/paste mentioned manual, but in brief:
Incoming calls usually comes to dialplan from endpoints, each endpoint
has a ‘context’ option, this context is a section in your dialplan ( it can
be placed in any file, but must be included into
/etc/asterisk/extensions.conf directly, or via other includes).
Write you context dialplan
exten => _X.,1,Answer()
exten => _X.,n,Playback(demo-congrats)
and put option for peer :
finally, reload dialplan by :
rasterisk -rx ‘dialplan reload’
and reload peers profiles:
rasterisk -rx 'sip reload'
rasterisk -rx ‘pjsip reload’
next - make a call by monitoring logs to see results.