Browse Source

Add function to resume call

master
sqozz 4 years ago
parent
commit
f2a8cefdf9
  1. 1
      README.md
  2. 19
      pylinphone.py

1
README.md

@ -9,6 +9,7 @@ Currently implemented Features: @@ -9,6 +9,7 @@ Currently implemented Features:
* terminate a running call (`terminate`)
* mute the call (`mute-call`)
* pause the call (`call-pause`)
* resume the call (`call-resume`)
Features supported by the unix socket (linphone deamon):

19
pylinphone.py

@ -93,6 +93,14 @@ class LinphoneCommunicationSocket(): @@ -93,6 +93,14 @@ class LinphoneCommunicationSocket():
else:
raise RuntimeError(answer["error"])
def call_resume(self, call_id):
self.socket.send("call-resume {call_id}".format(call_id=call_id).encode("ascii"))
answer = self._await_answer()
if answer["status"]:
return True
else:
raise RuntimeError(answer["error"])
def process_event(self):
self.socket.send("pop-event".encode("ascii"))
answer = self._await_answer()
@ -186,3 +194,14 @@ class LinphoneCommunicationSocket(): @@ -186,3 +194,14 @@ class LinphoneCommunicationSocket():
print("dummy onLinphoneCallOutgoingRinging")
pass
def onLinphoneCallPausing(self, event):
print("dummy onLinphoneCallPausing")
pass
def onLinphoneCallPaused(self, event):
print("dummy onLinphoneCallPaused")
pass
def onLinphoneCallResuming(self, event):
print("dummy onLinphoneCallResuming")
pass

Loading…
Cancel
Save