A witness shall not be compelled to attend court for oral examination where his deposition may be used unless he has failed, when duly summoned, to appear and give his deposition.