Execute command after call bridged but before call is hungup

Is there any way to execute a command right after call is established? IE: run logic if callerid=A then place an additional call via a different context to notify etc.
I’m trying to do this w/o the “system” command as not all dialplan commands can be called via system.
I also know about running dial with “m” switch , but that basically runs the macro before bridging the call (or at least it will not run simultaneous)