Open Jan108 opened 2 years ago
Seems to have solved my one way audio issues as well using a different VoIP provider! Thanks a lot!
Are you behind a NAT?
No. In the current version, this doesn't work because of #76. But with 2.0 this should be fixed.
In my application of pyVoIP I didn't receive the incoming audio from an incoming call.
After a packet capture, I realized that the SIP server (
sipconnect.sipgate.de
) sends the RTP packets to the wrong port (see packet_reading.zip). In the acceptance of theINVITE
in packet 10 with200 OK
, we send the selected port 15940. But in the first received packet 33 the destination port is the 45336, which is the same port we send out RTP packets from.The conclusion from it is, that the SIP server at
sipconnect.sipgate.de
ignores the port in the call acceptance, but sends its audio packets to the same port we send from. As a solution, I changed the sockets in the RTPClient to only one (see master of my fork). This way we send and receive on the same port.This solves the problem and shouldn't interfere with the SIP/RTP definition. Using the same socket for send and receive is thread safe, so long only one thread sends and only one thread receives. Which is the case.