Prefix by beam selection

Hi, and excuse the bad English, I configured a raspberry with freepbx, (raspbx) to use it as a home switchboard.
I have activated two Voip numbers, one with messagenet, and one with orchestra.
I’ve created two outbound routes, one for messagenet, and one for the Orchestra. And in the “dial patterns” I entered 0 | respectively. Et 9 |.
My idea was to type 0 to go out on messagenet, and 9 to the Orchestra. (Depending on the remaining credit).
But I think there is a mistake. If you leave one of the two routes, everything works, otherwise I can not get out.
Can you please give me a tip to solve it?
Thank you

Not without the configuration.