aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-12 21:00:31 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-04-12 21:00:31 +0000
commit8d8e122c61c5ab217022581395b04688ddcc203e (patch)
treedc4dc41159b43a078e3640ced087d972f274ab05 /channels/chan_sip.c
parent2ca2aa523c2d29bc443408b49caafc665f41c070 (diff)
Fix for Polycom bug...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@19549 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r--channels/chan_sip.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 480d952be..7e9300dc7 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -350,6 +350,8 @@ static const struct cfsip_options {
} sip_options[] = { /* XXX used in 3 places */
/* Replaces: header for transfer */
{ SIP_OPT_REPLACES, SUPPORTED, "replaces" },
+ /* One version of Polycom firmware has the wrong label */
+ { SIP_OPT_REPLACES, SUPPORTED, "replace" },
/* RFC3262: PRACK 100% reliability */
{ SIP_OPT_100REL, NOT_SUPPORTED, "100rel" },
/* SIP Session Timers */
@@ -8167,9 +8169,13 @@ static int _sip_show_peer(int type, int fd, struct mansession *s, struct message
ast_cli(fd, " Def. Username: %s\n", peer->username);
ast_cli(fd, " SIP Options : ");
if (peer->sipoptions) {
+ int lastoption = -1;
for (x=0 ; (x < (sizeof(sip_options) / sizeof(sip_options[0]))); x++) {
- if (peer->sipoptions & sip_options[x].id)
- ast_cli(fd, "%s ", sip_options[x].text);
+ if (sip_options[x].id != lastoption) {
+ if (peer->sipoptions & sip_options[x].id)
+ ast_cli(fd, "%s ", sip_options[x].text);
+ lastoption = x;
+ }
}
} else
ast_cli(fd, "(none)");