On 08/10/2025 10.01, 'Ibe Van de Veire' via Sipwise rtpengine wrote:
> I did try to invoke rtpengine at a different point (after the reply of
> the SIP proxy server containing the destination IP).
> But it seems important to also call rtpengine_manage at the invite
> stage to have a functional call.
Ok, that's not what I meant with "invoke at a different point."
I meant invoke it not between caller and SBC, but say between SBC and
SIP server, or even after the SIP server. Wherever you have knowledge of
where the invite will be sent to.
> I also tried to only define the direction when the destination IP is
> known. But here, it seems that if the direction is not defined,
> it will just take the first defined interface for the whole call (even
> after defining the direction afterwards).
Instead of giving two `direction=...` attributes, you can individually
choose the interfaces for the "from" direction and the "to" direction
using `from-interface=...` and `to-interface=...`.
I don't think this would solve your problem though.
> Am I be able to send this re-invite using the SBC server?
> Or can this only be done from the caller?
Any party to the call may initiate a re-invite at any time. If your SBC
acts as a B2B user agent, then it would certainly be able to do that. If
the SBC is just a proxy then it might still be possible, but maybe more
difficult. How you would do it I don't know, since you didn't say what
kind of SBC it is.
> In my situation, the only way to know which interface to use is by
> knowing the actual media address.
> I will try to adapt Kamailio to invoke RTPengine later in the call flow.
Again I am somewhat confused by this statement.
If you have control over the "SIP server" then the SIP server certainly
must know where to send the invite to. If the SIP server knows this,
then it should also be possible to give this information to rtpengine.
And if you don't have control over the "SIP server" and don't know where
it would send the invite to, then there must be some other way to know
which local interface must be used for media towards the final
recipient. Say, the same interface that is used to communicate with the
SIP server would be a logical choice.
A SIP endpoint which appears as a black box and may respond to an invite
sent to it with a media address that can be reached only through
different local interfaces and which cannot be anticipated seems like a
very odd setup, to say the least.
Cheers