Fix /dtmf command

This commit is contained in:
Thibaut GIRKA 2010-03-21 22:06:10 +01:00
parent 23ab28d76f
commit 845d310c9b
1 changed files with 4 additions and 4 deletions

View File

@ -123,14 +123,14 @@ class JingleRTPContent(JingleContent):
if self._dtmf_running:
raise Exception # TODO: Proper exception
self._dtmf_running = True
self._start_dtmf(events.pop(0))
gobject.timeout_add(500, self._next_dtmf, events)
self._start_dtmf(events[-1])
gobject.timeout_add(500, self._next_dtmf, events[:-1])
def _next_dtmf(self, events):
self._stop_dtmf()
if events:
self._start_dtmf(events.pop(0))
gobject.timeout_add(500, self._next_dtmf, events)
self._start_dtmf(events[-1])
gobject.timeout_add(500, self._next_dtmf, events[:-1])
else:
self._dtmf_running = False