Module: sip-router
Branch: 3.1
Commit: fc322e0ef766f65a1f734bb26afdfc1e5862c967
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fc322e0…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Mar 27 00:09:53 2011 +0100
presence: check for transport parameter in contact URI for NOTIFY
- avoid adding second time the transport parameter if it is present in
the local contact field of subscription structure
- discovered by Juha Heinanen and Peter Dunkley
(cherry picked from commit 2b30581ac359047d3c350c432a391a7e4e4a47cc)
---
modules_k/presence/notify.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules_k/presence/notify.c b/modules_k/presence/notify.c
index f57eea1..7e9ce5e 100644
--- a/modules_k/presence/notify.c
+++ b/modules_k/presence/notify.c
@@ -128,6 +128,7 @@ int build_str_hdr(subs_t* subs, int is_body, str* hdr)
str expires = {0, 0};
str status = {0, 0};
str tmp = {0, 0};
+ str trans = {";transport=", 11};
if(hdr == NULL)
{
@@ -184,7 +185,8 @@ int build_str_hdr(subs_t* subs, int is_body, str* hdr)
tmp.s += 10;
strncpy(tmp.s, subs->local_contact.s, subs->local_contact.len);
tmp.s += subs->local_contact.len;
- if(subs->sockinfo_str.s!=NULL)
+ if(subs->sockinfo_str.s!=NULL
+ && str_search(&subs->local_contact, &trans)==0)
{
/* fix me */
switch(subs->sockinfo_str.s[0]) {
I have noticed that 'kamctl monitor' displays corrupt statistics when kamailio is built for a 64 bit platform.
Further investigation has revealed that the reason is the underlying datatype is a long, whilst some of the wrapper functions (e.g. get_stat_val) return unsigned int. On a 32bit machine where a long and int are both the same size it is not a problem, but on a 64 bit machine they are different and hence the problem.
Some code uses the wrapper function, other does not, in the case of mi_get_stats it uses both, so depending on paramaters passed to the MI fifo it may work or produce garbage results.
Paul
Hi everyone,
as some may have noticed, i've made several general changes in my
carstenbock/ims branch in the GIT-repository.
While some are ready, others are not. The others may take several
weeks (maybe months) to be finished.
I would be happy to merge the "general" changes into the master branch
in order to have them more widely tested by the community and getting
a faster feedback (while it's fresh), while leaving the other, not
finished parts in a separated branch...
Now i have two options:
1) Cherry-Pick every single commit into the master (a lot of work, i think?)
2) Create a new branch and move the non-ready parts into that branch;
afterwards merge my "ims" branch into master.
(other options?)
I tend to go for 2) and i would create dedicated branches for each
other component (e.g. a branch for the P-CSCF, one for
Rf/Ro-Operations, one for the I-CSCF, one for the S-CSCF and so on) so
merging into master would become easier. Other new extensions would go
into an own branch.
If i create a branch for specific extensions (e.g. the P-CSCF) and i
need to implement other features for this (e.g. general RFC3680
support in the presence modules), is there a proper way, to keep my
branch up-to-date with the current master and afterwards doing a clean
merge? If i do a "git pull" and afterwards merge, the changelog gets
duplicated... any ideas?
Thanks in advance,
Carsten
--
Carsten Bock
http://www.ng-voice.com
mailto:carsten@ng-voice.com
Module: sip-router
Branch: master
Commit: 2b30581ac359047d3c350c432a391a7e4e4a47cc
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=2b30581…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Mar 27 00:09:53 2011 +0100
presence: check for transport parameter in contact URI for NOTIFY
- avoid adding second time the transport parameter if it is present in
the local contact field of subscription structure
- discovered by Juha Heinanen and Peter Dunkley
---
modules_k/presence/notify.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules_k/presence/notify.c b/modules_k/presence/notify.c
index 2c90640..da4ea8d 100644
--- a/modules_k/presence/notify.c
+++ b/modules_k/presence/notify.c
@@ -128,6 +128,7 @@ int build_str_hdr(subs_t* subs, int is_body, str* hdr)
str expires = {0, 0};
str status = {0, 0};
str tmp = {0, 0};
+ str trans = {";transport=", 11};
if(hdr == NULL)
{
@@ -184,7 +185,8 @@ int build_str_hdr(subs_t* subs, int is_body, str* hdr)
tmp.s += 10;
strncpy(tmp.s, subs->local_contact.s, subs->local_contact.len);
tmp.s += subs->local_contact.len;
- if(subs->sockinfo_str.s!=NULL)
+ if(subs->sockinfo_str.s!=NULL
+ && str_search(&subs->local_contact, &trans)==0)
{
/* fix me */
switch(subs->sockinfo_str.s[0]) {
How many lookup("location") things do you use in your configuration file ?
This seems to be the problem with more then once use of this command. Try to
avoid this, or check if you can substitute some of them with simple SQL
select in location table.
On Mon, Mar 28, 2011 at 10:46 AM, Efelin Novak <efelin.novak(a)gmail.com>
wrote:
> Hi Folks,
> I have a problem with a registrar module (at least I suppose so). When A
> calls to B, in some specific situation, B receives two INVITEs. This
mostly
> (not only) happens when one account is registered on two or more UAs. In
> this situation the extra INVITE is sent only to the one that is second in
> the list (kamctl ul show ACCOUNT).
> kamctl ul show Alice:
> Contact::
> <sip:orlvuzyd@192.168.28.72:52129
>;q=0;expires=1916;flags=0x0;cflags=0x40;socket=<udp:8.8.8.8:5060
>;methods=0xFFFFFFFF;received=<sip:8.8.8.8:52129>;user_agent=<Blink
> 0.2.5 (Linux)>
> Contact::
> <sip:Alice@192.168.28.51:5060
>;q=;expires=3061;flags=0x0;cflags=0x40;socket=<udp:8.8.8.8:5060
>;methods=0x129F;received=<sip:8.8.8.8:5060
>;user_agent=<Linksys/PAP2T-3.1.15(LS)>
>
> My situation.
> 1. Alice calls to BOB.
> 2. kamailio looks up in location table for BOBs registrations
> 3. in DB there are two rows (two devices(linksys PAP2T and Blink(blink is
> the second one)))
> 4. kamailio send 3 INVITES ( linksys, blink and blink). Every INVITE has
> different via.branch
> (Via: SIP/2.0/UDP 8.8.8.8;branch=z9hG4bKe2d7.009b1df2.1)
> (Via: SIP/2.0/UDP 8.8.8.8;branch=z9hG4bKe2d7.009b1df2.2)
> (Via: SIP/2.0/UDP 8.8.8.8;branch=z9hG4bKe2d7.009b1df2.3)
> All my registrar parameters are set to default.
> Nothing is looping on interfaces.
> I have no idea whether this is a bug or my missconfiguration.
> Thanks for replies.
> Kind regards,
> Efelin Novak
>
> _______________________________________________
> sr-dev mailing list
> sr-dev(a)lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
>
>