From 030dc72bbe2c89df98e8f4bfd345fb85c0d4ebcc Mon Sep 17 00:00:00 2001 From: davidkneipp Date: Mon, 21 Oct 2024 14:55:48 +1000 Subject: [PATCH] Fix for apnId not being set --- lib/diameter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/diameter.py b/lib/diameter.py index a8a6ac8f..b5f4346 100755 --- a/lib/diameter.py +++ b/lib/diameter.py @@ -3133,8 +3133,11 @@ def Answer_16777236_265(self, packet_vars, avps): if 'sos' in ipApnName.lower(): registeredEmergencySubscriber = True apnId = (self.database.Get_APN_by_Name(apn="sos")).get('apn_id', None) - else: + if apnId == None: + self.logTool.log(service='HSS', level='debug', message=f"[diameter.py] [Answer_16777236_265] [AAA] Getting ID for ims apn", redisClient=self.redisMessaging) apnId = (self.database.Get_APN_by_Name(apn="ims")).get('apn_id', None) + self.logTool.log(service='HSS', level='debug', message=f"[diameter.py] [Answer_16777236_265] [AAA] ApnID: {apnId}", redisClient=self.redisMessaging) + self.logTool.log(service='HSS', level='debug', message=f"[diameter.py] [Answer_16777236_265] [AAA] Getting Serving APN for subscriberId: {subscriberId} and apnId: {apnId}", redisClient=self.redisMessaging) servingApn = self.database.Get_Serving_APN(subscriber_id=subscriberId, apn_id=apnId) servingPgwPeer = servingApn.get('serving_pgw_peer', None).split(';')[0] servingPgw = servingApn.get('serving_pgw', None)