core: helper functions to get addr and port to be used in signaling from socket info
(cherry picked from commit c725f1dec14863e069bfd1e5c26857a1005528d5)
tm: use advertised addr/port if set for socket in rm rpc uac commands

- reported by Juha Heinanen
(cherry picked from commit 131139883c03f3851ad99e96c59dfe3c349ec011)