sipreg: call response handler also for expires zero
The Cisco REGISTER keep-alives detect that a SIP proxy becomes available again.
This has to be reported to the response handler in baresip.
@@ -244,12 +244,15 @@ static void response_handler(int err, const struct sip_msg *msg, void *arg)
if (msg && msg->scode >= 400 && msg->scode < 500)
reg->fbregint = 0;
- if (!reg->terminated && reg->fbregint)
+ if (!reg->terminated && reg->fbregint) {
tmr_start(&reg->tmr, reg->fbregint * 1000, tmr_handler,
reg);
- else if (reg->terminated)
+ reg->resph(err, msg, reg->arg);
+ }
+ else if (reg->terminated) {
mem_deref(reg);
}
+ }
else if (reg->terminated) {
if (!reg->registered || request(reg, true))
mem_deref(reg);
