[Asterisk-cvs] asterisk/channels chan_sip.c,1.646,1.647
markster at lists.digium.com
markster at lists.digium.com
Wed Feb 2 23:29:52 CST 2005
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv3132/channels
Modified Files:
chan_sip.c
Log Message:
Show last tx/rx command in sip show channels (bug #3499)
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.646
retrieving revision 1.647
diff -u -d -r1.646 -r1.647
--- chan_sip.c 2 Feb 2005 18:37:36 -0000 1.646
+++ chan_sip.c 3 Feb 2005 05:31:01 -0000 1.647
@@ -6178,8 +6178,8 @@
static int __sip_show_channels(int fd, int argc, char *argv[], int subscriptions)
{
#define FORMAT3 "%-15.15s %-10.10s %-21.21s %-15.15s\n"
-#define FORMAT2 "%-15.15s %-10.10s %-11.11s %-11.11s %s\n"
-#define FORMAT "%-15.15s %-10.10s %-11.11s %5.5d/%5.5d %-6.6s%s\n"
+#define FORMAT2 "%-15.15s %-10.10s %-11.11s %-11.11s %s %s\n"
+#define FORMAT "%-15.15s %-10.10s %-11.11s %5.5d/%5.5d %-6.6s%s %s\n"
struct sip_pvt *cur;
char iabuf[INET_ADDRSTRLEN];
int numchans = 0;
@@ -6188,7 +6188,7 @@
ast_mutex_lock(&iflock);
cur = iflist;
if (!subscriptions)
- ast_cli(fd, FORMAT2, "Peer", "User/ANR", "Call ID", "Seq (Tx/Rx)", "Format");
+ ast_cli(fd, FORMAT2, "Peer", "User/ANR", "Call ID", "Seq (Tx/Rx)", "Format", "Last Msg");
else
ast_cli(fd, FORMAT3, "Peer", "User", "Call ID", "URI");
while (cur) {
@@ -6197,7 +6197,9 @@
ast_strlen_zero(cur->username) ? ( ast_strlen_zero(cur->cid_num) ? "(None)" : cur->cid_num ) : cur->username,
cur->callid,
cur->ocseq, cur->icseq,
- ast_getformatname(cur->owner ? cur->owner->nativeformats : 0), ast_test_flag(cur, SIP_NEEDDESTROY) ? "(d)" : "" );
+ ast_getformatname(cur->owner ? cur->owner->nativeformats : 0),
+ ast_test_flag(cur, SIP_NEEDDESTROY) ? "(d)" : "",
+ cur->lastmsg );
numchans++;
}
if (cur->subscribed && subscriptions) {
More information about the svn-commits
mailing list