diff options
author | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-11 08:25:20 +0000 |
---|---|---|
committer | oej <oej@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-05-11 08:25:20 +0000 |
commit | 93056e6eedec15e07feb842c20507563eb506003 (patch) | |
tree | cceabf6277424430dbfe100f258852a4536ae994 /channels | |
parent | 955756504c2b2706482d3570dcfb649c8de61bc0 (diff) |
Ignore CANCEL on call that is already answered
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26757 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index e9cf9874a..137c35374 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11436,6 +11436,14 @@ static int handle_request_cancel(struct sip_pvt *p, struct sip_request *req) check_via(p, req); ast_set_flag(&p->flags[0], SIP_ALREADYGONE); + + if (p->owner && p->owner->_state == AST_STATE_UP) { + /* This call is up, cancel is ignored, we need a bye */ + transmit_response(p, "200 OK", req); + if (option_debug) + ast_log(LOG_DEBUG, "Got CANCEL on an answered call. Ignoring... \n"); + return 0; + } if (p->rtp) { /* Immediately stop RTP */ ast_rtp_stop(p->rtp); |