aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-12-05 16:12:26 +0100
committerHarald Welte <laforge@gnumonks.org>2015-12-05 16:12:26 +0100
commit1b26694bca735fdc3b56c92dd58ccab32af25acc (patch)
tree47765fdd728bf004421b80455b0f7e56bd30927f
parente5d8b99fe7247cc27d8890995bacff7caf8d6866 (diff)
Terminate CallConnector when both GsmCallFsm enter NULL state again
-rw-r--r--gsm_call_fsm.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/gsm_call_fsm.py b/gsm_call_fsm.py
index 97e1756..ed89187 100644
--- a/gsm_call_fsm.py
+++ b/gsm_call_fsm.py
@@ -358,6 +358,9 @@ class GsmCallConnector(pykka.ThreadingActor):
self.state_b = new_state
if self.rtp_bridge == False and self.state_a == 'ACTIVE' and self.state_b == 'ACTIVE':
self.bridge_legs()
+ if self.state_a == 'NULL' and self.state_b == 'NULL':
+ print 'Both A and B in state NULL -> Terminating'
+ self.stop()
def on_receive(self, message):
if message['type'] == 'call_state_change':