pquiring / javaforce

JavaForce library for building powerful Apps and Services (Native Bindings for Camera, OpenGL, ffmpeg). Includes VoIP stack, PLC I/O and many apps.
http://pquiring.github.io/javaforce
GNU Lesser General Public License v3.0
55 stars 24 forks source link

TCP protocol not working in VOIP #8

Closed tobias-herkert closed 2 years ago

tobias-herkert commented 3 years ago

Hello, I'm new to Java and trying to setup a small learning project using JavaForce VIOP via TCP.

I have a server and a client that start, but whenever I send an INVITE, I receive the following log: Bad packet (no Call-ID) from: XXXX:XXXX

I tracked the issue into the TransportTCPServer.java where the packet is correctly stored in the packets ArrayList. This packet is then "copied" into an packet provided by the SIP class in function receive. However the data array from the tmp packet is directly assigned to the data property of the packet from SIP which replaces the array from SIP. SIP then continues to work with its original array that is still all zeros. Zeros lead to an empty string and, of course, no Call-ID.

pquiring commented 2 years ago

This should be fixed by commit 13a4656

Thanks for reporting a bug.

pquiring commented 2 years ago

Please test and let me know. I have no VoIP Services that accept TCP to test against.

Thanks,

tobias-herkert commented 2 years ago

Hi, thanks for the fast response! The fix is working :)

Closed.