aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2015-12-01 22:25:21 +0100
committerHarald Welte <laforge@gnumonks.org>2015-12-01 22:25:21 +0100
commit06de155ee5d4e1b3f096330b7e274d271a07a547 (patch)
tree9dac44a7883c5c9c26c957bc97785a26841243fb
parentfed3e0400fbc31a96dfa395048c927725e9208bd (diff)
gsm_call_fsm: Gracefully handle MNCC_DISC_IND and send MNCC_REL_REQ
-rw-r--r--gsm_call_fsm.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gsm_call_fsm.py b/gsm_call_fsm.py
index c7b7f3b..4ddca3d 100644
--- a/gsm_call_fsm.py
+++ b/gsm_call_fsm.py
@@ -32,6 +32,11 @@ class GsmCallFsm(pykka.ThreadingActor):
msg = mncc_msg(msg_type = mncc.MNCC_SETUP_COMPL_REQ, callref = self.callref)
self.mncc_ref.tell({'type': 'send', 'msg': msg})
+ def _onmncc_disc_ind(self, e):
+ # send MNCC_RELEASE_REQ
+ msg = mncc_msg(msg_type = mncc.MNCC_REL_REQ, callref = self.callref)
+ self.mncc_ref.tell({'type': 'send', 'msg': msg})
+
def _onenter_NULL(self, e):
if e.event != 'startup':
self.stop()
@@ -85,6 +90,7 @@ class GsmCallFsm(pykka.ThreadingActor):
],
callbacks = [('onmncc_setup_req', self._onmncc_setup_req),
('onmncc_setup_cnf', self._onmncc_setup_cnf),
+ ('onmncc_disc_ind', self._onmncc_disc_ind),
('onenterNULL', self._onenter_NULL),
],
)