So pretend you have two users, Bob and Sally.
You have your two servers, ServerA speaks OPUS and ULAW, ServerB speaks ULAW and G729.
Bob’s got a WebRTC client and he’s registered to your ServerA.
Bob < OPUS > ServerA
Sally’s got a hard phone and she’s registered to your ServerB.
Sally < G729 > Server B.
ServerA and ServerB speak ULAW between each other.
ServerA < ULAW > ServerB
Bob calls Sally, His call goes from his WebRTC Client to ServerA and is in OPUS format.
ServerA now needs to call ServerB, The call goes between ServerA and ServerB in ULAW format.
ServerB then sends a call to Sally, The call goes between ServerB and Sally in G729 format.
Bob’s sends audio to ServerA in OPUS format.
Bob’s audio gets transcoded from OPUS to ULAW on ServerA
Bob’s audio gets transcoded from ULAW to G729 on ServerB
Sally receives audio in G729 format from ServerB.
If Both servers support G729 you can allow that codec between ServerA and ServerB.
Then you could skip a transcoding step, ServerA would transcode OPUS to G729 directly.