Dialout-trunk dialstatus

I was wondering if dialout-trunk could be more flexible.
The current code calls Busy() or Congestion() which forces the hang up on dialstatus BUSY or CANCEL. Anything else allows to proceed.
While this is fine, I was wondering if both Busy() and Congestion() could be replaced with a macro/function alias call which would then allow the admin to choose between:

  1. calling Busy() or Congestion() as default behavior
  2. calling custom commands such as Playback(extension is busy, etc.), redirect to other services, etc.
    For example, in my case, some softphones we use just display a popup window immediately saying that the extension is “Busy Here” (no “playtones” are heard). Instead of changing our softphone, we prefer to have a playback saying that it’s busy (its easier on blind users for example).

Right now I’m commenting out Busy() and Congestion() and adding code after the call to dialout-trunk and checking the dialstatus.

Maybe FreePBX could provide a simple mechanism to customize the Busy() and Congestion() calls.

Just a thought.