summaryrefslogtreecommitdiff
path: root/channels
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-05-26 18:46:36 +0000
committerMark Spencer <markster@digium.com>2004-05-26 18:46:36 +0000
commit1b5d2d466702e831f813c493147839540f5109ad (patch)
treef6edf43c0cbd8a5cd32bc657b86066028da1e9f5 /channels
parent682913a1f32be13fd642d9f18fea0792e4480feb (diff)
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
Diffstat (limited to 'channels')
-rwxr-xr-xchannels/chan_sip.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 37830d3d2..85464db33 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -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: