diff options
author | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-20 11:05:33 +0000 |
---|---|---|
committer | root <root@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-06-20 11:05:33 +0000 |
commit | c308bfbaba4a539f223d62b2fd94229557b9c50b (patch) | |
tree | 943b12ef4208c317e2e535d5786a7743c81a86b9 | |
parent | 17cf4c0ff84484081c4869bdc175f6d74ecb44ad (diff) |
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@35092 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r-- | channels/chan_sip.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 08dc5e4f5..ba53fb936 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -9678,14 +9678,16 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru switch (resp) { case 100: /* Trying */ - sip_cancel_destroy(p); + if (!ignore) + sip_cancel_destroy(p); /* must call check_pendings before setting CAN_BYE, so that if PENDINGBYE is set it will know to send CANCEL instead */ check_pendings(p); ast_set_flag(p, SIP_CAN_BYE); break; case 180: /* 180 Ringing */ - sip_cancel_destroy(p); + if (!ignore) + sip_cancel_destroy(p); if (!ignore && p->owner) { ast_queue_control(p->owner, AST_CONTROL_RINGING); if (p->owner->_state != AST_STATE_UP) @@ -9704,7 +9706,8 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru ast_set_flag(p, SIP_CAN_BYE); break; case 183: /* Session progress */ - sip_cancel_destroy(p); + if (!ignore) + sip_cancel_destroy(p); /* Ignore 183 Session progress without SDP */ if (find_sdp(req)) { process_sdp(p, req); @@ -9719,7 +9722,8 @@ static void handle_response_invite(struct sip_pvt *p, int resp, char *rest, stru ast_set_flag(p, SIP_CAN_BYE); break; case 200: /* 200 OK on invite - someone's answering our call */ - sip_cancel_destroy(p); + if (!ignore) + sip_cancel_destroy(p); p->authtries = 0; if (find_sdp(req)) { process_sdp(p, req); @@ -10187,7 +10191,8 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_ ast_set_flag(p, SIP_NEEDDESTROY); } else if ((resp >= 100) && (resp < 200)) { if (sipmethod == SIP_INVITE) { - sip_cancel_destroy(p); + if (!ignore) + sip_cancel_destroy(p); if (find_sdp(req)) process_sdp(p, req); if (p->owner) { @@ -10247,9 +10252,9 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_ break; default: /* Errors without handlers */ if ((resp >= 100) && (resp < 200)) { - if (sipmethod == SIP_INVITE) { /* re-invite */ + if (sipmethod == SIP_INVITE && !ignore) /* re-invite */ sip_cancel_destroy(p); - } + } if ((resp >= 300) && (resp < 700)) { if ((option_verbose > 2) && (resp != 487)) @@ -10260,7 +10265,7 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_ case 500: /* Server error */ case 503: /* Service Unavailable */ - if (sipmethod == SIP_INVITE) { /* re-invite failed */ + if (sipmethod == SIP_INVITE && !ignore) { /* re-invite failed */ sip_cancel_destroy(p); } break; @@ -11439,7 +11444,7 @@ retrylock: if (recordhistory) { char tmp[80]; /* This is a response, note what it was for */ - snprintf(tmp, sizeof(tmp), "%s / %s", req.data, get_header(&req, "CSeq")); + snprintf(tmp, sizeof(tmp), "%s / %s /%s", req.data, get_header(&req, "CSeq"), req.rlPart2); append_history(p, "Rx", tmp); } nounlock = 0; |