THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Marcus Hunger (fnordian)
Attached to Project - sip-router
Summary - force_send_socket not working in reply-route
Task Type - Bug Report
Category - Core
Status - Assigned
Assigned To - Andrei Pelinescu-Onciul
Operating System - All
Severity - Medium
Priority - Normal
Reported Version - 3.1
Due in Version - Undecided
Due Date - Undecided
Details - force_send_socket is not working in reply-route. this changed from kamailio 1.5 to sip-router 3.x.
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=142
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A user has added themself to the list of users assigned to this task.
FS#142 - force_send_socket not working in reply-route
User who did this - Marcus Hunger (fnordian)
http://sip-router.org/tracker/index.php?do=details&task_id=142
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#141 - Uninitialized $var returns 0 instead of <null>
User who did this - Daniel-Constantin Mierla (miconda)
----------
It is not only about the C code, but the design/purpose for these vars in config and access from other languages like Lua.
One solution would be to make the new behavior controllable via PV module parameter, defaulting to existing behavior.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=141#comment245
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#141 - Uninitialized $var returns 0 instead of <null>
User who did this - Alex Hermann (axlh)
----------
Meanwhile, i had already created a patch implementing a NULL type for scripts vars. It seems rather trivial. I'll test it in some real cases.
Example:
xlog("$$var(uninit) = $var(uninit)");
$var(null) = $null;
xlog("$$var(null) = $var(null)");
$var(test) = "test";
xlog("$$var(test) = $var(test)");
$var(test) = $null;
xlog("$$var(test) = $var(test)");
$var(test) = 1234;
xlog("$$var(test) = $var(test)");
$var(test) = $null;
xlog("$$var(test) = $var(test)");
Output:
$var(uninit) = <null>
$var(null) = <null>
$var(test) = test
$var(test) = <null>
$var(test) = 1234
$var(test) = <null>
----------
One or more files have been attached.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=141#comment244
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#141 - Uninitialized $var returns 0 instead of <null>
User who did this - Daniel-Constantin Mierla (miconda)
----------
The $var(x) and $shv(x) are defined at cfg parsing time and resolved to a pointer in pkg or shm, therefore very fast to access at runtime, while avps are kept in a dynamic list, searched by name every time at runtime.
If you think of C code, it's like:
int x;
- x value cannot be null
Thus the var and shv are never null from this point of view. Also note that var and shv are not reset at all during runtime, their values persist.
What you can use is PV module parameters to set the init value to something that you know is the startup value.
Ultimately a flag could be used to mark as null value, but that might break existing things, without real new benefit comparing to a known value user as initial val.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=141#comment243
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Module: sip-router
Branch: master
Commit: 17f020279301b9aa8c0e4b0f20ef3a1f9d059d04
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=17f0202…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Thu Jul 21 15:04:23 2011 +0100
pua(k): added new modparam check_remote_contact
- This defaults to 1 (current behaviour), but when set to 0 means that the pua
module won't check that the remote contact matches when finding a dialog in
the hash table.
This is very important as when the initial SUBSCRIBE is created for an RLS to
Presence dialog the remote contact will be set to the R-URI of the SUBSCRIBE.
However, subsequent requests within the dialog need to use the remote contact
as provided by the far end as the R-URI.
This meant that re-SUBSCRIBEs from RLS to Presence get treated as new dialog
forming requests and causes lots of extra entries in the pua and
active_watchers tables.
---
modules_k/pua/README | 25 +++++++++++++++++++++++--
modules_k/pua/doc/pua_admin.xml | 24 ++++++++++++++++++++++++
modules_k/pua/hash.c | 3 +++
modules_k/pua/pua.c | 8 ++++++++
modules_k/pua/pua.h | 1 +
5 files changed, 59 insertions(+), 2 deletions(-)
diff --git a/modules_k/pua/README b/modules_k/pua/README
index bdd1aed..766a8cd 100644
--- a/modules_k/pua/README
+++ b/modules_k/pua/README
@@ -32,6 +32,7 @@ Anca-Maria Vamanu
3.7. outbound_proxy (str)
3.8. dlginfo_increase_version (int)
3.9. reginfo_increase_version (int)
+ 3.10. check_remote_contact (int)
4. Exported Functions
@@ -59,7 +60,8 @@ Anca-Maria Vamanu
1.7. Set outbound_proxy parameter
1.8. Set dlginfo_increase_version parameter
1.9. Set reginfo_increase_version parameter
- 1.10. pua_update_contact usage
+ 1.10. Set check_remote_contact parameter
+ 1.11. pua_update_contact usage
2.1. pua_api structure
2.2. pua_is_dialog usage example
2.3. register_puacb usage example
@@ -86,6 +88,7 @@ Chapter 1. Admin Guide
3.7. outbound_proxy (str)
3.8. dlginfo_increase_version (int)
3.9. reginfo_increase_version (int)
+ 3.10. check_remote_contact (int)
4. Exported Functions
@@ -145,6 +148,7 @@ Chapter 1. Admin Guide
3.7. outbound_proxy (str)
3.8. dlginfo_increase_version (int)
3.9. reginfo_increase_version (int)
+ 3.10. check_remote_contact (int)
3.1. hash_size (int)
@@ -264,6 +268,23 @@ modparam("pua", "dlginfo_increase_version", 1)
modparam("pua", "reginfo_increase_version", 1)
...
+3.10. check_remote_contact (int)
+
+ When sending a SUBSCRIBE check that the remote contact matches the one
+ in the stored dialog or not. If the remote contact is checked and does
+ not match the one in the stored dialog then the dialog is not matched.
+ Checking the remote contact can cause problems when using modules like
+ RLS and should not be required in order to properly match the dialog
+ anyway. Set this parameter to 0 to disable checking of remote contact
+ for SUBSCRIBE dialog matching.
+
+ Default value is “1”.
+
+ Example 1.10. Set check_remote_contact parameter
+...
+modparam("pua", "check_remote_contact", 0)
+...
+
4. Exported Functions
4.1. pua_update_contact()
@@ -283,7 +304,7 @@ modparam("pua", "reginfo_increase_version", 1)
* 1 - if success.
* -1 - if error.
- Example 1.10. pua_update_contact usage
+ Example 1.11. pua_update_contact usage
...
if(method=="NOTIFY")
pua_update_contact();
diff --git a/modules_k/pua/doc/pua_admin.xml b/modules_k/pua/doc/pua_admin.xml
index 0868de4..495b4c8 100644
--- a/modules_k/pua/doc/pua_admin.xml
+++ b/modules_k/pua/doc/pua_admin.xml
@@ -259,6 +259,30 @@ modparam("pua", "reginfo_increase_version", 1)
</programlisting>
</example>
</section>
+ <section>
+ <title><varname>check_remote_contact</varname> (int)</title>
+ <para>
+ When sending a SUBSCRIBE check that the remote contact matches the
+ one in the stored dialog or not. If the remote contact is checked
+ and does not match the one in the stored dialog then the dialog is
+ not matched. Checking the remote contact can cause problems when
+ using modules like RLS and should not be required in order to
+ properly match the dialog anyway. Set this parameter to 0 to
+ disable checking of remote contact for SUBSCRIBE dialog matching.
+ </para>
+ <para>
+ <emphasis>Default value is <quote>1</quote>.
+ </emphasis>
+ </para>
+ <example>
+ <title>Set <varname>check_remote_contact</varname> parameter</title>
+ <programlisting format="linespecific">
+...
+modparam("pua", "check_remote_contact", 0)
+...
+</programlisting>
+ </example>
+ </section>
</section>
<section>
diff --git a/modules_k/pua/hash.c b/modules_k/pua/hash.c
index bc8eb20..c5e996c 100644
--- a/modules_k/pua/hash.c
+++ b/modules_k/pua/hash.c
@@ -140,6 +140,9 @@ ua_pres_t* search_htable(ua_pres_t* pres, unsigned int hash_code)
(strncmp(p->watcher_uri->s, pres->watcher_uri->s,
pres->watcher_uri->len )==0))
{
+ if (check_remote_contact == 0)
+ break;
+
if(pres->remote_contact.s)
if(pres->remote_contact.len== p->remote_contact.len &&
strncmp(pres->remote_contact.s, p->remote_contact.s,
diff --git a/modules_k/pua/pua.c b/modules_k/pua/pua.c
index 6600a98..c507797 100644
--- a/modules_k/pua/pua.c
+++ b/modules_k/pua/pua.c
@@ -65,6 +65,7 @@ static str db_url = str_init(DEFAULT_DB_URL);
static str db_table= str_init("pua");
int update_period= 100;
str outbound_proxy = {0, 0};
+int check_remote_contact = 1;
int startup_time = 0;
int dlginfo_increase_version = 0;
int reginfo_increase_version = 0;
@@ -125,6 +126,7 @@ static param_export_t params[]={
{"outbound_proxy", STR_PARAM, &outbound_proxy.s },
{"dlginfo_increase_version", INT_PARAM, &dlginfo_increase_version},
{"reginfo_increase_version", INT_PARAM, ®info_increase_version},
+ {"check_remote_contact", INT_PARAM, &check_remote_contact },
{0, 0, 0 }
};
@@ -231,6 +233,12 @@ static int mod_init(void)
return -1;
}
+ if(check_remote_contact<0 || check_remote_contact>1)
+ {
+ LM_ERR("bad value for check_remote_contact\n");
+ return -1;
+ }
+
startup_time = (int) time(NULL);
register_timer(hashT_clean, 0, update_period- 5);
diff --git a/modules_k/pua/pua.h b/modules_k/pua/pua.h
index 3db757a..bb2072d 100644
--- a/modules_k/pua/pua.h
+++ b/modules_k/pua/pua.h
@@ -42,6 +42,7 @@ extern int min_expires;
extern int pua_ul_publish;
extern int default_expires;
extern str outbound_proxy;
+extern int check_remote_contact;
int reginfo_increase_version;
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Alex Hermann (axlh)
Attached to Project - sip-router
Summary - Uninitialized $var returns 0 instead of <null>
Task Type - Bug Report
Category - Core
Status - Assigned
Assigned To - Andrei Pelinescu-Onciul
Operating System - All
Severity - Low
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - There is an annoying difference between an uninitialized $avp and $var. When the value is queried, the $avp returns <null> whereas the $var returns 0. The latter is wrong, as 0 is a meaningful value.
Suggested fix: uninitialized $var should return <null>
Example:
$var(null) = $null;
$avp(null) = $null;
xlog("$$var(null) = $var(null)");
xlog("$$avp(null) = $avp(null)";
Output:
$var(null) = 0
$avp(null) = <null>
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=141
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Module: sip-router
Branch: master
Commit: 9f93ecb5f7072826e3cff1ea575d904a3763f868
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9f93ecb…
Author: pd <peter.dunkley(a)crocodile-rcs.com>
Committer: pd <peter.dunkley(a)crocodile-rcs.com>
Date: Thu Jul 21 15:01:00 2011 +0100
pdt(k): made the "bad parameters" diagnostic in pdt_get_domain INFO
- I observed this message a few times while playing around with PDT. It isn't
really an error as it occurs when sdomain is NULL and sdomain does not have
to be set at all. Changed it to INFO for now.
---
modules_k/pdt/pdtree.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules_k/pdt/pdtree.c b/modules_k/pdt/pdtree.c
index 22e78db..c0fa4bb 100644
--- a/modules_k/pdt/pdtree.c
+++ b/modules_k/pdt/pdtree.c
@@ -294,7 +294,7 @@ str* pdt_get_domain(pdt_tree_t *pl, str* sdomain, str *code, int *plen)
if(pl==NULL || sdomain==NULL || sdomain->s==NULL || code == NULL
|| code->s == NULL)
{
- LM_ERR("bad parameters\n");
+ LM_INFO("bad parameters\n");
return NULL;
}