Skip to content

Commit

Permalink
Fix for apnId not being set
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkneipp committed Oct 21, 2024
1 parent e48101b commit 030dc72
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/diameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 030dc72

Please sign in to comment.