gsm_call_fsm: Add get_callref method to GsmCallFsm

... and obtain the call references into the GsmCallConnector
This commit is contained in:
Harald Welte 2015-12-03 13:54:40 +01:00
parent 79b7947191
commit 474d83e21a
1 changed files with 4 additions and 0 deletions

View File

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