From 0b0d354ae82a45d349b78220a5c8780496d4d7d8 Mon Sep 17 00:00:00 2001 From: Alexander Maassen Date: Tue, 16 Jan 2024 17:14:06 +0000 Subject: [PATCH] and black strikes again... --- pyVoIP/SIP.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pyVoIP/SIP.py b/pyVoIP/SIP.py index 7a91360..d3c33cc 100644 --- a/pyVoIP/SIP.py +++ b/pyVoIP/SIP.py @@ -1049,7 +1049,8 @@ def gen_sip_version_not_supported(self, request: SIPMessage) -> str: + f"{request.headers['From']['tag']}\r\n" ) response += ( - f"To: {request.headers['To']['raw']};tag=" + f"{self.gen_tag()}\r\n" + f"To: {request.headers['To']['raw']};tag=" + + f"{self.gen_tag()}\r\n" ) response += f"Call-ID: {request.headers['Call-ID']}\r\n" response += ( @@ -1278,7 +1279,8 @@ def gen_busy(self, request: SIPMessage) -> str: + f"{request.headers['From']['tag']}\r\n" ) response += ( - f"To: {request.headers['To']['raw']};tag=" + f"{self.gen_tag()}\r\n" + f"To: {request.headers['To']['raw']};tag=" + + f"{self.gen_tag()}\r\n" ) response += f"Call-ID: {request.headers['Call-ID']}\r\n" response += ( @@ -1311,7 +1313,8 @@ def gen_ok(self, request: SIPMessage) -> str: + f"{request.headers['From']['tag']}\r\n" ) okResponse += ( - f"To: {request.headers['To']['raw']};tag=" + f"{self.gen_tag()}\r\n" + f"To: {request.headers['To']['raw']};tag=" + + f"{self.gen_tag()}\r\n" ) okResponse += f"Call-ID: {request.headers['Call-ID']}\r\n" okResponse += ( @@ -1560,7 +1563,8 @@ def gen_ack(self, request: SIPMessage) -> str: ackMessage += self._gen_response_via_header(request) ackMessage += "Max-Forwards: 70\r\n" ackMessage += ( - f"To: {request.headers['To']['raw']};tag=" + f"{self.gen_tag()}\r\n" + f"To: {request.headers['To']['raw']};tag=" + + f"{self.gen_tag()}\r\n" ) ackMessage += f"From: {request.headers['From']['raw']};tag={tag}\r\n" ackMessage += f"Call-ID: {request.headers['Call-ID']}\r\n"