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);
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;
}