Index: channels/chan_sip.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.882 diff -u -r1.882 chan_sip.c --- channels/chan_sip.c 5 Oct 2005 01:40:01 -0000 1.882 +++ channels/chan_sip.c 11 Oct 2005 22:02:36 -0000 @@ -5271,7 +5271,7 @@ 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); @@ -10751,12 +10751,13 @@ 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); + if (respid == 200) + extract_uri(p, req); + handle_response(p, respid, e + len, req, ignore, seqno); } return 0; }