On 01/09/2022 11.44, [EXT] Eric Tamme wrote:
> Thank you for your response, it helped me to understand a little
> better, though things still feel a bit fuzzy :)
>
> Sort of a side note question, I see here
>
https://github.com/sipwise/rtpengine/wiki/Redis-keyspace-notifications#rtpengine1
>
>
> There is a mention of how the interfaces are named and that "pub"
> prefix is required. Again looking through the source code I cant find
> any specific reference to "pub" does the -i parameter identify "self"
> to rtpengine in terms of OWNED vs. FOREIGN? In my particular use
> case, rtpengine is dual homed and bridging rtp across two networks
> (two interfaces)
I'm a bit confused about what this wiki page is talking about myself.
There's nothing magic about an interface called "pub" or having a "pub"
prefix. What's important is that local addresses used by one rtpengine
instance must become available and addressable to another instance when
failover happens. This can be achieved through load balancers, possibly
with NAT in place, or things like Pacemaker, etc. Rtpengine itself
doesn't handle this because it can't.
The first interface in the interface config list is the one used by
default, if no other interface is specified. In the example from the
wiki, rtpengine1 would use pub1 by default and rtpengine2 would use pub2
by default. Then when r1 fails and r2 ought to take over, the address
used by pub1 must become available to r2 (if it isn't already), at which
point r2 would start handling r1's calls. It would use the same local
address because pub1 is configured with the same address on r2, just not
as the default interface, so it would remain unused for r2's "own" calls
by default.
If you're bridging RTP between two networks, you need to take care that
interface configurations match between instances and that the signalling
to each rtpengine instance instructs each instance to use the correct
interfaces.
The only thing that distinguishes "owned" from "foreign" calls is how
they were created. If a call is created from direct signalling or from
the "write" DB during startup, then it's "owned," and if it's created
from the "read" DB then it's "foreign" (but may become "owned" at some
point if failover happens).
Cheers