Example macro to diagnose outbound dialing rules

There is a macro available in FreePBX that allows you to catch an outbound call just prior to it’s being dialed. You can define this macro for many purposes such as adding required SIP headers that may be necessary by a specific provider or many other uses that you may see fit. Following is one example of a simple macro that will read out the exact number to be dialed and the trunk number that it is about to use. You could improve on this with the use of Text-To-Speech to read out the specific trunk technology and name.

; Displaying Trunk, you could use text-to-speech here to say the trunk name
exten => s,1,Noop(Dialing on TRUNK: ${OUT_${DIAL_TRUNK}})
exten => s,n,Wait(1)
exten => s,n,Playback(you-have-dialed)
exten => s,n,SayDigits(${OUTNUM})
exten => s,n,Playback(in-the-line)
exten => s,n,SayNumber(${OUT_${DIAL_TRUNK}})
exten => s,n,Playback(pls-wait-connect-call)