Section 542(1) in The Code of Criminal Procedure, 1989 (1933 A. D.)
(1)Any Magistrate of the 1st class desirous of examining as a witness in any case pending before him, any person confined in any jail within the local limits of his jurisdiction, may issue an order to the officer-in-charge of the said jail requiring him to bring such prisoner in proper custody, at a time to be therein named, to the Magistrate for examination.