Use the new field server_id on usrloc module to be able to load/get contacts filtered by server_id
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/229
-- Commit Summary --
* usrloc: support filter by server_id at get_all_ucontacts
* usrloc: add module option to support preload using server_id as filter
-- File Changes --
M modules/usrloc/dlist.c (33)
M modules/usrloc/dlist.h (3)
M modules/usrloc/udomain.c (26)
M modules/usrloc/ul_mod.c (4)
M modules/usrloc/ul_mod.h (2)
M modules/usrloc/usrloc.h (4)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/229.patchhttps://github.com/kamailio/kamailio/pull/229.diff
---
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/229
Module: kamailio
Branch: master
Commit: 115e1eb10566ffafe0f37aed92df8413f660ea6c
URL: https://github.com/kamailio/kamailio/commit/115e1eb10566ffafe0f37aed92df841…
Author: Fred Posner <fred(a)palner.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-07-06T08:53:16+02:00
INSTALL: updated bug tracker URL
- fixed flavour typo
---
Modified: INSTALL
---
Diff: https://github.com/kamailio/kamailio/commit/115e1eb10566ffafe0f37aed92df841…
Patch: https://github.com/kamailio/kamailio/commit/115e1eb10566ffafe0f37aed92df841…
---
diff --git a/INSTALL b/INSTALL
index 130ae70..8a3ea13 100644
--- a/INSTALL
+++ b/INSTALL
@@ -50,7 +50,7 @@ Starting with version 3.0.0, the two SIP server flavours are built from
same source code tree. In version 4.0.0 the two source code trees were
merged even more, so a combined module directory is now used.
-Kamailio flavor is the one built by default. SER is, historically speaking, the
+Kamailio flavour is the one built by default. SER is, historically speaking, the
first open source SIP server started in 2001. Kamailio forked from SER in
2005 under the initial name OpenSER.
@@ -772,7 +772,7 @@ A: In both cases, the reason is probably an error in request routing script
Q: Where to report issues?
-A: Use bug tracker at: http://sip-router.org/tracker
+A: Use bug tracker at: https://github.com/kamailio/kamailio/issues
Q: Any F.A.Q. that could be helpful to check before reporting an issue?
Module: kamailio
Branch: master
Commit: d37f534564f9f1e39ba5133bbac8098416192b6b
URL: https://github.com/kamailio/kamailio/commit/d37f534564f9f1e39ba5133bbac8098…
Author: Carsten Bock <carsten(a)ng-voice.com>
Committer: Carsten Bock <carsten(a)ng-voice.com>
Date: 2015-07-04T19:19:02+02:00
ims_usrloc_scscf: Fix ref-counting from previous commit...
---
Modified: modules/ims_usrloc_scscf/impurecord.c
---
Diff: https://github.com/kamailio/kamailio/commit/d37f534564f9f1e39ba5133bbac8098…
Patch: https://github.com/kamailio/kamailio/commit/d37f534564f9f1e39ba5133bbac8098…
---
diff --git a/modules/ims_usrloc_scscf/impurecord.c b/modules/ims_usrloc_scscf/impurecord.c
index d996fca..a41eafd 100644
--- a/modules/ims_usrloc_scscf/impurecord.c
+++ b/modules/ims_usrloc_scscf/impurecord.c
@@ -846,8 +846,14 @@ int update_impurecord(struct udomain* _d, str* public_identity, impurecord_t* im
unlock_subscription_slot(subs_ptr->sl);
} else {
//TODO: we may want to do a deep comparison of the subscription and update....
- if (compare_subscription(subs_ptr, subscription) != 0)
+ if (compare_subscription(subs_ptr, subscription) != 0) {
subs_ptr = subscription;
+ } else {
+ // Treat it as a new Subscription - it's not the same as the previos one
+ ref_subscription_unsafe(subs_ptr); //we reference coz we are using it - will be unreferenced later.
+ add_subscription_unsafe(subs_ptr);
+ unlock_subscription_slot(subs_ptr->sl);
+ }
}
lock_subscription(subs_ptr);
subscription_locked = 1;
Module: kamailio
Branch: master
Commit: 961f6bad29a8079ad26a3851ee453c1c236e9ebf
URL: https://github.com/kamailio/kamailio/commit/961f6bad29a8079ad26a3851ee453c1…
Author: Carsten Bock <carsten(a)ng-voice.com>
Committer: Carsten Bock <carsten(a)ng-voice.com>
Date: 2015-07-04T18:14:02+02:00
ims_usrloc_scscf: Do not re-use Subscription, if it's for a different IMPU
---
Modified: modules/ims_usrloc_scscf/impurecord.c
---
Diff: https://github.com/kamailio/kamailio/commit/961f6bad29a8079ad26a3851ee453c1…
Patch: https://github.com/kamailio/kamailio/commit/961f6bad29a8079ad26a3851ee453c1…
---
diff --git a/modules/ims_usrloc_scscf/impurecord.c b/modules/ims_usrloc_scscf/impurecord.c
index c5fbc99..d996fca 100644
--- a/modules/ims_usrloc_scscf/impurecord.c
+++ b/modules/ims_usrloc_scscf/impurecord.c
@@ -774,12 +774,30 @@ void free_ims_subscription_data(ims_subscription *s) {
/* Still needs to be implemented */
int compare_subscription(ims_subscription* new, ims_subscription* orig) {
- int i, j;
+ int i, j, k, l;
LM_DBG("Comparing subscription for IMPI [%.*s]\n", orig->private_identity.len, orig->private_identity.s);
for (i = 0; i < orig->service_profiles_cnt; i++) {
-
for (j = 0; j < orig->service_profiles[i].public_identities_cnt; j++) {
-
+ for (k = 0; k < new->service_profiles_cnt; k++) {
+ for (l = 0; l < new->service_profiles[k].public_identities_cnt; l++) {
+ LM_DBG("new %.*s (%i) vs. orig %.*s (%i)\n",
+ new->service_profiles[k].public_identities[l].public_identity.len,
+ new->service_profiles[k].public_identities[l].public_identity.s,
+ new->service_profiles[k].public_identities[l].public_identity.len,
+ orig->service_profiles[i].public_identities[j].public_identity.len,
+ orig->service_profiles[i].public_identities[j].public_identity.s,
+ orig->service_profiles[i].public_identities[j].public_identity.len);
+
+ if (orig->service_profiles[i].public_identities[j].public_identity.len ==
+ new->service_profiles[k].public_identities[l].public_identity.len) {
+ if (memcmp(orig->service_profiles[i].public_identities[j].public_identity.s,
+ new->service_profiles[k].public_identities[l].public_identity.s,
+ new->service_profiles[k].public_identities[l].public_identity.len) == 0)
+ return 1;
+ }
+
+ }
+ }
}
}
@@ -828,7 +846,8 @@ int update_impurecord(struct udomain* _d, str* public_identity, impurecord_t* im
unlock_subscription_slot(subs_ptr->sl);
} else {
//TODO: we may want to do a deep comparison of the subscription and update....
- subs_ptr = subscription;
+ if (compare_subscription(subs_ptr, subscription) != 0)
+ subs_ptr = subscription;
}
lock_subscription(subs_ptr);
subscription_locked = 1;
@@ -917,9 +936,11 @@ int update_impurecord(struct udomain* _d, str* public_identity, impurecord_t* im
} else {
LM_DBG("new subscription is the same as the old one....not doing anything");
//check that the service profile and associated impus are in the subscription, if not, add...
- if (compare_subscription(subs_ptr, *s) != 0) {
- LM_WARN("TODO: There is a new service profile we need to add to the subscription\n");
- }
+ /* if (compare_subscription(subs_ptr, *s) != 0) {
+ unref_subscription((*_r)->s); //different subscription which we don't have lock on yet.
+ ref_subscription_unsafe(subs_ptr);
+ (*_r)->s = subs_ptr;
+ } */
}
}
Hi List,
i'm trying to access nonce, cnonce and response params inside auth digest header
but i'm failing miserably. any suggestions i can do this in the script ?
tried to use @hf_value2.authorization.nonce but it returns the full header (maybe i didn't understood how it works?)
so i was thinking, if there isn't an easy way to get this, i could extend the pv module to add
$an, $acn, $ar (or better names, suggestion welcomed) to get these values.
thoughts ?
Best