From 474d83e21a2ae03614af946082a1384ed115428f Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Thu, 3 Dec 2015 13:54:40 +0100 Subject: [PATCH] gsm_call_fsm: Add get_callref method to GsmCallFsm ... and obtain the call references into the GsmCallConnector --- gsm_call_fsm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gsm_call_fsm.py b/gsm_call_fsm.py index 92aab7e..83e2599 100644 --- a/gsm_call_fsm.py +++ b/gsm_call_fsm.py @@ -204,6 +204,8 @@ class GsmCallFsm(pykka.ThreadingActor): self.start_mt_call(message['calling'], message['called']) elif message['type'] == 'connect_rtp': self.connect_rtp(message['rtp']) + elif message['type'] == 'get_callref': + return self.callref else: raise Exception('mncc', 'Unknown message %s' % message) @@ -217,6 +219,8 @@ class GsmCallConnector(pykka.ThreadingActor): self.call_a = GsmCallFsm.start(self.mncc_act, self.actor_ref, self.rtp_bridge) print 'Starting Call B actor' self.call_b = GsmCallFsm.start(self.mncc_act, self.actor_ref, self.rtp_bridge) + self.callref_a = self.call_a.ask({'type':'get_callref'}) + self.callref_b = self.call_b.ask({'type':'get_callref'}) self.state_a = self_state_b = 'NULL' self.rtp_a = self.rtp_b = None