summaryrefslogtreecommitdiff
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-04-02 21:43:07 +0000
committerMark Spencer <markster@digium.com>2004-04-02 21:43:07 +0000
commitb285cd40b299ba24ae37d0c44e8a37b54518fd46 (patch)
treecc24eeebb65ee74202e97df8cf7976e080b59b79 /channels/chan_sip.c
parent3415434e04ac0ef95c0387d181f338567832ee08 (diff)
Keep REGISTER dialog open a little longer in case they don't get our 200 OK right away...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/chan_sip.c')
-rwxr-xr-xchannels/chan_sip.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 35a355325..4957b5895 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -3685,7 +3685,7 @@ static int check_auth(struct sip_pvt *p, struct sip_request *req, char *randdata
/* Always OK if no secret */
if (!strlen(secret) && !strlen(md5secret))
return 0;
- if (ignore) {
+ if (ignore && strlen(randdata) && !strlen(get_header(req, "Proxy-Authorization"))) {
/* This is a retransmitted invite/register/etc, don't reconstruct authentication
information */
if (strlen(randdata)) {
@@ -5663,7 +5663,9 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
if ((res = register_verify(p, sin, req, e, ignore)) < 0)
ast_log(LOG_NOTICE, "Registration from '%s' failed for '%s'\n", get_header(req, "To"), inet_ntoa(sin->sin_addr));
if (res < 1) {
- p->needdestroy = 1;
+ /* Destroy the session, but keep us around for just a bit in case they don't
+ get our 200 OK */
+ sip_scheddestroy(p, 15*1000);
}
} else if (!strcasecmp(cmd, "ACK")) {
/* Uhm, I haven't figured out the point of the ACK yet. Are we