Play Pause toggle on collision with trigger box?

I set up music to play when player collides with trigger box. I would like to have the music pause when trigger box is again collided. Then resume playing when collided again. So:
collide 1st time: play sound
collide 2nd time: pause sound
collide 3rd time: resume sound
collide 4th time: pause sound (and on and on)

Can someone point me to a tutorial or what I should look up? Right now the music just plays until it ends.