Continue outbound call after message played

Hi all, I’m creating a dial plan for outbound calls based on area code, where if the call is made after a certain hour of the day, the system plays a message like ‘this call is being blocked due to time restrictions’, and then hangs up.
However, there is a requirement of a feature code that if used can override this and the call will continue, however I don’t know how to make this call continue and not hang up.

            $ext->add($appId, $c, '', new \ext_read('OVERRIDE','time-restriction', strlen($featurecode),'',2));
            $ext->add($appId, $c, '', new \ext_gotoif('$["${OVERRIDE}"="' . $featurecode .'"]', WHAT TO DO HERE?????));
            $ext->add($appId, $c, '', new \ext_macro('hangupcall'));

Any ideas?

I think your difficulty is the requirement for the message, before the code is entered. Without that you strip the prefix and go to the actual dialing.

One way, here, might be have a secret prefix code (security by obscurity).

I’m a bit confused by your presentation of the code in the form of code to generate the dialplan. That suggest you are doing this my modifying FreePBX itself, rather than using customisation features.