Removing spaces from outbound phone numbers

Hooking for fun and income - FreePBX / Tips and Tricks - FreePBX Community Forums

[macro-dialout-trunk-predial-hook]
exten => s,1,NoOp(Entering user defined context macro-dialout-trunk-predial-hook in extensions_custom.conf)
;Remove spaces or dashes or + from outbound number when calling
exten => s,n,Set(OUTNUM=${FILTER(0123456789*#,${OUTNUM})})
exten => s,n,MacroExit

Remember to reload dial plan.