Module: kamailio
Branch: master
Commit: 44023e7eb8ff6a23bc57b69f8695466e910bed4a
URL: https://github.com/kamailio/kamailio/commit/44023e7eb8ff6a23bc57b69f8695466…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-02-19T12:24:39+01:00
presence: use < instead of < in xml docs
---
Modified: src/modules/presence/doc/presence_admin.xml
---
Diff: https://github.com/kamailio/kamailio/commit/44023e7eb8ff6a23bc57b69f8695466…
Patch: https://github.com/kamailio/kamailio/commit/44023e7eb8ff6a23bc57b69f8695466…
---
diff --git a/src/modules/presence/doc/presence_admin.xml b/src/modules/presence/doc/presence_admin.xml
index aa10dff34c..d081a1c6f2 100644
--- a/src/modules/presence/doc/presence_admin.xml
+++ b/src/modules/presence/doc/presence_admin.xml
@@ -906,7 +906,7 @@ modparam("presence", "retrieve_order_by", "priority, received_time")
<title><varname>enable_dmq</varname> (integer)</title>
<para>
If set to 1, will enable DMQ replication of presentities between nodes. Use this instead of a shared DB
- to share state across a cluster and update local watchers in realtime (subs_db_mode < 3) or on next
+ to share state across a cluster and update local watchers in realtime (subs_db_mode < 3) or on next
notifier run (subs_db_mode = 3).
</para>
<para>
### Description
The issue started with this improvement:
https://github.com/kamailio/kamailio/commit/839cf89b02f8817156487a960ff6201…
(it works fine for single dialog bodies, but make a mess with multiple-dialog bodies)
### Troubleshooting
**Test scheme, preconditions:**
- SIP server: kamailio + Asterisk
- 3 SIP phones. UA-A, UA-B, UA-C
Kamailio is configured with presence+presence_dialoginfo modules.
Asterisk sends PUBLISHes regarding changes of dialog's state, kamailio process it (handle_publish), and send NOTIFIYs to all subscribed endpoints
**Bug description** (the issue is considered from the point of view of UA-B's state):
- UA-A calls to UA-B => Asterisk send PUBLISHes (dialog UA-B1), UA-B (states on-the Trying -> Proceeding -> Confirmed)
- UA-B makes attended transfer to UA-C (call answered) => Asterisk send PUBLISHes with complex XML (2 dialogs state in a body. UA-B1(Confirmed) and new UA-B2 (Confirmed))
- UA-B completes the transfer, as a result, Asterisk sends (bodies from this 2 PUBLISHes are below, in the SIP traffic section):
1. PUBLISH with multiple dialog body (UA-B1 - terminated, UA-B2 - confirmed) => processed OK
2. PUBLISH with single dialog body (UA-B2 - terminated.) => **Bug is here**
so now:
```
presentity.c:1084 checks is_dialog_terminated // check is dialog terminated for event: dialog
presentity.c:549 calls get_dialog_state
// make a db query with the previous state (that query returnes: (UA-B1 - terminated, UA-B2 - confirmed))
// loop through result returned from DB, call parse_dialog_state_from_body
presentity.c:307 - at this function:
...
node = xmlNodeGetChildByName(node, "dialog"); // return part of xml with 2 dialogs
...
childNode = xmlNodeGetChildByName(node, "state"); // return state of the first! dialog in a list, not the current dialog
...
due to obtained state is "terminated", if(is_dialog_terminated(presentity)) returnes TRUE
and subsequent code sends silently 200OK.
```
**Result:**
- those subscribed to dialog state of UA-B, do not recieve NOTIFY with a valid state (BLFs remain "lighting")
**Attempts of workaround:**
- I tried to go to "send_412" logic when is_dialog_terminated (TRUE).
- But in the subsequent PUBLISH (state=terminated) Asterisk does not insert "call-id, to-tag, from-tag" parameters, and endpoint fails to recognize which dialog is terminated, and BLF remains to light.
#### SIP Traffic
not SIP, but only relevant part of XML bodies.
Multiple dialogs body, this one is last to succeed (look at the state of **first** dialog)
```
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="36" state="full" entity="252">
<dialog id="3bf1a5de53394e394f7b0241067faccf" call-id="3bf1a5de53394e394f7b0241067faccf" local-tag="as27f0e6f0" remote-tag="1349583034" remote-uri="sip:252@10.100.1.24:5064" local-uri="sip:251@127.0.0.1:6050" direction="recipient">
<note>Ready</note>
<remote>
<identity>252</identity>
<target uri="252">
</target>
</remote>
<local>
<identity>251</identity>
<target uri="251"/>
</local>
<state>terminated</state>
</dialog>
<dialog id="4070150262(a)10.100.1.24" call-id="4070150262(a)10.100.1.24" local-tag="as7c372911" remote-tag="3861741811" remote-uri="sip:252@10.100.1.24:5064" local-uri="sip:254@10.100.1.85:6050" direction="initiator">
<note>On the phone</note>
<remote>
<identity display="user252">sip:252@10.100.1.85</identity>
<target uri="sip:252@10.100.1.85">
</target>
</remote>
<local>
<identity display="user254">sip:254@10.100.1.85</identity>
<target uri="sip:254@10.100.1.85"/>
</local>
<state>confirmed</state>
</dialog>
</dialog-info>
```
Next PUBLISH is with single dialog, and its update is ignored (as incorrect state evaluated)
```
<?xml version="1.0"?>
<dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="37" state="full" entity="252">
<dialog id="4070150262(a)10.100.1.24" call-id="4070150262(a)10.100.1.24" local-tag="as7c372911" remote-tag="3861741811" remote-uri="sip:252@10.100.1.24:5064" local-uri="sip:254@10.100.1.85:6050" direction="initiator">
<note>Ready</note>
<remote>
<identity>252</identity>
<target uri="252">
</target>
</remote>
<local>
<identity>254</identity>
<target uri="254"/>
</local>
<state reason="local-bye">terminated</state>
</dialog>
</dialog-info>
```
### Possible Solutions
Sorry for the long story, but for now I need your advice, with the logic for the fix (I already tried to start to fix, but get stuck with the logical concept).
My current insight is quite cumbersome:
- before is_dialog_terminated => get an array of dialogs call-ids from the body of current PUBLISH. Give it as input parameter for is_dialog_terminated
- while processing get_dialog_state/parse_dialog_state_from_body = try to match state of matched dialogs
- in some way try to update not complete body in a DB, but make some "partial" update. (update only those dialogs whose old state is NOT "terminated")
Thanks in advance for your advice. If the issue unclear from my description, please ask for details.
### Additional Information
* **Kamailio Version** - output of `kamailio -v`
kamailio -v
version: kamailio 5.0.3 (i386/linux)
flags: STATS: Off, EXTRA_DEBUG, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled on 11:27:38 Jan 30 2018 with gcc 4.3.2
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1427
One server replicates to others with t_replicate_tcp. The connection was by mistake blocked by a firewall and after a few hours the memory of Kamailio ran out, with over 40000 open transactions in tm.stats on a server with around 300 registrations and no calls since restart.
t_replicate transactions needs to time out somehow.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1220
First attempt at porting app_python to app_python3.
Mostly symbols names are the same as app_python so these two
modules cannot be loaded together. Exported functions are identical so
in theory scripts need not change.
TODO: reenable thread management
<!-- Kamailio Pull Request Template -->
<!--
IMPORTANT:
- for detailed contributing guidelines, read:
https://github.com/kamailio/kamailio/blob/master/.github/CONTRIBUTING.md
- pull requests must be done to master branch, unless they are backports
of fixes from master branch to a stable branch
- backports to stable branches must be done with 'git cherry-pick -x ...'
- code is contributed under BSD for core and main components (tm, sl, auth, tls)
- code is contributed GPLv2 or a compatible license for the other components
- GPL code is contributed with OpenSSL licensing exception
-->
#### Pre-Submission Checklist
<!-- Go over all points below, and after creating the PR, tick all the checkboxes that apply -->
<!-- All points should be verified, otherwise, read the CONTRIBUTING guidelines from above-->
<!-- If you're unsure about any of these, don't hesitate to ask on sr-dev mailing list -->
- [ ] Commit message has the format required by CONTRIBUTING guide
- [ ] Commits are split per component (core, individual modules, libs, utils, ...)
- [ ] Each component has a single commit (if not, squash them into one commit)
- [ ] No commits to README files for modules (changes must be done to docbook files
in `doc/` subfolder, the README file is autogenerated)
#### Type Of Change
- [ ] Small bug fix (non-breaking change which fixes an issue)
- [ X] New feature (non-breaking change which adds new functionality)
- [ ] Breaking change (fix or feature that would change existing functionality)
#### Checklist:
<!-- Go over all points below, and after creating the PR, tick the checkboxes that apply -->
- [ ] PR should be backported to stable branches
- [ ] Tested changes locally
- [ ] Related to issue #XXXX (replace XXXX with an open issue number)
#### Description
- add app_python3 module
- this is a direct port of app_python and aims for feature equivalence
- script reload does not work yet
- disable thread management; fortunately kamailio does not use threads; as the Py3 API is too different;
trying to avoid deprecated APIs like PyEval_AcquireLock().
- TODO: need to reenable threads: use case is python extension module that uses native threads (e.g. gRPC)
You can view, comment on, or merge this pull request online at:
https://github.com/kamailio/kamailio/pull/1447
-- Commit Summary --
* app_python3: first release
-- File Changes --
A src/modules/app_python3/Makefile (29)
A src/modules/app_python3/README (196)
A src/modules/app_python3/README.TestCase-Loggers (16)
A src/modules/app_python3/app_python_mod.c (532)
A src/modules/app_python3/app_python_mod.h (31)
A src/modules/app_python3/apy_kemi.c (1292)
A src/modules/app_python3/apy_kemi.h (40)
A src/modules/app_python3/apy_kemi_export.c (9288)
A src/modules/app_python3/apy_kemi_export.h (42)
A src/modules/app_python3/doc/Makefile (4)
A src/modules/app_python3/doc/app_python.xml (34)
A src/modules/app_python3/doc/app_python_admin.xml (212)
A src/modules/app_python3/mod_Core.c (80)
A src/modules/app_python3/mod_Core.h (36)
A src/modules/app_python3/mod_Logger.c (271)
A src/modules/app_python3/mod_Logger.h (37)
A src/modules/app_python3/mod_Ranks.c (109)
A src/modules/app_python3/mod_Ranks.h (35)
A src/modules/app_python3/mod_Router.c (100)
A src/modules/app_python3/mod_Router.h (36)
A src/modules/app_python3/msgobj_struct.h (36)
A src/modules/app_python3/python_examples/Loggers.py (107)
A src/modules/app_python3/python_examples/TestCase_Traceback.py (46)
A src/modules/app_python3/python_examples/handler.py (26)
A src/modules/app_python3/python_exec.c (211)
A src/modules/app_python3/python_exec.h (37)
A src/modules/app_python3/python_iface.c (54)
A src/modules/app_python3/python_iface.h (30)
A src/modules/app_python3/python_msgobj.c (545)
A src/modules/app_python3/python_msgobj.h (33)
A src/modules/app_python3/python_support.c (277)
A src/modules/app_python3/python_support.h (37)
A src/modules/app_python3/utils/app_python_ctl (148)
-- Patch Links --
https://github.com/kamailio/kamailio/pull/1447.patchhttps://github.com/kamailio/kamailio/pull/1447.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/1447
Module: kamailio
Branch: master
Commit: 2bfb71472014cabf6a6fb0fdac1421d50486d775
URL: https://github.com/kamailio/kamailio/commit/2bfb71472014cabf6a6fb0fdac1421d…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2018-02-18T08:24:36+01:00
CONTRIBUTING.md: added developer access section
---
Modified: .github/CONTRIBUTING.md
---
Diff: https://github.com/kamailio/kamailio/commit/2bfb71472014cabf6a6fb0fdac1421d…
Patch: https://github.com/kamailio/kamailio/commit/2bfb71472014cabf6a6fb0fdac1421d…
---
diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 1ac2f598e9..a09a8c0ef7 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -77,9 +77,6 @@ and commit history, there are several *rules* required for each contribution.
* code **should** be formatted with **clang-format** or to match the style of
the component that the commit applies to. The `.clang-format` file is part of
Kamailio source code tree, in the root folder.
- * personal branches of developers done inside Kamailio GIT repository must be
- prefixed with `developerid/`, e.g., `alice/new-feature`. Do not use just
- `new-feature` or `alice-new-feature` or other variant without `developerid/`.
### Commit Message Format ###
@@ -135,6 +132,25 @@ The above content about commit message format is taken from Kamailio wiki page:
* https://www.kamailio.org/wiki/devel/git-commit-guidelines
* it is recommended you read that one as well.
+### Developer Access ###
+
+ * developer access (commit rights) to Kamailio GIT repository is granted to
+ people that contribute relevant components (e.g., modules) or have consistent
+ contributions over a long interval of time
+ * each developer has to create an account on github.com portal. The
+ `developerid` is the username on github.com portal
+ * after getting developer access, it is still recommended to use pull request
+ for commits done to other components of Kamailio, to allow the main developer
+ of the component as well as the other developers to review the changes
+ * commits to own components can be pushed directly, without a pull request.
+ However, if the developer wants other people to review the changes, using a
+ pull request is the way to do it
+ * personal branches of developers done inside Kamailio GIT repository must be
+ prefixed with `developerid/`, e.g., `alice/new-feature`. Do not use just
+ `new-feature` or `alice-new-feature` or other variant without `developerid/`
+ * the [Contributions Basic Rules](#basic-rules) from the sections above have
+ to be followed as well after getting developer access
+
## Reporting Issues ##
Whenever reporting an issue, along with the description of the problems, try to