This is a question regarding whether there’s any way within hangup extensions to determine whether the caller or callee leg (or both) of a bridged call has hung up. The test case I have is running under Asterisk 184.108.40.206, but the behaviour is observed in 220.127.116.11 (and also
Within the dialplan, the Dial() application with the “F” flag, so that once the caller hangs up, the dialplan jumps to a new priority which enables the called party to enter some digits which describe the outcome of the call. Also, the “g” flag is used to attempt to continue execution of the dialplan if the called party hangs up.
Minimally, the dialplan is covered by the following:
exten => _1000,1,Set(_CALLER_HUNGUP