From: Mark Michelson Date: Thu, 23 Jul 2009 15:43:07 +0000 (+0000) Subject: Properly handle 183 responses which do not contain an SDP. X-Git-Tag: 1.4.26.2~4^2~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb5f3170fcb736d5b28ae21cf927a087241ba903;p=thirdparty%2Fasterisk.git Properly handle 183 responses which do not contain an SDP. (closes issue #15442) Reported by: ffloimair Patches: 15442.patch uploaded by mmichelson (license 60) Tested by: tkarl, ffloimair git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@208262 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 86feacdf36..7e9c8edd2b 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -12680,7 +12680,6 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru case 183: /* Session progress */ if (!ast_test_flag(req, SIP_PKT_IGNORE) && (p->invitestate != INV_CANCELLED) && sip_cancel_destroy(p)) ast_log(LOG_WARNING, "Unable to cancel SIP destruction. Expect bad things.\n"); - /* Ignore 183 Session progress without SDP */ if (find_sdp(req)) { if (p->invitestate != INV_CANCELLED) p->invitestate = INV_EARLY_MEDIA; @@ -12689,6 +12688,18 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru /* Queue a progress frame */ ast_queue_control(p->owner, AST_CONTROL_PROGRESS); } + } else { + /* Alcatel PBXs are known to send 183s with no SDP after sending + * a 100 Trying response. We're just going to treat this sort of thing + * the same as we would treat a 180 Ringing + */ + /*XXX I'm just following the same procedure for a 180 response, which + * doesn't change the invitestate of p. Shouldn't it be INV_PROCEEDING + * though? + */ + if (!ast_test_flag(req, SIP_PKT_IGNORE) && p->owner) { + ast_queue_control(p->owner, AST_CONTROL_RINGING); + } } check_pendings(p); break;