The following is a possibility:
When the Diameter Agent is a Redirect-Agent, the answer message (with command code) from the peer will result in setting of the E-bit, along with result code set to
Let's take an example, let say Diameter Sh Application sends UDR (command code 306) to Diameter Agent which is configured as Redirect. Upon receiving the request, the agent will reply back with UDA (also command code 306), but with E-bit set and result code set to
DIAMETER_REDIRECT_INDICATION, and also the Redirect-Host AVP(s) will be be sent along with it, then the UDR can be re-sent to the host(s) received in the Redirect-Host AVP (maybe after a DNS resolution, and establishment of transport connection with the dynamically discovered peer).
When the peer is configured as proxy agent, the request from the Diameter application will be forwarded to the proper peer (end node) by the proxy server the request is originally sent to, now the reply from the peer will contain Origin-Host and Origin-Realm AVPs, once the reply reaches the originator, the Destination-Host and Destination-Realm AVPs of the request will be filled in using the values from the response message for the next request. This way future requests can be directly sent to the end node.
I believe, there is no other way to distinguish otherwise between a redirect and a proxy agent. Moreover, why to distinguish, when in both cases the message is routed to the intended peer? Let me know your thoughts.