diff options
author | Mark Spencer <markster@digium.com> | 2003-04-06 04:23:18 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2003-04-06 04:23:18 +0000 |
commit | c35b05dd302c4dc79b12683f1eb54602c73c6833 (patch) | |
tree | fb52e1eef0c0d34b75ea70b47b27b198b0b760ab /channels | |
parent | 9f8cab83a3c808c8303e23eb49bd4a6219c32da7 (diff) |
Fix chan_local build, update SIP
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@754 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rwxr-xr-x | channels/chan_local.c | 1 | ||||
-rwxr-xr-x | channels/chan_sip.c | 14 |
2 files changed, 12 insertions, 3 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c index ddad32ae4..44af9fc82 100755 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -115,7 +115,6 @@ static int local_write(struct ast_channel *ast, struct ast_frame *f) { struct local_pvt *p = ast->pvt->pvt; int res = -1; - ast_pthread_mutex_lock(&p->lock); int isoutbound = IS_OUTBOUND(ast, p); /* Just queue for delivery to the other side */ diff --git a/channels/chan_sip.c b/channels/chan_sip.c index c8c25f0e6..e57460c23 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -900,7 +900,7 @@ static int sip_hangup(struct ast_channel *ast) p->needdestroy = 0; sip_scheddestroy(p, 15000); } else - transmit_response_reliable(p, "480 Temporarily Unavailable", &p->initreq); + transmit_response_reliable(p, "403 Forbidden", &p->initreq); } else { /* Send a hangup */ transmit_request(p, "BYE", 1, 1); @@ -3996,7 +3996,17 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc transmit_request(p, "BYE", 1, 1); p->alreadygone = 1; } - } else if (!strcasecmp(cmd, "CANCEL") || !strcasecmp(cmd, "BYE")) { + } else if (!strcasecmp(cmd, "CANCEL")) { + p->alreadygone = 1; + if (p->rtp) { + /* Immediately stop RTP */ + ast_rtp_stop(p->rtp); + } + if (p->owner) + ast_queue_hangup(p->owner, 0); + transmit_response(p, "200 OK", req); + transmit_response_reliable(p, "487 Request Terminated", &p->initreq); + } else if (!strcasecmp(cmd, "BYE")) { copy_request(&p->initreq, req); p->alreadygone = 1; if (p->rtp) { |