Commit 9b2f4358 authored by Adrian Georgescu's avatar Adrian Georgescu

Fixed auto_answer when using Bonjour

parent a291e5e4
...@@ -5243,13 +5243,19 @@ class IncomingRequest(QObject): ...@@ -5243,13 +5243,19 @@ class IncomingRequest(QObject):
self.dialog.username_label.setText(contact.name or session.remote_identity.display_name or address) self.dialog.username_label.setText(contact.name or session.remote_identity.display_name or address)
settings = SIPSimpleSettings() settings = SIPSimpleSettings()
if settings.audio.auto_answer and contact and contact.settings.auto_answer and settings.audio.auto_answer_interval: try:
self.dialog.setAutoAnswer(settings.audio.auto_answer_interval) if settings.audio.auto_answer and contact.settings.auto_answer and settings.audio.auto_answer_interval:
self._auto_answer_timer = QTimer() auto_answer_interval = settings.audio.auto_answer_interval
self._auto_answer_timer.setInterval(settings.audio.auto_answer_interval * 1000) except AttributeError:
self._auto_answer_timer.setSingleShot(True) pass
self._auto_answer_timer.timeout.connect(self._auto_answer) else:
self._auto_answer_timer.start() if auto_answer_interval > 0:
self.dialog.setAutoAnswer(settings.audio.auto_answer_interval)
self._auto_answer_timer = QTimer()
self._auto_answer_timer.setInterval(settings.audio.auto_answer_interval * 1000)
self._auto_answer_timer.setSingleShot(True)
self._auto_answer_timer.timeout.connect(self._auto_answer)
self._auto_answer_timer.start()
self.dialog.user_icon.setPixmap(contact.icon.pixmap(48)) self.dialog.user_icon.setPixmap(contact.icon.pixmap(48))
self.dialog.audio_stream.setVisible(self.audio_stream is not None) self.dialog.audio_stream.setVisible(self.audio_stream is not None)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment