Thanks for this. I’m just trying to work out where to put this! I don’t have an [internal-handsets] context so I figured I should make or adapt one?
I’m using FreePBX, so I thought /etc/asterisk/extensions_override_freepbx.conf
might be the spot. I copied [ext-local] from extensions_additional and pasted it into extensions_override_freepbx, inserted a log line (CHECKFORTHISENTRY) but all that’s happened is my asterisk log now has a LOT of for example:
[2019-12-02 19:45:52] WARNING[10854] pbx_config.c: Unable to register extension at line 4331 of /etc/asterisk/extensions_additional.conf
[2019-12-02 19:45:52] WARNING[10854] pbx.c: Unable to register extension 'vms20' priority 1 in 'ext-local', already in use
exten => 22,1,Set(__RINGTIMER=${IF($["${DB(AMPUSER/22/ringtimer)}" > "0"]?${DB(AMPUSER/22/ringtimer)}:${RINGTIMER_DEFAULT})})
exten => 22,n(novmpw),Noop(CHECKFORTHISENTRY)
exten => 22,n,Macro(exten-vm,22,22,0,0,0)
exten => 22,n(dest),Set(__PICKUPMARK=)
exten => 22,n,Macro(vm,22,${DIALSTATUS},${IVR_RETVM})
exten => 22,n,Goto(vmret,1)
exten => 22,hint,PJSIP/22&PJSIP/9022&Custom:DND22,CustomPresence:22
I’m guessing also that this will work for calls between local handsets but not any external calls? That’s fine 
Also not sure that the unmute should happen when the phone has stopped ringing, but rather, if poss, when the call is actually over?
No worries if this is a right old pain in the bum, it’s not so important, it’s partly a convenience for my colleague and partly I find it fun/interesting!