Index: channels/chan_sip.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.510.2.41 diff -u -r1.510.2.41 chan_sip.c --- channels/chan_sip.c 17 Jan 2005 19:29:10 -0000 1.510.2.41 +++ channels/chan_sip.c 26 Jan 2005 16:47:19 -0000 @@ -4081,7 +4081,15 @@ } /* Find address to hostname */ if (create_addr(p,r->hostname)) { - sip_destroy(p); + /* we have what we hope is a temporary network error, + * probably DNS. We need to reschedule a registration try */ + sip_destroy(p); + if (r->timeout > -1) { + ast_log(LOG_WARNING, "Still have a registration timeout (create_addr() error), %d\n", r->timeout); + ast_sched_del(sched, r->timeout); + } + r->timeout = ast_sched_add(sched, 20*1000, sip_reg_timeout, r); + return 0; }