Any person arrested in this state charged with having committed any crime in another state or alleged to have escaped from confinement, or broken the terms of his bail, probation or parole, may waive the issuance and service of the warrant provided for in sections 570.18 and 570.20 and all other procedure incidental to extradition proceedings by executing or subscribing in the presence of a judge of any court of record within this state a writing which states that he consents to return to the demanding state, provided, however, that before such waiver shall be executed or subscribed by such person it shall be the duty of such judge to inform such person of his rights to the issuance and service of a warrant of extradition and to obtain a writ of habeas corpus as provided for in section 570.24.
If and when such consent has been duly executed it shall forthwith be forwarded to the office of the secretary of state of this state and filed therein. The judge shall direct the officer having such person in custody to deliver forthwith such person to the duly accredited agent or agents of the demanding state, and shall deliver or cause to be delivered to such agent or agents a copy of such consent. Provided, however, that nothing in this section shall be deemed to limit the rights of the accused person to return voluntarily and without formality to the demanding state, nor shall this waiver procedure be deemed to be an exclusive procedure or to limit the powers, rights or duties of the officers of the demanding state or of this state.