Module: kamailio
Branch: master
Commit: 4fb8accc6747ad56fec3dc84d70cb2b8bbd7316e
URL:
https://github.com/kamailio/kamailio/commit/4fb8accc6747ad56fec3dc84d70cb2b…
Author: herlesupreeth <herlesupreeth(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2024-02-28T17:24:15+01:00
ims_registrar_pcscf: update registered state to pending registration if contact exists
---
Modified: src/modules/ims_registrar_pcscf/save.c
---
Diff:
https://github.com/kamailio/kamailio/commit/4fb8accc6747ad56fec3dc84d70cb2b…
Patch:
https://github.com/kamailio/kamailio/commit/4fb8accc6747ad56fec3dc84d70cb2b…
---
diff --git a/src/modules/ims_registrar_pcscf/save.c
b/src/modules/ims_registrar_pcscf/save.c
index 7e425230d0d..679abc99ca5 100644
--- a/src/modules/ims_registrar_pcscf/save.c
+++ b/src/modules/ims_registrar_pcscf/save.c
@@ -477,8 +477,15 @@ int save_pending(struct sip_msg *_m, udomain_t *_d)
ul.unlock_udomain(_d, &ci.via_host, ci.via_port, ci.via_prot);
return -2;
}
- } else {
- LM_DBG("Contact already exists - not doing anything for now\n");
+ } else if(pcontact->reg_state == PCONTACT_DEREG_PENDING_PUBLISH) {
+ LM_DBG("Contact already exists - Updating contact [%.*s]: setting "
+ "state to PCONTACT_REG_PENDING\n",
+ pcontact->aor.len, pcontact->aor.s);
+
+ memset(&ci_, 0, sizeof(struct pcontact_info));
+ ci_.reg_state = PCONTACT_REG_PENDING;
+ ci_.num_service_routes = 0;
+ ul.update_pcontact(_d, &ci_, pcontact);
}
}