Commit 3a4a27e3 authored by Saul Ibarra's avatar Saul Ibarra

Added support for inband DTMF dialing

parent f96b8f08
......@@ -5,7 +5,7 @@
__all__ = ['AccountExtension', 'BonjourAccountExtension']
from sipsimple.account import PSTNSettings, TLSSettings
from sipsimple.account import PSTNSettings, RTPSettings, TLSSettings
from sipsimple.configuration import Setting, SettingsGroup, SettingsObjectExtension
from sipsimple.util import user_info
......@@ -16,6 +16,10 @@ class PSTNSettingsExtension(PSTNSettings):
idd_prefix = Setting(type=unicode, default=None, nillable=True)
class RTPSettingsExtension(RTPSettings):
inband_dtmf = Setting(type=bool, default=False)
class ServerSettings(SettingsGroup):
settings_url = Setting(type=HTTPURL, default=None, nillable=True)
......@@ -30,6 +34,7 @@ class TLSSettingsExtension(TLSSettings):
class AccountExtension(SettingsObjectExtension):
pstn = PSTNSettingsExtension
rtp = RTPSettingsExtension
server = ServerSettings
sounds = SoundSettings
tls = TLSSettingsExtension
......
......@@ -326,6 +326,8 @@ class SessionItem(QObject):
player = WavePlayer(SIPApplication.voice_audio_bridge.mixer, Resources.get(filename))
notification_center = NotificationCenter()
notification_center.add_observer(self, sender=player)
if self.session.account.rtp.inband_dtmf:
self.audio_stream.bridge.add(player)
SIPApplication.voice_audio_bridge.add(player)
player.start()
......
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