Per my reference: A proper legal answer is, it depends on how the restraining order is worded. If it is merely an order to stay x feet (or yards or whatever) from the complainant, other contact is not prohibited. If it is a "no contact" order, which often is worded to prohibit telephone calls, mail, directly or through third parties (friends or relatives), then no contact by either party. If either or both of you had/have attorneys, you can have contact through them. If contact is needed for medical or some other emergency purpose, and time is of the essence, you would probably be OK contacting the other person. If there are children involved, there should have been specific provisions for contact regarding them.
Otherwise, the order would have to be modified to allow contact.