Get bind ip-s and port-s via stat socket

Dear All,

A have a config, in which there are a stats socket definition and more proxies with the listen/bind/server definitions. Is there any way to get the bind ip and port via a socket command?
However I can get info about the backends, I can not find a way to get the bind properties.
I was able to create a global environment variable and get it with the echo “show env VAR” |socket… command.
But maybe you knows a more elegant solution…
Thank you very much