|
@@ -129,8 +129,6 @@ def sleep(duration):
|
|
|
dummy_event.wait(timeout=duration)
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
class SipConnection(object):
|
|
|
def say(self, core):
|
|
|
if self._conversation.status is not ConversationStatus.IMTALKING:
|
|
@@ -220,7 +218,7 @@ class SipConnection(object):
|
|
|
call_params = core.create_call_params(call)
|
|
|
os.makedirs(current_dir + "/out")
|
|
|
a_file = current_dir + "/out/call_from_" + slugify(call.remote_address.username) + \
|
|
|
- "_" + datetime.now().strftime(
|
|
|
+ "_" + datetime.now().strftime(
|
|
|
'%Y-%m-%d_%Hh%Mmn%Ss') + ".wav"
|
|
|
|
|
|
log(a_file)
|
|
@@ -310,6 +308,7 @@ if __name__ == "__main__":
|
|
|
for sip_c in connections:
|
|
|
threading.Thread(target=sip_c.start).start()
|
|
|
|
|
|
+
|
|
|
# Ensuring clean quit and ressource releasing
|
|
|
# when receiving ctrl-c from console or SIGTERM
|
|
|
# from daemon manager.
|
|
@@ -319,6 +318,7 @@ if __name__ == "__main__":
|
|
|
for conn in connections:
|
|
|
conn.request_quit()
|
|
|
|
|
|
+
|
|
|
signal.signal(signal.SIGINT, signal_handler)
|
|
|
signal.signal(signal.SIGTERM, signal_handler)
|
|
|
signal.pause()
|