Beaumanoir  says that a man who saw that a witness was going to depose against him could avoid the second by saying to the judges that his adversary was producing a false and libelous witness ; and if the witness wished to maintain the quarrel, he proffered the gages of battle.  The investigation was off : for if the witness was defeated, it was ruled that the adversary had produced a false witness, and he lost his suit.
The second witness could not be allowed to swear, for he would have uttered his testimony and the matter would have been ended by the deposition of two witnesses. But by interrupting the second, the deposition of the first became moot.
The second witness being thus rejected, the adversary could not have others heard, and lost his suit ; but in cases where there were no gages of battle, other witnesses could be produced. 
Beaumanoir says that the witness could say to his party before deposing : “I do not wish to fight for your quarrel, nor enter a plea on my part ; but if you want to defend me, I shall willingly tell my truth.”  The party found himself obliged to fight for the witness ; and if he were defeated, he did not lose  the body, but the witness was rejected.
I think that this was a modification of the older custom, and what makes me think so is that this practice of challenging witnesses is established in the laws of the Bavarians  and the Burgundians  without any restriction.
I have already spoken of the constitution of Gundebald, against which Agobard  and St. Avitus  protested so loudly. “When the accused,” says this prince, “presents witnesses to swear that he has not committed the crime, the accuser can challenge one of the witnesses to combat ; for it is just that he who has offered to swear, and who has declared that he knew the truth, should not object to fighting to maintain it.” The king left the witnesses no subterfuge for avoiding combat.