Skip to content
Snippets Groups Projects
Commit b4490af8 authored by Olle Johansson's avatar Olle Johansson
Browse files

Merged revisions 58845 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r58845 | oej | 2007-03-13 11:03:03 +0100 (Tue, 13 Mar 2007) | 3 lines

Don't hangup the call on OK or errors on MESSAGE and INFO 
inside of a dialog (like video update requests).

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@58846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 32f9227c
Branches
Tags
No related merge requests found
...@@ -12891,9 +12891,10 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_ ...@@ -12891,9 +12891,10 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
break; break;
case 200: /* 200 OK */ case 200: /* 200 OK */
p->authtries = 0; /* Reset authentication counter */ p->authtries = 0; /* Reset authentication counter */
if (sipmethod == SIP_MESSAGE) { if (sipmethod == SIP_MESSAGE || sipmethod == SIP_INFO) {
/* We successfully transmitted a message */ /* We successfully transmitted a message
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY); or a video update request in INFO */
/* Nothing happens here - the message is inside a dialog */
} else if (sipmethod == SIP_INVITE) { } else if (sipmethod == SIP_INVITE) {
handle_response_invite(p, resp, rest, req, seqno); handle_response_invite(p, resp, rest, req, seqno);
} else if (sipmethod == SIP_NOTIFY) { } else if (sipmethod == SIP_NOTIFY) {
...@@ -13026,7 +13027,8 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_ ...@@ -13026,7 +13027,8 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
if ((option_verbose > 2) && (resp != 487)) if ((option_verbose > 2) && (resp != 487))
ast_verbose(VERBOSE_PREFIX_3 "Got SIP response %d \"%s\" back from %s\n", resp, rest, ast_inet_ntoa(p->sa.sin_addr)); ast_verbose(VERBOSE_PREFIX_3 "Got SIP response %d \"%s\" back from %s\n", resp, rest, ast_inet_ntoa(p->sa.sin_addr));
stop_media_flows(p); /* Immediately stop RTP, VRTP and UDPTL as applicable */ if (sipmethod == SIP_INVITE)
stop_media_flows(p); /* Immediately stop RTP, VRTP and UDPTL as applicable */
   
/* XXX Locking issues?? XXX */ /* XXX Locking issues?? XXX */
switch(resp) { switch(resp) {
...@@ -13070,14 +13072,15 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_ ...@@ -13070,14 +13072,15 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
break; break;
default: default:
/* Send hangup */ /* Send hangup */
if (owner) if (owner && sipmethod != SIP_MESSAGE && sipmethod != SIP_INFO)
ast_queue_hangup(p->owner); ast_queue_hangup(p->owner);
break; break;
} }
/* ACK on invite */ /* ACK on invite */
if (sipmethod == SIP_INVITE) if (sipmethod == SIP_INVITE)
transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE); transmit_request(p, SIP_ACK, seqno, XMIT_UNRELIABLE, FALSE);
sip_alreadygone(p); if (sipmethod != SIP_MESSAGE && sipmethod != SIP_INFO)
sip_alreadygone(p);
if (!p->owner) if (!p->owner)
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY); ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
} else if ((resp >= 100) && (resp < 200)) { } else if ((resp >= 100) && (resp < 200)) {
...@@ -13133,10 +13136,10 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_ ...@@ -13133,10 +13136,10 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
} }
} else if (sipmethod == SIP_BYE) } else if (sipmethod == SIP_BYE)
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY); ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
else if (sipmethod == SIP_MESSAGE) else if (sipmethod == SIP_MESSAGE || sipmethod == SIP_INFO)
/* We successfully transmitted a message */ /* We successfully transmitted a message or
/* XXX Why destroy this pvt after message transfer? Bad */ a video update request in INFO */
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY); ;
else if (sipmethod == SIP_BYE) else if (sipmethod == SIP_BYE)
/* Ok, we're ready to go */ /* Ok, we're ready to go */
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY); ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment