Add dtmf tones
This commit is contained in:
parent
f2a8cefdf9
commit
9e5c0a69ee
|
@ -10,6 +10,7 @@ Currently implemented Features:
|
||||||
* mute the call (`mute-call`)
|
* mute the call (`mute-call`)
|
||||||
* pause the call (`call-pause`)
|
* pause the call (`call-pause`)
|
||||||
* resume the call (`call-resume`)
|
* resume the call (`call-resume`)
|
||||||
|
* play dtmf tones (`dtmf`)
|
||||||
|
|
||||||
|
|
||||||
Features supported by the unix socket (linphone deamon):
|
Features supported by the unix socket (linphone deamon):
|
||||||
|
|
|
@ -101,6 +101,14 @@ class LinphoneCommunicationSocket():
|
||||||
else:
|
else:
|
||||||
raise RuntimeError(answer["error"])
|
raise RuntimeError(answer["error"])
|
||||||
|
|
||||||
|
def dtmf(self, digit):
|
||||||
|
self.socket.send("dtmf {digit}".format(digit=digit).encode("ascii"))
|
||||||
|
answer = self._await_answer()
|
||||||
|
if answer["status"]:
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
raise RuntimeError(answer["error"])
|
||||||
|
|
||||||
def process_event(self):
|
def process_event(self):
|
||||||
self.socket.send("pop-event".encode("ascii"))
|
self.socket.send("pop-event".encode("ascii"))
|
||||||
answer = self._await_answer()
|
answer = self._await_answer()
|
||||||
|
|
Loading…
Reference in a new issue