Module: sip-router
Branch: 3.1
Commit: 8ff999c7641bf08f0e6d52a14d1f612511525eb3
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=8ff999c…
Author: Timo Reimann <timo.reimann(a)1und1.de>
Committer: Timo Reimann <timo.reimann(a)1und1.de>
Date: Thu Aug 25 15:17:48 2011 +0200
modules_k/dialog: Simplify and refactor parts of reference counter
handling.
- Remove special handling for dialogs in the "deleted" state to
allow accessing such dialogs (e.g., from the configuration
script).
Besides making the code easier to understand, this also fixes a
bug where the reference counter would be decremented after
detecting a spiral (dlg_handlers.c) even though get_dlg() does
not increment it for "deleted" dialogs.
- Adapt interfaces for lookup_dlg() and get_dlg() accordingly,
i.e., remove "del" parameter and update in-code documentation.
- Replace direct increments on a dialog structure's ref variable
by calls to ref_dlg_unsafe().
- Move {un}ref_dlg_unsafe() definitions towards the head of the
file to make declaration available earlier.
- Improve store_dlg_in_tm():
* Return and evaluate result code.
* Replace second register call by passing unreference_dialog()
as release function to the first register call.
- Document various places in the code dealing with reference
counting.
(cherry picked from commit f44534cbe841046079e176512b04a6b9c5a68bdc)
Conflicts:
modules_k/dialog/dlg_handlers.c
modules_k/dialog/dlg_hash.c
modules_k/dialog/dlg_hash.h
---
modules_k/dialog/dialog.c | 5 +-
modules_k/dialog/dlg_handlers.c | 97 +++++++--------------------
modules_k/dialog/dlg_hash.c | 133 ++++++++++++++++---------------------
modules_k/dialog/dlg_hash.h | 11 ++-
modules_k/dialog/dlg_profile.c | 3 +
modules_k/dialog/dlg_req_within.c | 2 +-
6 files changed, 96 insertions(+), 155 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=8ff…
Module: sip-router
Branch: master
Commit: f44534cbe841046079e176512b04a6b9c5a68bdc
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f44534c…
Author: Timo Reimann <timo.reimann(a)1und1.de>
Committer: Timo Reimann <timo.reimann(a)1und1.de>
Date: Thu Aug 25 15:17:48 2011 +0200
modules_k/dialog: Simplify and refactor parts of reference counter
handling.
- Remove special handling for dialogs in the "deleted" state to
allow accessing such dialogs (e.g., from the configuration
script).
Besides making the code easier to understand, this also fixes a
bug where the reference counter would be decremented after
detecting a spiral (dlg_handlers.c) even though get_dlg() does
not increment it for "deleted" dialogs.
- Adapt interfaces for lookup_dlg() and get_dlg() accordingly,
i.e., remove "del" parameter and update in-code documentation.
- Replace direct increments on a dialog structure's ref variable
by calls to ref_dlg_unsafe().
- Move {un}ref_dlg_unsafe() definitions towards the head of the
file to make declaration available earlier.
- Improve store_dlg_in_tm():
* Return and evaluate result code.
* Replace second register call by passing unreference_dialog()
as release function to the first register call.
- Document various places in the code dealing with reference
counting.
---
modules_k/dialog/dialog.c | 5 +-
modules_k/dialog/dlg_handlers.c | 92 +++++++------------------
modules_k/dialog/dlg_hash.c | 139 +++++++++++++++---------------------
modules_k/dialog/dlg_hash.h | 13 ++--
modules_k/dialog/dlg_profile.c | 3 +
modules_k/dialog/dlg_req_within.c | 2 +-
6 files changed, 97 insertions(+), 157 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=f44…
Enclosed is a small patch that allows lua_run() to return an integer
value. If the return value is not an integer, 1 is returned (like is
true with current git master.) As a side effect, lua scripts can now
exit() the sip-router script by returning 0.
Example:
Lua script:
test_equality = function ( a , b )
if a == b then
return 1
else
return -1
end
sip-router script:
if (lua_run("test_equality", "$fU", "$tU")) {
xdbg("SCRIPT: The values are equal\n");
}
Module: sip-router
Branch: master
Commit: b61b3d2f43108e2f758e3428449cdfadefd4097f
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b61b3d2…
Author: Alexandr Dubovikov <alexandr.dubovikov(a)gmail.com>
Committer: Alexandr Dubovikov <alexandr.dubovikov(a)gmail.com>
Date: Fri Aug 26 17:18:21 2011 +0200
module: sipcapture: Changed SQL schema for partitioning table.
Bug fix: mySQL doesn't support DAYOFWEEK rushing. Changed to
RANGE condition: TO_DAYS and UNIX_TIMESTAMP. The last one, only for mySQL => 5.1.58
The two crontab scripts are in example directory.
---
modules/sipcapture/examples/crontabtruncate.pl | 8 ++-
modules/sipcapture/examples/partrotate_todays.pl | 86 ++++++++++++++++++
.../examples/partrotate_unixtimestamp.pl | 93 ++++++++++++++++++++
.../sipcapture/sql/create_part_unixtimestamp.sql | 86 ++++++++++++++++++
modules/sipcapture/sql/sipcapture-create.sql | 41 ++++-----
5 files changed, 291 insertions(+), 23 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=b61…
Module: sip-router
Branch: treimann/3.1/robust_ref_count
Commit: fa6f1ae06e1e3ece9e2497871b5b021be0730258
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=fa6f1ae…
Author: Timo Reimann <timo.reimann(a)1und1.de>
Committer: Timo Reimann <timo.reimann(a)1und1.de>
Date: Fri Aug 26 15:33:49 2011 +0200
modules_k/dialog: Robustify reference counting.
- Remove special handling for dialogs in the "deleted" state to
allow accessing such dialogs (e.g., from the configuration
script).
As a side effect, this also removes a bug where the reference
counter would be decremented after detecting a spiral
(dlg_handlers.c) although get_dlg() does not increment it for
"deleted" dialogs.
- Adapt interfaces for lookup_dlg() and get_dlg() accordingly,
i.e., remove "del" parameter and update in-code documentation.
- Replace direct increments on a dialog structure's ref variable
by calls to ref_dlg_unsafe().
- Move {un}ref_dlg_unsafe() definitions towards the head of the
file to make declaration available sooner.
- Improve store_dlg_in_tm():
* Return and evaluate result code.
* Replace second register call by specifying a release
function to the first register call.
- Document various places in the code dealing with reference
counter.
(cherry picked from commit 37f9ff35e47a6ed6e4037ca09430115f0b4d6df4)
Conflicts:
modules_k/dialog/dlg_handlers.c
modules_k/dialog/dlg_hash.c
modules_k/dialog/dlg_hash.h
---
modules_k/dialog/dialog.c | 5 +-
modules_k/dialog/dlg_handlers.c | 97 +++++++--------------------
modules_k/dialog/dlg_hash.c | 133 ++++++++++++++++---------------------
modules_k/dialog/dlg_hash.h | 11 ++-
modules_k/dialog/dlg_profile.c | 3 +
modules_k/dialog/dlg_req_within.c | 2 +-
6 files changed, 96 insertions(+), 155 deletions(-)
Diff: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=fa6…
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Timo Reimann (tr)
Attached to Project - sip-router
Summary - handle dialog tracking properly when non-failing 4xx responses are involved
Task Type - Bug Report
Category - dialog
Status - Assigned
Assigned To - Timo Reimann
Operating System - All
Severity - Medium
Priority - Normal
Reported Version - Development
Due in Version - Undecided
Due Date - Undecided
Details - When a dialog is tracked that returns a response containing any of the response codes defined in section 8.1.3.5 of RFC 3261[1], the standard requires (according to section 8.1.1.4[2]) that the dialog must *not* be considered as a failure. A typical example call flow involves client authentication:
INVITE(no-auth) -> 407 -> ACK -> INVITE(auth) -> ...
If the dialog is already tracked at the unauthenticated INVITE the module will consider the dialog to have failed on routing of the 407 message. Instead, it should facilitate "reusing" the dialog once the authenticated INVITE arrives and tracking the call properly.
A suggested fix is to adjust the state machine to exclude the set of non-failing 4xx return codes from constituting a DLG_STATE_FAILED state and continue tracking when the authenticated INVITE is parsed. Caution must be taken in conjunction with the spiral detection code to implement this properly.
[1] http://tools.ietf.org/html/rfc3261#section-8.1.3.5
[2] http://tools.ietf.org/html/rfc3261#section-8.1.1.4
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=146
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.
Hi Guys,
Have been playing around with the dialog module and spiralling and one thing
I have noticed is that if you spiral and dont have detect_spirals enabled
the dialog module will create 2 dialogs. This is great and 'expected' in
this case. However, as it stands there is no way of distinguishing between
the 2 dialogs. So for example, a BYE could come in from either 'side' of the
spiral and the first dialog is matched - not necessarily the correct one.
this is because the match is purely done on callid, from and to tags (if
using RFC3261 matching).
My initial thought is to have some sort of direction identifiers stored in
the dialog structure itself. Then using Via and contact headers we can make
a pretty good assumption as to which 'end' of the spiral and therefore
choose the correct dialog in the match algorithm.
some may say just enable spiral_detection. Actually, in some cases it is
nice to be able to track a spiral in different dialogs, which most likely
why the option to enable or disable spiral detection in the first place
What are your thoughts?