[asterisk-commits] oej: trunk r48983 - in /trunk: ./
channels/chan_sip.c configs/sip.conf.sample
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Dec 27 09:56:11 MST 2006
Author: oej
Date: Wed Dec 27 10:56:11 2006
New Revision: 48983
URL: http://svn.digium.com/view/asterisk?view=rev&rev=48983
Log:
Add support for buggy Cisco MWI firmware > 8.0.3 (issue 8575 - flewid)
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
trunk/configs/sip.conf.sample
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=48983&r1=48982&r2=48983
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Dec 27 10:56:11 2006
@@ -778,10 +778,12 @@
#define SIP_PAGE2_CALL_ONHOLD (3 << 23) /*!< Call states */
#define SIP_PAGE2_CALL_ONHOLD_ONEDIR (1 << 23) /*!< 23: One directional hold */
#define SIP_PAGE2_CALL_ONHOLD_INACTIVE (1 << 24) /*!< 24: Inactive */
-#define SIP_PAGE2_RFC2833_COMPENSATE (1 << 25)
+#define SIP_PAGE2_RFC2833_COMPENSATE (1 << 25) /*!< 25: ???? */
+#define SIP_PAGE2_BUGGY_CISCO_MWI (1 << 26) /*!< 26: Buggy CISCO MWI fix */
#define SIP_PAGE2_FLAGS_TO_COPY \
- (SIP_PAGE2_ALLOWSUBSCRIBE | SIP_PAGE2_ALLOWOVERLAP | SIP_PAGE2_VIDEOSUPPORT | SIP_PAGE2_T38SUPPORT | SIP_PAGE2_RFC2833_COMPENSATE)
+ (SIP_PAGE2_ALLOWSUBSCRIBE | SIP_PAGE2_ALLOWOVERLAP | SIP_PAGE2_VIDEOSUPPORT | \
+ SIP_PAGE2_T38SUPPORT | SIP_PAGE2_RFC2833_COMPENSATE | SIP_PAGE2_BUGGY_CISCO_MWI)
/* SIP packet flags */
#define SIP_PKT_DEBUG (1 << 0) /*!< Debug this packet */
@@ -7065,7 +7067,11 @@
ast_build_string(&t, &maxbytes, "Messages-Waiting: %s\r\n", newmsgs ? "yes" : "no");
ast_build_string(&t, &maxbytes, "Message-Account: sip:%s@%s\r\n",
S_OR(vmexten, default_vmexten), S_OR(p->fromdomain, ast_inet_ntoa(p->ourip)));
- ast_build_string(&t, &maxbytes, "Voice-Message: %d/%d (0/0)\r\n", newmsgs, oldmsgs);
+ /* Cisco has a bug in the SIP stack where it can't accept the
+ (0/0) notification. This can temporarily be disabled in
+ sip.conf with the "buggyciscomwi" option */
+ ast_build_string(&t, &maxbytes, "Voice-Message: %d/%d%s\r\n", newmsgs, oldmsgs, (ast_test_flag(&p->flags[1], SIP_PAGE2_BUGGY_CISCO_MWI) ? "" : " (0/0)"));
+
if (p->subscribed) {
if (p->expiry)
add_header(&req, "Subscription-State", "active");
@@ -15540,6 +15546,10 @@
} else if (!strcasecmp(v->name, "rfc2833compensate")) {
ast_set_flag(&mask[1], SIP_PAGE2_RFC2833_COMPENSATE);
ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_RFC2833_COMPENSATE);
+ res = 1;
+ } else if (!strcasecmp(v->name, "buggyciscomwi")) {
+ ast_set_flag(&mask[1], SIP_PAGE2_BUGGY_CISCO_MWI);
+ ast_set2_flag(&flags[1], ast_true(v->value), SIP_PAGE2_BUGGY_CISCO_MWI);
res = 1;
}
Modified: trunk/configs/sip.conf.sample
URL: http://svn.digium.com/view/asterisk/trunk/configs/sip.conf.sample?view=diff&rev=48983&r1=48982&r2=48983
==============================================================================
--- trunk/configs/sip.conf.sample (original)
+++ trunk/configs/sip.conf.sample Wed Dec 27 10:56:11 2006
@@ -70,6 +70,9 @@
; Defaults to 100 ms
;notifymimetype=text/plain ; Allow overriding of mime type in MWI NOTIFY
;checkmwi=10 ; Default time between mailbox checks for peers
+;buggyciscomwi=no ; Cisco SIP firmware doesn't support the MWI RFC
+ ; fully. Enable this option to not get error messages
+ ; when sending MWI to phones with this bug.
;vmexten=voicemail ; dialplan extension to reach mailbox sets the
; Message-Account in the MWI notify message
; defaults to "asterisk"
More information about the asterisk-commits
mailing list