[jitsi-dev] Jitsi SIP with 3CX Phone system


#1

Hi all,

I have problems using Jitsi with 3CX Phone System SIP server and their
client app.

The first one is that the 3CXPhone when used on LAN sometimes sends SIP
requests directly to destination instead of using proxy. That was causing
Jitsi to ignore "end call signals" which were sent directly to Jitsi. After
looking into the code I've found account property FORCE_PROXY_BYPASS which
fixed that case.

However it was rejecting INVITE signals that were sent directly.
This was caused by filtering out requests in SipStackSharing which come not
from the proxy. The method responsible method for that is
filterByAddress():SipStackSharing:975.
I've fixed this by exposing property "isForceProxyBypassEnabled" in
ProtocolProviderServiceSipImpl and adding a check for this condition in
method mentioned above, so now it looks like this:

if ( !candidate.getRegistrarConnection().isRegistrarless()
                && !candidate.isForceLooseRoutingEnabled()
                && !candidate.getRegistrarConnection()
                        .isRequestFromSameConnection(request))
            {
                iterPP.remove();
            }

I'm attaching the patch. Please let me know what do you think about that.

forceLooseRouting.patch (1.55 KB)

···

--
Regards,
Pawel


#2

Hey Paweł,

Hi all,

I have problems using Jitsi with 3CX Phone System SIP server and their
client app.

The first one is that the 3CXPhone when used on LAN sometimes sends SIP
requests directly to destination instead of using proxy.

Do you have more details on the exact flow?

That was
causing Jitsi to ignore "end call signals" which were sent directly to
Jitsi.

While moving signalling to direct communication is indeed allowed by
SIP, it is in reality quite rare and anything but recommended. I believe
the easiest thing to do here would be to tell the 3CX phone to use the
phone system as an outbound proxy. Is this possible?

After looking into the code I've found account
property FORCE_PROXY_BYPASS which fixed that case.

However it was rejecting INVITE signals that were sent directly.
This was caused by filtering out requests in SipStackSharing which come
not from the proxy. The method responsible method for that is
filterByAddress():SipStackSharing:975.
I've fixed this by exposing property "isForceProxyBypassEnabled" in
ProtocolProviderServiceSipImpl and adding a check for this condition in
method mentioned above, so now it looks like this:

if ( !candidate.getRegistrarConnection().isRegistrarless()
                && !candidate.isForceLooseRoutingEnabled()
                && !candidate.getRegistrarConnection()
                        .isRequestFromSameConnection(request))
            {
                iterPP.remove();
            }

I'm attaching the patch. Please let me know what do you think about that.

The reason we added the check above is because of a security issue that
allowed anyone to send requests to Jitsi (including things like REFERs)
so I am not particularly excited about re-allowing this ... but we will
if we need to.

Cheers,
Emil

···

On 10.12.12, 12:23, Paweł Domas wrote:

--
https://jitsi.org