If the offense charged is a felony, and the arrest occurs in the county in which the warrant was issued, the officer making the arrest must take the defendant before the magistrate who issued the warrant or some other magistrate of the same county.
If the defendant is arrested in another county, the officer must, without unnecessary delay, inform the defendant in writing of his right to be taken before a magistrate in that county, note on the warrant that he has so informed defendant, and, upon being required by defendant, take him before a magistrate in that county, who must admit him to bail in the amount specified in the endorsement referred to in Section 815a, and direct the defendant to appear before the court or magistrate by whom the warrant was issued on or before a day certain which shall in no case be more than 25 days after such admittance to bail. If bail be forthwith given, the magistrate shall take the same and endorse thereon a memorandum of the aforesaid order for the appearance of the defendant, or, if the defendant so requires, he may be released on bail set on the warrant by the issuing court, as provided in Section 1269b of this code, without an appearance before a magistrate.
If the warrant on which the defendant is arrested in another county does not have bail set thereon, or if the defendant arrested in another county does not require the arresting officer to take him before a magistrate in that county for the purpose of being admitted to bail, or if such defendant, after being admitted to bail, does not forthwith give bail, the arresting officer shall immediately notify the law enforcement agency requesting the arrest in the county in which the warrant was issued that such defendant is in custody, and thereafter such law enforcement agency shall take custody of the defendant within five days, or five court days if the law enforcement agency requesting the arrest is more than 400 miles from the county in which the defendant is held in custody, in the county in which he was arrested and shall take such defendant before the magistrate who issued the warrant, or before some other magistrate of the same county.
Ca. Pen. Code § 821