Fix /dtmf command
This commit is contained in:
parent
23ab28d76f
commit
845d310c9b
1 changed files with 4 additions and 4 deletions
|
@ -123,14 +123,14 @@ class JingleRTPContent(JingleContent):
|
||||||
if self._dtmf_running:
|
if self._dtmf_running:
|
||||||
raise Exception # TODO: Proper exception
|
raise Exception # TODO: Proper exception
|
||||||
self._dtmf_running = True
|
self._dtmf_running = True
|
||||||
self._start_dtmf(events.pop(0))
|
self._start_dtmf(events[-1])
|
||||||
gobject.timeout_add(500, self._next_dtmf, events)
|
gobject.timeout_add(500, self._next_dtmf, events[:-1])
|
||||||
|
|
||||||
def _next_dtmf(self, events):
|
def _next_dtmf(self, events):
|
||||||
self._stop_dtmf()
|
self._stop_dtmf()
|
||||||
if events:
|
if events:
|
||||||
self._start_dtmf(events.pop(0))
|
self._start_dtmf(events[-1])
|
||||||
gobject.timeout_add(500, self._next_dtmf, events)
|
gobject.timeout_add(500, self._next_dtmf, events[:-1])
|
||||||
else:
|
else:
|
||||||
self._dtmf_running = False
|
self._dtmf_running = False
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue