Skip to content

Commit

Permalink
Log for ReAuth requests for emergency calls
Browse files Browse the repository at this point in the history
  • Loading branch information
nickvsnetworking committed Dec 21, 2024
1 parent 562c1b5 commit 7807118
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/diameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3130,6 +3130,7 @@ def Answer_16777236_265(self, packet_vars, avps):
emergencySubscriberData = self.database.Get_Emergency_Subscriber(subscriberIp=ueIp)
if emergencySubscriberData:
emergencySubscriber = True
self.logTool.log(service='HSS', level='debug', message="[diameter.py] [Answer_16777236_265] [AAA] emergencySubscriber is True", redisClient=self.redisMessaging)
except Exception as e:
emergencySubscriberData = None

Expand Down Expand Up @@ -3268,12 +3269,14 @@ def Answer_16777236_265(self, packet_vars, avps):
subscriberId = subscriberDetails.get('subscriber_id', None)
if serviceUrn:
if 'sos' in str(serviceUrn).lower():
registeredEmergencySubscriber = True
registeredEmergencySubscriber = True
apnId = (self.database.Get_APN_by_Name(apn="sos")).get('apn_id', None)
self.logTool.log(service='HSS', level='debug', message="[diameter.py] [Answer_16777236_265] [AAA] registeredEmergencySubscriber is True as this is SOS APN", redisClient=self.redisMessaging)
elif ipApnName:
if 'sos' in ipApnName.lower():
registeredEmergencySubscriber = True
apnId = (self.database.Get_APN_by_Name(apn="sos")).get('apn_id', None)
self.logTool.log(service='HSS', level='debug', message="[diameter.py] [Answer_16777236_265] [AAA] registeredEmergencySubscriber is True as this is SOS APN", redisClient=self.redisMessaging)
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)
Expand Down Expand Up @@ -3424,6 +3427,7 @@ def Answer_16777236_265(self, packet_vars, avps):
"""

if emergencySubscriber or registeredEmergencySubscriber:
self.logTool.log(service='HSS', level='debug', message="[diameter.py] [Answer_16777236_265] [AAA] Setting ARP to PreEmpt as this is an emergency bearer", redisClient=self.redisMessaging)
arpPreemptionCapability = True
arpPreemptionVulnerability = False
else:
Expand All @@ -3438,7 +3442,7 @@ def Answer_16777236_265(self, packet_vars, avps):
"mbr_ul": ulBandwidth,
"gbr_ul": ulBandwidth,
"precedence": 40,
"arp_priority": 15,
"arp_priority": 11,
"rule_name": "GBR-Voice_" + str(aarSessionID),
"arp_preemption_vulnerability": arpPreemptionVulnerability,
"gbr_dl": dlBandwidth,
Expand Down

0 comments on commit 7807118

Please sign in to comment.