diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-31 15:07:36 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-03-31 15:07:36 +0000 |
commit | 4dcb4752f02a208894a3e43aeac227a9ee2cbd08 (patch) | |
tree | ff7a8eb10423a65bdf19b0084273c73bab0882ea /channels | |
parent | 40e6d8e38162351aa245dd0c3ecaa924a4645c38 (diff) |
Don't accept new INVITE if we already have one pending.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16688 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index fea0f551a..ef400864d 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -10584,6 +10584,16 @@ static int handle_request_invite(struct sip_pvt *p, struct sip_request *req, int /* We do NOT destroy p here, so that our response will be accepted */ return 0; } + + if (!ignore && p->pendinginvite) { + /* We already have a pending invite. Sorry. You are on hold. */ + transmit_response(p, "491 Request Pending", req); + if (option_debug > 1) + ast_log(LOG_DEBUG, "Got INVITE on call where we already have pending INVITE, deferring that - %s\n", p->callid); + /* Do NOT destroy dialog */ + return 0; + } + if (!ignore) { /* Use this as the basis */ if (debug) |