[Asterisk-Dev] Patch: Fix for SIP bug #116
Bisker, Scott (7805)
sbisker at harvardgrp.com
Fri Oct 24 11:43:26 MST 2003
Hello,
Here's a patch that fixes the continuous ringing of a SIP call that is
picked up. It's a one liner. Before hanging up the channel, you need to
tell the phone to stop ringing by setting the state to AST_STATE_DOWN.
Otherwise, the phone keeps ringing.
Scott
--- asterisk/channels/chan_sip.c.orig 2003-10-24 14:17:41.000000000 -0400
+++ asterisk/channels/chan_sip.c 2003-10-24 14:18:09.000000000 -0400
@@ -5013,13 +5013,13 @@
ast_log(LOG_NOTICE, "Nothing
to pick up\n");
transmit_response_reliable(p, "503 Unavailable", req);
p->alreadygone = 1;
- /* Unlock locks so
ast_hangup can do its magic */
- ast_mutex_unlock(&p->lock);
+ /* Unlock locks so
ast_hangup can do its magic */ ast_mutex_unlock(&p->lock);
ast_hangup(c);
ast_mutex_lock(&p->lock);
c = NULL;
} else {
ast_mutex_unlock(&p->lock);
+ ast_setstate(c,
AST_STATE_DOWN);
ast_hangup(c);
ast_mutex_lock(&p->lock);
c = NULL;
More information about the asterisk-dev
mailing list