Creating custom dialplan

I’m trying to migrate an old v1.4 pbx to freepbx. So far using EPM and the GUI has worked okay, but I need to migrate some code that I couldn’t replicate in the GUI.

Anyway, in the code below, after the phone is dialed and there is no answer after 5 seconds, the call is disconnected and the dialplan aborts.

How can I use the dial macro in freepbx correctly so this works?

context emergency-custom { s => { NoOp(==Custom Emerg Content BEGIN==); Set(RingGroupMethod=ringall); GoSub(macro-dial,s,1(5,tr,205)); Playback(custom/emergency); System(touch /tmp/emergtest); NoOp(==Custom Emerg Content END==); }; };