sippy / go-b2bua

The GO port of the Sippy B2BUA
BSD 2-Clause "Simplified" License
61 stars 16 forks source link

b2bua_simple and rtpproxy #10

Open dekke046 opened 10 months ago

dekke046 commented 10 months ago

Hi,

I am looking for a way to use b2bua_simple with rtpproxy, but that seems not to be possible? the b2bua_radius can use rtpproxy but is dependent of the radius client part which I dont want to use.

Is there any way to achieve this?

The goal is to use b2bua in combination with rtpproxy to forward/proxy both sip and rtp traffic for incoming calls to a sip and rtp media server behind b2bua and rtpproxy.

Any thoughts?

dekke046 commented 10 months ago

@sobomax Is the above possible at all?

sobomax commented 8 months ago

@dekke046 that should be pretty straightforward. All you need is to take rtpproxy code out of the radius version and extend accordingly. You are basically init one or several RtpProxyClient instances during start-up (based on how many proxies do you have), pass it down the call chain and then create a session in the call_controller. The actual hook-up to the call flow is then dead simple:

    if self.rtp_proxy_session != nil && oroute.rtpp {
        self.uaO.SetOnLocalSdpChange(self.rtp_proxy_session.OnCallerSdpChange)
        self.uaO.SetOnRemoteSdpChange(self.rtp_proxy_session.OnCalleeSdpChange)
        self.rtp_proxy_session.SetCallerRaddress(nh_address)
    }

Another way to go about it, is to start with radius version and then disable all features that you don't need (AAA).

sobomax commented 8 months ago

@dekke046 the whole idea behind having b2bua_simple is to have a barebone simple implementation, so that people can add their features on top of it. If you are curious how to setup b2bua_radius for not doing any auth you can also check our voiptests project here. https://github.com/sippy/voiptests/actions/runs/6661678068/job/18104892793#step:6:129. Perhaps the way to resolve that issue would be to rename b2bua_radius into just "b2bua", so that people don't get the wrong idea?