summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlle Johansson <oej@edvina.net>2006-04-03 10:50:56 +0000
committerOlle Johansson <oej@edvina.net>2006-04-03 10:50:56 +0000
commit67b460d43c89a12816253c43f7a1625503d1af8f (patch)
tree87a41bd7e1ddfe9c832db51357dc8df78cc4a8b3
parentf4da57920189bb9d64c22636d8aff4475d91fc0d (diff)
Issue #6848 - Accept MWI subscriptions with no Accept: header
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--channels/chan_sip.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 2661c900b..84302ce2d 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -11084,7 +11084,15 @@ static int handle_request_subscribe(struct sip_pvt *p, struct sip_request *req,
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
return 0;
}
- } else if (!strcmp(event, "message-summary") && !strcmp(accept, "application/simple-message-summary")) {
+ } else if (!strcmp(event, "message-summary")) {
+ if (!ast_strlen_zero(accept) && strcmp(accept, "application/simple-message-summary")) {
+ /* Format requested that we do not support */
+ transmit_response(p, "406 Not Acceptable", req);
+ if (option_debug > 1)
+ ast_log(LOG_DEBUG, "Received SIP mailbox subscription for unknown format: %s\n", accept);
+ ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
+ return 0;
+ }
/* Looks like they actually want a mailbox status
This version of Asterisk supports mailbox subscriptions
The subscribed URI needs to exist in the dial plan