If a person comes into this state in obedience to a summons directing the person to attend and testify in a criminal prosecution in this state, the person shall not be subject, while in this state pursuant to such summons, to arrest or the service of process, civil or criminal, in connection with matters which arose before the person's entrance into this state under the summons.
N.D.C.C. § 31-03-30