aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authoroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-15 20:26:05 +0000
committeroej <oej@f38db490-d61c-443f-a65b-d21fe96a405b>2008-04-15 20:26:05 +0000
commitde43b7957a8571a012c8a6a9035ee48d6b85edd6 (patch)
treea4d7ee714fce0a4fe83fa292cd05a8dbcc1ad041 /channels
parent78ed2c90e1df7498495d3bec487aeee43f047b93 (diff)
Handle subscribe queues in all situations... Thanks to festr_ on irc for telling me about this bug.
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@114148 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 03f5ae091..0f1343877 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -12973,7 +12973,12 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
/* ast_queue_hangup(p->owner); Disabled */
} else {
if (!p->subscribed && !p->refer)
- ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
+ ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);
+ if (ast_test_flag(&p->flags[1], SIP_PAGE2_STATECHANGEQUEUE)) {
+ /* Ready to send the next state we have on queue */
+ ast_clear_flag(&p->flags[1], SIP_PAGE2_STATECHANGEQUEUE);
+ cb_extensionstate((char *)p->context, (char *)p->exten, p->laststate, (void *) p);
+ }
}
} else if (sipmethod == SIP_BYE)
ast_set_flag(&p->flags[0], SIP_NEEDDESTROY);