From 6fcaf2bb4b7e4033941d9394b4c33b37c7318de9 Mon Sep 17 00:00:00 2001 From: Joshua Colp Date: Mon, 10 Dec 2007 16:13:43 +0000 Subject: [PATCH] It is possible for nativeformats to contain more then one codec, so print out multiple ones. (closes issue #11366) Reported by: ovi git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@92200 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/chan_sip.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 7bcf20d5a7..78c2e8acc3 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10694,11 +10694,12 @@ static int __sip_show_channels(int fd, int argc, char *argv[], int subscriptions referstatus = referstatus2str(cur->refer->status); } if (cur->subscribed == NONE && !subscriptions) { + char formatbuf[BUFSIZ/2]; ast_cli(fd, FORMAT, ast_inet_ntoa(cur->sa.sin_addr), S_OR(cur->username, S_OR(cur->cid_num, "(None)")), cur->callid, - cur->ocseq, cur->icseq, - ast_getformatname(cur->owner ? cur->owner->nativeformats : 0), + cur->ocseq, cur->icseq, + ast_getformatname_multiple(formatbuf, sizeof(formatbuf), cur->owner ? cur->owner->nativeformats : 0), ast_test_flag(&cur->flags[1], SIP_PAGE2_CALL_ONHOLD) ? "Yes" : "No", ast_test_flag(&cur->flags[0], SIP_NEEDDESTROY) ? "(d)" : "", cur->lastmsg ,