From what I am understand that in freeswitch leg A dont call leg B. It bridges them.
So it suppose like this
client 1 -(leg a)-> FS ---(bridge)-- FS -(leg b)-> client 2.
So when client 1 call FS, the codec from FS dan client 1 must match (speex and telephony event). This will be leg A.
then FS call client 2, the codec from FS and client 2 must match (OPUS for example and telephony event). This will be leg B.
Then you bridge them leg A to leg B. Then you have transcoding.
May be if you can show the corresponding dialplan we will know better.
Donny