When an arrest under a warrant occurs in a parish other than that in which the alleged offense was committed, the person arrested shall be booked and imprisoned in the parish where he was arrested until he gives bail or is transferred to the parish where the offense is alleged to have been committed. A person awaiting transfer shall not be detained in custody in the parish of his arrest for a longer period than ten days.