--- chan_sip.c.orig 2008-01-02 21:24:09.000000000 +0100 +++ chan_sip.c 2008-02-19 12:36:41.000000000 +0100 @@ -10705,9 +10705,10 @@ /*! \brief SIP show channels CLI (main function) */ static int __sip_show_channels(int fd, int argc, char *argv[], int subscriptions) { -#define FORMAT3 "%-15.15s %-10.10s %-11.11s %-15.15s %-13.13s %-15.15s %-10.10s\n" -#define FORMAT2 "%-15.15s %-10.10s %-11.11s %-11.11s %-15.15s %-7.7s %-15.15s\n" -#define FORMAT "%-15.15s %-10.10s %-11.11s %5.5d/%5.5d %-15.15s %-3.3s %-3.3s %-15.15s %-10.10s\n" +#define FORMAT3L "%-15.15s %-10.10s %-11.11s %-15.15s %-13.13s %-15.15s %-10.10s %6d\n" +#define FORMAT3H "%-15.15s %-10.10s %-11.11s %-15.15s %-13.13s %-15.15s %-10.10s %-6s\n" +#define FORMAT2 "%-15.15s %-10.10s %-11.11s %-11.11s %-15.15s %-7.7s %-15.15s\n" +#define FORMAT "%-15.15s %-10.10s %-11.11s %5.5d/%5.5d %-15.15s %-3.3s %-3.3s %-15.15s %-10.10s\n" struct sip_pvt *cur; int numchans = 0; char *referstatus = NULL; @@ -10719,7 +10720,7 @@ if (!subscriptions) ast_cli(fd, FORMAT2, "Peer", "User/ANR", "Call ID", "Seq (Tx/Rx)", "Format", "Hold", "Last Message"); else - ast_cli(fd, FORMAT3, "Peer", "User", "Call ID", "Extension", "Last state", "Type", "Mailbox"); + ast_cli(fd, FORMAT3H, "Peer", "User", "Call ID", "Extension", "Last state", "Type", "Mailbox", "Expiry"); for (; cur; cur = cur->next) { referstatus = ""; if (cur->refer) { /* SIP transfer in progress */ @@ -10740,14 +10741,15 @@ numchans++; } if (cur->subscribed != NONE && subscriptions) { - ast_cli(fd, FORMAT3, ast_inet_ntoa(cur->sa.sin_addr), + ast_cli(fd, FORMAT3L, ast_inet_ntoa(cur->sa.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 ? "" : ast_extension_state2str(cur->laststate), subscription_type2str(cur->subscribed), - cur->subscribed == MWI_NOTIFICATION ? (cur->relatedpeer ? cur->relatedpeer->mailbox : "") : "" + cur->subscribed == MWI_NOTIFICATION ? (cur->relatedpeer ? cur->relatedpeer->mailbox : "") : "", + cur->expiry ); numchans++; }