Module: kamailio
Branch: master
Commit: b80314b94b39a8735dca366cd64d55a64304b9f0
URL:
https://github.com/kamailio/kamailio/commit/b80314b94b39a8735dca366cd64d55a…
Author: Carsten Bock <carsten(a)ng-voice.com>
Committer: Carsten Bock <carsten(a)ng-voice.com>
Date: 2014-12-18T11:35:28+01:00
ims_icscf: Comply with RFC3261: If no contact-header is present, this is not an error, the
UA is just fetching bindings.
See:
http://tools.ietf.org/html/rfc3261#section-10.2.3
---
Modified: modules/ims_icscf/registration.c
---
Diff:
https://github.com/kamailio/kamailio/commit/b80314b94b39a8735dca366cd64d55a…
Patch:
https://github.com/kamailio/kamailio/commit/b80314b94b39a8735dca366cd64d55a…
---
diff --git a/modules/ims_icscf/registration.c b/modules/ims_icscf/registration.c
index 8940dc8..b9d1df5 100644
--- a/modules/ims_icscf/registration.c
+++ b/modules/ims_icscf/registration.c
@@ -127,22 +127,20 @@ int I_perform_user_authorization_request(struct sip_msg* msg, char*
route, char*
b = cscf_parse_contacts(msg);
if (!b || (!b->contacts && !b->star)) {
- LM_DBG("DBG:I_UAR: No contacts found\n");
- return CSCF_RETURN_ERROR;
- }
-
- for (c = b->contacts; c; c = c->next) {
-
- sos_reg = cscf_get_sos_uri_param(c->uri);
- if (sos_reg == -1) {
- //error case
- LM_ERR("ERR:I_UAR: MSG_400_MALFORMED_CONTACT, responding with
400\n");
- cscf_reply_transactional(msg, 400, MSG_400_MALFORMED_CONTACT);
- return CSCF_RETURN_BREAK;
- } else if (sos_reg == -2) {
- LM_ERR("ERR:I_UAR: MSG_500_SERVER_ERROR_OUT_OF_MEMORY, responding with
500\n");
- cscf_reply_transactional(msg, 500, MSG_500_SERVER_ERROR_OUT_OF_MEMORY);
- return CSCF_RETURN_BREAK;
+ LM_DBG("DBG:I_UAR: No contacts found - just fetching bindings\n");
+ } else {
+ for (c = b->contacts; c; c = c->next) {
+ sos_reg = cscf_get_sos_uri_param(c->uri);
+ if (sos_reg == -1) {
+ //error case
+ LM_ERR("ERR:I_UAR: MSG_400_MALFORMED_CONTACT, responding with
400\n");
+ cscf_reply_transactional(msg, 400, MSG_400_MALFORMED_CONTACT);
+ return CSCF_RETURN_BREAK;
+ } else if (sos_reg == -2) {
+ LM_ERR("ERR:I_UAR: MSG_500_SERVER_ERROR_OUT_OF_MEMORY, responding
with 500\n");
+ cscf_reply_transactional(msg, 500, MSG_500_SERVER_ERROR_OUT_OF_MEMORY);
+ return CSCF_RETURN_BREAK;
+ }
}
}