try: #Check if we have a record-route set as that's where we'll need to send the response
remote_peer = self.get_avp_data(avps, 282)[-1] #Get first record-route header
remote_peer = binascii.unhexlify(remote_peer).decode('utf-8') #Format it
except: #If we don't have a record-route set, we'll send the response to the OriginHost
remote_peer = OriginHost
self.logTool.log(service='HSS', level='debug', message="[diameter.py] [Answer_16777238_272] [CCA] Remote Peer is " + str(remote_peer), redisClient=self.redisMessaging)
remote_peer = remote_peer + ";" + str(self.config['hss']['OriginHost'])
If the peer is coming from a DRA, this will just get the Origin-Host, not the DRA connection,
We'll need to pass the source IP & port through, and then run that through Redis' ActiveDiameterPeers to find the peer.
We get the remote peer based on this:
If the peer is coming from a DRA, this will just get the Origin-Host, not the DRA connection,
We'll need to pass the source IP & port through, and then run that through Redis'
ActiveDiameterPeers
to find the peer.