If a person comes into this state in obedience to a subpoena directing him to attend and testify in a criminal prosecution in this or any other state, he shall not while in this state pursuant to such subpoena be subject to arrest or the service of process, civil, or criminal, in connection with matters which arose before his entrance into this state under subpoena.
IC 35-37-5-8