A motion needs to be brought to quash the warrant. It sounds like he got caught up in two different courts (family for the TPO and criminal for the alleged TPO violation) and did not have effective representation to explain the exception in his TPO -- although, depending on how he actually chose to communicate and what messages were actually left, there may still have been a violation. He needs to talk to his criminal defense attorney, as a warrant involves a criminal violation.
Responses are for general information purposes only, and are based on the extremely limited facts given. A consultation with an attorney experienced in the area of law(s) indicated in the question is highly recommended. Information and advice given here should not be relied upon for any final action or decision, as the information is limited by its nature to the question asked and the fact(s) presented in that question. THIS RESPONSE DOES NOT CREATE AN ATTORNEY/CLIENT RELATIONSHIP, particularly considering that the names of the parties are unknown.