Unable to send DTMF in a macro from Dial command, executed before bridging!

I am trying to send DTMF after a called gets bridged to enter the destination phone number for a long distance VoIP carrier. I did what many have done, ie. call a macri from the Dial command.

exten => s,1,Wait(1)
exten => s,n,SendDTMF(${ARG1},250)
exten => s,n,Wait(1)

exten => _418NXXXXXX,1,Answer
exten => _418NXXXXXX,n,Wait(1)
exten => _418NXXXXXX,n,Dial(SIP/voip_main_out/514nxxxxxx,30,M(longdist^${EXTEN}))
exten => _418NXXXXXX,n,Hangup()

But this does not work! It seems that the macro is called when the call is answered but before it is bridged so the DTMF tones are not sent to the destination. I say this because if I add the “r” option, I can hear some ringing while the macro gets executed. Also, I have used the ChanSPy() command in another extension to listen ont he call. When the macro is executed, I can hear on one channel the DTMF, and on another the destination responding on the call.

Once the macro completes, then the call os bridged, the two channel as connected and I can hear on the phone the destination which is still waiting for the DTMF tones. Before the macro ends, I can not hear anything on the source extension.

Any idea how to solve this?

Asterisk (Ver. 1.4.35), FreePBX v2.8.0

voip_main.out is a trunk from voip.ms, type peer.