Open TECH7Fox opened 9 months ago
I solved this by commenting out line 413 and 414 of RTP.py
. Since the RTP clients will only have a self.sin
object if they were started, there is no need to stop them in the case of a call that has not yet been answered.
def deny(self) -> None:
if self.state != CallState.RINGING:
raise InvalidStateError("Call is not ringing")
message = self.sip.gen_busy(self.request)
self.sip.out.sendto(
message.encode("utf8"), (self.phone.server, self.phone.port)
)
# for x in self.RTPClients:
# x.stop()
self.state = CallState.ENDED
del self.phone.calls[self.request.headers["Call-ID"]]
When I call
call.deny()
I get this error:AttributeError: 'RTPClient' object has no attribute 'sin'
Seems like it tries to stop the RTPClient when it never started? For now I manually set the callstate to
ENDED
when it throws a error, which seems to work.