Wales scrum-half Mike Phillips is to take legal action after his contract was terminated by French club Bayonne.