Audio after calling party hangs up on you

Is there a way to get the ‘h’ priority to play an audio message explaining that the remote party has hung up?

I see it working 50% of the times with the ‘g’ option of the Dial application (it makes the dialplan continue on the next priority after the destination channel hangs up).

However, if the caller hangs up, the callee in my PBX simply hears silence. Can an ‘h’ extension dialplan delay the last BYE message and play a tone instead?

For example:

exten => h,1,NoOp(The remote party hung up. The hungee should hear a tone.)
exten => h,n,Playtones(myspecialtone)
exten => h,n,Wait(3600)
exten => h,n,Hangup()

When the remote party (caller) hangs up, the ‘h’ extension gets executed from priority 1 to 3, but it exits during the Wait application:
== Spawn extension (InternalToInternal, h, 7) exited non-zero on ‘SIP/caller-XXXXXXX’