aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-12 04:59:58 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-12 04:59:58 +0000
commitded760915562a527ae0fd790d55e3d817930159a (patch)
treebeaa5f2e8c500cc95d6adc5dac31f679c69dfc53 /channels/chan_sip.c
parent37bdd7d0afcf32043211deaa5532833ace4bd5b9 (diff)
Handle yet some SIP contact issue nuances and exceptions (bug #5289 with mods and rant)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6747 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rwxr-xr-xchannels/chan_sip.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 1acdd1aec..636f5e999 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -5279,7 +5279,7 @@ static int transmit_register(struct sip_registry *r, int sipmethod, char *auth,
append_history(p, "RegistryInit", tmp);
}
/* Find address to hostname */
- if (create_addr(p,r->hostname)) {
+ if (create_addr(p, r->hostname)) {
/* we have what we hope is a temporary network error,
* probably DNS. We need to reschedule a registration try */
sip_destroy(p);
@@ -10764,12 +10764,14 @@ static int handle_request(struct sip_pvt *p, struct sip_request *req, struct soc
ignore=1;
}
- extract_uri(p, req);
e = ast_skip_blanks(e);
if (sscanf(e, "%d %n", &respid, &len) != 1) {
ast_log(LOG_WARNING, "Invalid response: '%s'\n", e);
} else {
- handle_response(p, respid, e + len, req,ignore, seqno);
+ /* More SIP ridiculousness, we have to ignore bogus contacts in 100 etc responses */
+ if ((respid == 200) || ((respid >= 300) && (respid <= 399)))
+ extract_uri(p, req);
+ handle_response(p, respid, e + len, req, ignore, seqno);
}
return 0;
}