Skip to content
Snippets Groups Projects
Commit 0653be0c authored by Olle Johansson's avatar Olle Johansson
Browse files

Add port number to SIPPEER dialplan function

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@54348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent bc7e4c2e
No related branches found
No related tags found
No related merge requests found
...@@ -11696,6 +11696,8 @@ static int function_sippeer(struct ast_channel *chan, const char *cmd, char *dat ...@@ -11696,6 +11696,8 @@ static int function_sippeer(struct ast_channel *chan, const char *cmd, char *dat
   
if (!strcasecmp(colname, "ip")) { if (!strcasecmp(colname, "ip")) {
ast_copy_string(buf, peer->addr.sin_addr.s_addr ? ast_inet_ntoa(peer->addr.sin_addr) : "", len); 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")) { } else if (!strcasecmp(colname, "status")) {
peer_status(peer, buf, len); peer_status(peer, buf, len);
} else if (!strcasecmp(colname, "language")) { } else if (!strcasecmp(colname, "language")) {
...@@ -11749,6 +11751,7 @@ struct ast_custom_function sippeer_function = { ...@@ -11749,6 +11751,7 @@ struct ast_custom_function sippeer_function = {
.read = function_sippeer, .read = function_sippeer,
.desc = "Valid items are:\n" .desc = "Valid items are:\n"
"- ip (default) The IP address.\n" "- ip (default) The IP address.\n"
"- port The port number\n"
"- mailbox The configured mailbox.\n" "- mailbox The configured mailbox.\n"
"- context The configured context.\n" "- context The configured context.\n"
"- expire The epoch time of the next expire.\n" "- expire The epoch time of the next expire.\n"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment