From 99124e88951082b8c7026060d4a811f3e004c335 Mon Sep 17 00:00:00 2001 From: TJ Porter Date: Fri, 2 Jun 2023 01:01:12 -0500 Subject: [PATCH] Fixes #55 [FIX] Changed socket out to be a reference to socket in for RTPClient. Some systems were just replying to the port they were receiving RTP on instead of sending RTP to the port specified in the SDP of the INVITE or OK message. This was causing loss of audio and DTMF on those systems. --- pyVoIP/RTP.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyVoIP/RTP.py b/pyVoIP/RTP.py index 90e4208..ac329d1 100644 --- a/pyVoIP/RTP.py +++ b/pyVoIP/RTP.py @@ -336,7 +336,9 @@ def __init__( def start(self) -> None: self.sin = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - self.sout = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + # Some systems just reply to the port they receive from instead of + # listening to the SDP. + self.sout = self.sin self.sin.bind((self.inIP, self.inPort)) self.sin.setblocking(False)