Terminate CallConnector when both GsmCallFsm enter NULL state again

This commit is contained in:
Harald Welte 2015-12-05 16:12:26 +01:00
parent e5d8b99fe7
commit 1b26694bca
1 changed files with 3 additions and 0 deletions

View File

@ -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':