Пример #1
0
 def ringtone(self):
     if 'ringtone' not in self.__dict__:
         if set(self.proposed_streams).intersection(['audio', 'video', 'desktop-sharing']):
             sound_file = self.session.account.sounds.inbound_ringtone
             if sound_file is not None and sound_file.path is DefaultPath:
                 settings = SIPSimpleSettings()
                 sound_file = settings.sounds.inbound_ringtone
             ringtone = WavePlayer(SIPApplication.alert_audio_mixer, sound_file.path, volume=sound_file.volume, loop_count=0, pause_time=2.7) if sound_file is not None else Null
             ringtone.bridge = SIPApplication.alert_audio_bridge
         else:
             ringtone = WavePlayer(SIPApplication.alert_audio_mixer, Resources.get('sounds/beeping_ringtone.wav'), volume=70, loop_count=0, pause_time=5)
             ringtone.bridge = SIPApplication.alert_audio_bridge
         self.__dict__['ringtone'] = ringtone
     return self.__dict__['ringtone']
Пример #2
0
 def beeping_ringtone(self):
     if 'beeping_ringtone' not in self.__dict__:
         ringtone = WavePlayer(SIPApplication.voice_audio_mixer, Resources.get('sounds/beeping_ringtone.wav'), volume=70, loop_count=0, pause_time=10)
         ringtone.bridge = SIPApplication.voice_audio_bridge
         self.__dict__['beeping_ringtone'] = ringtone
     return self.__dict__['beeping_ringtone']