aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-13 19:10:39 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-13 19:10:39 +0000
commitdf38ac5f932db68c4b4f968b95eb1ae59cab1a9c (patch)
tree81000445cfb9c165f17da4952c9bbaffe9db4941 /channels
parent2b026c19fab6c09987cc711365fb9efb0e8961b8 (diff)
- Don't reply to INVITE already replied to when we get BYE
- Declare errmsg as int. Oops. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@47572 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 3a77d9a4b..452802892 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -10532,7 +10532,7 @@ static void sip_dump_history(struct sip_pvt *dialog)
{
int x = 0;
struct sip_history *hist;
- static errmsg = 0;
+ static int errmsg = 0;
if (!dialog)
return;
@@ -13821,7 +13821,8 @@ static int handle_request_bye(struct sip_pvt *p, struct sip_request *req)
int res;
struct ast_channel *bridged_to;
- if (p->pendinginvite && !ast_test_flag(&p->flags[0], SIP_OUTGOING) && !ast_test_flag(req, SIP_PKT_IGNORE))
+ /* If we have an INCOMING invite that we haven't answered, terminate that transaction */
+ if (p->pendinginvite && !ast_test_flag(&p->flags[0], SIP_OUTGOING) && !ast_test_flag(req, SIP_PKT_IGNORE) && !p->owner)
transmit_response_reliable(p, "487 Request Terminated", &p->initreq);
copy_request(&p->initreq, req);