resource dtmf handling improved

git-svn-id: http://yate.null.ro/svn/yate/trunk@2454 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
maciej 2009-01-23 13:03:14 +00:00
parent 1cf06dd954
commit 45f1b5b75a
1 changed files with 3 additions and 4 deletions

View File

@ -11,7 +11,7 @@ class Resource:
@defer.inlineCallbacks
def play(self, yate, callid, targetid,
stopOnDTMF=False, until = None,
stopOnDTMF = False, until = None,
override = False, *args):
files = self._match(*args)
@ -40,8 +40,7 @@ class Resource:
lambda m : m["id"] == callid,
until = until))
if dtmf:
yield dtmf
break
defer.returnValue(notify)
else:
notify = yield yate.onwatch("chan.notify",
lambda m : m["targetid"] == nid,
@ -54,7 +53,7 @@ class Resource:
stopOnDTMF=False, until = None, *args):
return Resource.play(self, yate, callid, callid, stopOnDTMF,
until, override = True, *args)
until, True, *args)
class StaticResource(Resource):
def __init__(self, attach, desc = None):