I'm evaluating usage of RTPEngine for media anchoring in a B2BUA. I did a simple PoC and was able to anchor media for a basic one-to-one call by using the call-id of just one side of the call. I'm now trying to understand whether RTPEngine will support a couple of more advanced scenarios:
1. Bridging media legs from 2 calls where the second call is the result of an INVITE + Replaces header. The requirement is to handle Replaces header on the B2BUA without forwarding the INVITE to the end UA. So from media perspective it would look something like this:- Alice <--- Media Leg 1 ---> RTPEngine (Call 1)- Bob <--- Media Leg 2 ---> RTPEngine (Call 1)
- Bob <--- Media Leg 3 ---> RTPEngine (Call 2 + Replaces)Can RTPEngine proxy media from leg 1 to leg 3 and backwards instead of leg 2?
Assuming these are established using different call IDs, currently the answer is no. You can do this between multiple different parties to a single call (same call ID), but currently we can't cross-connect between different calls (call IDs). There's a long-standing TODO to make this possible, but it has been on the back burner.
A common workaround is to have rtpengine proxy media to itself
for every call using a hidden internal call leg
2. Splitting 2 media legs to inject Media Mixer in between. From media perspective it would mean transitioning from 2 media legs:- Alice <--- Media Leg 1 ---> RTPEngine- Bob <--- Media Leg 2 ---> RTPEngineto 4 media legs:
- Alice <--- Media Leg 1 ---> RTPEngine- Bob <--- Media Leg 2 ---> RTPEngine- Mixer <--- Media Leg 3 ---> RTPEngine (to/from Alice on leg 1)- Mixer <--- Media Leg 4 ---> RTPEngine (to/from Bob on leg 2)The reason behind this sub-optimal approach is to avoid reINVITEs as some UAs don't handle them properly.
This is certainly possible using the right signalling to rtpengine, and is a bit like the hidden internal call leg I just mentioned. The mixer would have to act as a sort of B2BUA (it doesn't have to be SIP, but it needs to talk to rtpengine with SDPs). It would need either different call IDs for the two call legs, or different from/to-tags within the same call ID.
Cheers