Cancel self destruct on provisional responses too (bug #1722)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer 2004-05-26 18:46:36 +00:00
parent 682913a1f3
commit 1b5d2d4667
1 changed files with 11 additions and 4 deletions

View File

@ -5925,9 +5925,13 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
}
switch(resp) {
case 100:
if (!strcasecmp(msg, "INVITE")) {
sip_cancel_destroy(p);
}
break;
case 183:
if (!strcasecmp(msg, "INVITE")) {
sip_cancel_destroy(p);
if (!ast_strlen_zero(get_header(req, "Content-Type")))
process_sdp(p, req);
if (p->owner) {
@ -5937,10 +5941,13 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
}
break;
case 180:
if (p->owner) {
ast_queue_control(p->owner, AST_CONTROL_RINGING);
if (p->owner->_state != AST_STATE_UP)
ast_setstate(p->owner, AST_STATE_RINGING);
if (!strcasecmp(msg, "INVITE")) {
sip_cancel_destroy(p);
if (p->owner) {
ast_queue_control(p->owner, AST_CONTROL_RINGING);
if (p->owner->_state != AST_STATE_UP)
ast_setstate(p->owner, AST_STATE_RINGING);
}
}
break;
case 200: