[Asterisk-cvs] asterisk/channels chan_sip.c,1.261,1.262
markster at lists.digium.com
markster at lists.digium.com
Tue Dec 9 16:17:37 CST 2003
- Previous message: [Asterisk-cvs] asterisk/channels chan_sip.c,1.260,1.261
- Next message: [Asterisk-cvs] asterisk/channels chan_iax.c,1.42,1.43 chan_iax2.c,1.80,1.81 chan_modem.c,1.17,1.18 chan_nbs.c,1.3,1.4 chan_phone.c,1.21,1.22 chan_vofr.c,1.11,1.12 chan_vpb.c,1.11,1.12 chan_zap.c,1.150,1.151
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv20470/channels
Modified Files:
chan_sip.c
Log Message:
Don't retransmit INVITE on 407 retransmission
Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.261
retrieving revision 1.262
diff -u -d -r1.261 -r1.262
--- chan_sip.c 9 Dec 2003 22:04:23 -0000 1.261
+++ chan_sip.c 9 Dec 2003 22:09:05 -0000 1.262
@@ -4620,7 +4620,7 @@
strncpy(p->owner->call_forward, s, sizeof(p->owner->call_forward) - 1);
}
-static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_request *req)
+static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_request *req, int ignore)
{
char *to;
char *msg, *c;
@@ -4801,9 +4801,12 @@
/* First we ACK */
transmit_request(p, "ACK", seqno, 0);
/* Then we AUTH */
- if ((p->authtries > 1) || do_proxy_auth(p, req, "Proxy-Authenticate", "Proxy-Authorization", "INVITE", 1)) {
- ast_log(LOG_NOTICE, "Failed to authenticate on INVITE to '%s'\n", get_header(&p->initreq, "From"));
- p->needdestroy = 1;
+ /* But only if the packet wasn't marked as ignore in handle_request */
+ if(!ignore){
+ if ((p->authtries > 1) || do_proxy_auth(p, req, "Proxy-Authenticate", "Proxy-Authorization", "INVITE", 1)) {
+ ast_log(LOG_NOTICE, "Failed to authenticate on INVITE to '%s'\n", get_header(&p->initreq, "From"));
+ p->needdestroy = 1;
+ }
}
} else if (!strcasecmp(msg, "BYE") || !strcasecmp(msg, "REFER")) {
if (!strlen(p->peername))
@@ -5376,7 +5379,7 @@
if (sscanf(e, "%i %n", &respid, &len) != 1) {
ast_log(LOG_WARNING, "Invalid response: '%s'\n", e);
} else {
- handle_response(p, respid, e + len, req);
+ handle_response(p, respid, e + len, req,ignore);
}
} else {
transmit_response_with_allow(p, "405 Method Not Allowed", req);
- Previous message: [Asterisk-cvs] asterisk/channels chan_sip.c,1.260,1.261
- Next message: [Asterisk-cvs] asterisk/channels chan_iax.c,1.42,1.43 chan_iax2.c,1.80,1.81 chan_modem.c,1.17,1.18 chan_nbs.c,1.3,1.4 chan_phone.c,1.21,1.22 chan_vofr.c,1.11,1.12 chan_vpb.c,1.11,1.12 chan_zap.c,1.150,1.151
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the svn-commits
mailing list