Pause when phone rings

it would be nice if you could customize to have a command run, such as pause or stop, when your phone or iPad has an incoming FaceTime or phone call

 

thanks