[svn-commits] file: trunk r111083 - /trunk/channels/chan_sip.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Wed Mar 26 14:29:27 CDT 2008
Author: file
Date: Wed Mar 26 14:29:26 2008
New Revision: 111083
URL: http://svn.digium.com/view/asterisk?view=rev&rev=111083
Log:
Add expiry value to the sip show subscriptions CLI command.
(closes issue #12025)
Reported by: agx
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=111083&r1=111082&r2=111083
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Mar 26 14:29:26 2008
@@ -13146,8 +13146,9 @@
int numchans; /* return value */
};
-#define FORMAT3 "%-15.15s %-10.10s %-15.15s %-15.15s %-13.13s %-15.15s %-10.10s\n"
-#define FORMAT2 "%-15.15s %-10.10s %-15.15s %-15.15s %-7.7s %-15.15s\n"
+#define FORMAT4 "%-15.15s %-10.10s %-15.15s %-15.15s %-13.13s %-15.15s %-10.10s %-6.6d\n"
+#define FORMAT3 "%-15.15s %-10.10s %-15.15s %-15.15s %-13.13s %-15.15s %-10.10s %-6.6s\n"
+#define FORMAT2 "%-15.15s %-10.10s %-15.15s %-15.15s %-7.7s %-15.15s %-6.6s\n"
#define FORMAT "%-15.15s %-10.10s %-15.15s %-15.15s %-3.3s %-3.3s %-15.15s %-10.10s\n"
/*! \brief callback for show channel|subscription */
@@ -13178,14 +13179,15 @@
struct ast_str *mailbox_str = ast_str_alloca(512);
if (cur->subscribed == MWI_NOTIFICATION && cur->relatedpeer)
peer_mailboxes_to_str(&mailbox_str, cur->relatedpeer);
- ast_cli(arg->fd, FORMAT3, ast_inet_ntoa(dst->sin_addr),
+ ast_cli(arg->fd, FORMAT4, ast_inet_ntoa(dst->sin_addr),
S_OR(cur->username, S_OR(cur->cid_num, "(None)")),
cur->callid,
/* the 'complete' exten/context is hidden in the refer_to field for subscriptions */
cur->subscribed == MWI_NOTIFICATION ? "--" : cur->subscribeuri,
cur->subscribed == MWI_NOTIFICATION ? "<none>" : ast_extension_state2str(cur->laststate),
subscription_type2str(cur->subscribed),
- cur->subscribed == MWI_NOTIFICATION ? S_OR(mailbox_str->str, "<none>") : "<none>"
+ cur->subscribed == MWI_NOTIFICATION ? S_OR(mailbox_str->str, "<none>") : "<none>",
+ cur->expiry
);
arg->numchans++;
}
@@ -13218,9 +13220,9 @@
return CLI_SHOWUSAGE;
arg.subscriptions = !strcasecmp(a->argv[e->args - 1], "subscriptions");
if (!arg.subscriptions)
- ast_cli(arg.fd, FORMAT2, "Peer", "User/ANR", "Call ID", "Format", "Hold", "Last Message");
+ ast_cli(arg.fd, FORMAT2, "Peer", "User/ANR", "Call ID", "Format", "Hold", "Last Message", "Expiry");
else
- ast_cli(arg.fd, FORMAT3, "Peer", "User", "Call ID", "Extension", "Last state", "Type", "Mailbox");
+ ast_cli(arg.fd, FORMAT3, "Peer", "User", "Call ID", "Extension", "Last state", "Type", "Mailbox", "Expiry");
/* iterate on the container and invoke the callback on each item */
dialoglist_lock();
More information about the svn-commits
mailing list