Call recording

i was looking to setup pause or mute call recording when taking credit card details via dtmf is it possible before client enters card number they press # which caused MOH to be played to the agent, when client finishes they enter # again which brings the agent back online