if (!strcasecmp(colname, "ip")) {
ast_copy_string(buf, peer->addr.sin_addr.s_addr ? ast_inet_ntoa(peer->addr.sin_addr) : "", len);
+ } else if (!strcasecmp(colname, "port")) {
+ snprintf(buf, len, "%d", ntohs(peer->addr.sin_port));
} else if (!strcasecmp(colname, "status")) {
peer_status(peer, buf, len);
} else if (!strcasecmp(colname, "language")) {
.read = function_sippeer,
.desc = "Valid items are:\n"
"- ip (default) The IP address.\n"
+ "- port The port number\n"
"- mailbox The configured mailbox.\n"
"- context The configured context.\n"
"- expire The epoch time of the next expire.\n"