Set flag on hangup

Ide like to set a flag (db key) after a(n outgoing) call (on hangup). Where is the best palce to do that?

 

I tried doing it after macro-hangupcall but then the key gets updated for incoming calls as well

gotit. here’s what I did: