Index: chan_sip.c =================================================================== RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v retrieving revision 1.420 diff -u -r1.420 chan_sip.c --- chan_sip.c 21 Jun 2004 16:52:04 -0000 1.420 +++ chan_sip.c 8 Jul 2004 14:51:18 -0000 @@ -6173,8 +6173,10 @@ contact = __get_header(req, "Contact", &start); /* this loop ensures we get a contact header about our register request */ if(!ast_strlen_zero(contact)) { - if(strstr(contact, p->our_contact)) + if( (tmptmp=strstr(contact, p->our_contact))) { + contact=tmptmp; break; + } } else break; } @@ -6193,6 +6195,7 @@ else expires_ms -= EXPIRY_GUARD_SECS * 1000; + r->refresh= (int) expires_ms / 1000; r->expire=ast_sched_add(sched, expires_ms, sip_reregister, r); } else ast_log(LOG_WARNING, "Got 200 OK on REGISTER that isn't a register\n");