Module: kamailio
Branch: master
Commit: 6620a44738c68d035991df51cb915142a5d965a6
URL:
https://github.com/kamailio/kamailio/commit/6620a44738c68d035991df51cb91514…
Author: jaybeepee <jason.penton(a)gmail.com>
Committer: jaybeepee <jason.penton(a)gmail.com>
Date: 2016-02-12T20:28:49+02:00
modules/ims_usrloc_scscf: added support for UE types required by registrar
---
Modified: modules/ims_usrloc_scscf/ucontact.c
Modified: modules/ims_usrloc_scscf/usrloc.h
---
Diff:
https://github.com/kamailio/kamailio/commit/6620a44738c68d035991df51cb91514…
Patch:
https://github.com/kamailio/kamailio/commit/6620a44738c68d035991df51cb91514…
---
diff --git a/modules/ims_usrloc_scscf/ucontact.c b/modules/ims_usrloc_scscf/ucontact.c
index de0477b..971cf88 100644
--- a/modules/ims_usrloc_scscf/ucontact.c
+++ b/modules/ims_usrloc_scscf/ucontact.c
@@ -114,6 +114,10 @@ ucontact_t* new_ucontact(str* _dom, str* _aor, str* _contact,
ucontact_info_t* _
/*Copy parameter list into shm**/
param = _ci->params;
while(param) {
+ LM_DBG("Checking param [%.*s]\n", param->name.len,
param->name.s);
+ if (param->name.len == 16 && (memcmp(param->name.s,
"+g.3gpp.icsi-ref", 16)==0)) {
+ c->is_3gpp = 1;
+ }
/*Copy first param in curr*/
curr = shm_malloc(sizeof (param_t));
curr->len = param->len;
diff --git a/modules/ims_usrloc_scscf/usrloc.h b/modules/ims_usrloc_scscf/usrloc.h
index 2b5bf87..2f7c0b9 100644
--- a/modules/ims_usrloc_scscf/usrloc.h
+++ b/modules/ims_usrloc_scscf/usrloc.h
@@ -151,6 +151,8 @@ typedef enum contact_state {
/*! \brief Valid contact is a contact that either didn't expire yet or is permanent
*/
#define VALID_CONTACT(c, t) (((c->expires>t) || (c->expires==0)) &&
c->state!=CONTACT_DELETED && c->state!=CONTACT_DELETE_PENDING &&
c->state!=CONTACT_EXPIRE_PENDING_NOTIFY)
+#define VALID_UE_TYPE(c, t) ((t==0) || (t==1 && c->is_3gpp) || (t==2
&& !c->is_3gpp))
+
struct hslot;
/*!< Hash table slot */
struct socket_info;
@@ -298,6 +300,7 @@ typedef struct ucontact {
struct contact_hslot* slot; /*!< Collision slot in the hash table array we belong
to */
unsigned int sl; /*!< Hash slot number we belong to */
int ref_count;
+ int is_3gpp;
contact_state_t state;
str domain; /*!< Pointer to domain name (NULL terminated) */
str aor; /*!< Pointer to the AOR string in record structure*/