Re: [sr-dev] mysql_ping in db_mysql_submit_query

2019-09-12 Thread Daniel-Constantin Mierla

On 11.09.19 21:20, Juha Heinanen wrote:
> Juha Heinanen writes:
>
>> Unfortunately udp receiver hangs also without mysql_ping.  Now hang
>> happens in insert (below).
>>
>> Will try next without cluster if regular insert would work.
> So far no hang when acc is not using cluster db_url.
>
> Cluster has two connections with mode "5s5s".
>
> If I have understood correctly, underlying db_mysql module is not aware
> of the cluster.  If so, how could use of cluster cause hang in
> libmariadb?

Are the two connections going to the same mysql server? Or different ones?

Are you able to see from the logs if writing to the first connection
failed and it tried to the second one?

db_cluster does some basic operations here, in the way that tries to use
the first connection and if the underlying module returns error, it
tries via the second one. It doesn't do anything specific for the
connector module and the connector module should not be aware of the
db_cluster.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- 
https://asipto.com/u/kat


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] mysql_ping in db_mysql_submit_query

2019-09-12 Thread Juha Heinanen
Daniel-Constantin Mierla writes:

> Are the two connections going to the same mysql server? Or different ones?

Different ones.

> Are you able to see from the logs if writing to the first connection
> failed and it tried to the second one?

No, everything seems normal.  Here is the last working acc insert before the 
freeze:

Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: acc [acc_logic.c:446]: 
should_acc_reply(): acc is on
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: db_cluster 
[dbcl_api.c:482]: db_cluster_use_table(): use table (accounting) - cluster 
[sip_proxy_usage_cluster]
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: db_cluster 
[dbcl_api.c:491]: db_cluster_use_table(): set read table (accounting) - cluster 
[sip_proxy_usage_cluster] (5/0)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: db_cluster 
[dbcl_api.c:501]: db_cluster_use_table(): set write table (accounting) - 
cluster [sip_proxy_usage_cluster] (5/0)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: db_cluster 
[dbcl_api.c:491]: db_cluster_use_table(): set read table (accounting) - cluster 
[sip_proxy_usage_cluster] (4/0)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: db_cluster 
[dbcl_api.c:501]: db_cluster_use_table(): set write table (accounting) - 
cluster [sip_proxy_usage_cluster] (4/0)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: db_cluster 
[dbcl_api.c:378]: db_cluster_insert(): executing db cluster insert command
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: db_cluster 
[dbcl_api.c:379]: db_cluster_insert(): serial operation - cluster 
[sip_proxy_usage_cluster] (5/0)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: acc [acc_extra.h:63]: 
free_strar_mem(): Freeing memory, type is 2, message_index 7, index i 0
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG: tm [t_reply.c:1667]: 
cleanup_uac_timers(): RETR/FR timers reset
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG:  
[core/receive.c:442]: receive_msg(): reply-route executed in: 1395 usec
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG:  
[core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG:  
[core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG:  
[core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG:  
[core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG:  
[core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG:  
[core/usr_avp.c:636]: destroy_avp_list(): destroying list (nil)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG:  [core/xavp.c:495]: 
xavp_destroy_list(): destroying xavp list (nil)
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG:  
[core/receive.c:458]: receive_msg(): cleaning up
Sep  2 12:00:20 rox2 /usr/bin/sip-proxy[341]: DEBUG:  
[core/udp_server.c:491]: udp_rcv_loop(): received on udp socket: (112/100/1063) 
[[INVITE ...]]

After that there is a couple of these:

Sep  2 12:00:21 rox2 /usr/bin/sip-proxy[341]: DEBUG: acc [acc_logic.c:413]: 
should_acc_reply(): probing acc state - code: 183 flags: 0x200209c0
Sep  2 12:00:21 rox2 /usr/bin/sip-proxy[341]: DEBUG: acc [acc_logic.c:442]: 
should_acc_reply(): early media acc is off

And finally the last should_acc_reply() before the freeze that does not
result to any kind db_cluster entry in syslog:

Sep  2 12:00:21 rox2 /usr/bin/sip-proxy[341]: DEBUG: acc [acc_logic.c:413]: 
should_acc_reply(): probing acc state - code: 480 flags: 0x240005c4
Sep  2 12:00:21 rox2 /usr/bin/sip-proxy[341]: DEBUG: acc [acc_logic.c:430]: 
should_acc_reply(): failed acc is on
Sep  2 12:00:21 rox2 /usr/bin/sip-proxy[341]: DEBUG: tm [t_lookup.c:]: 
t_check_msg(): msg (0x7f2383bea9e0) id=12872/341 global id=12872/341 T 
end=0x7f236b1cc3f0
Sep  2 12:00:21 rox2 /usr/bin/sip-proxy[341]: DEBUG: tm [t_reply.c:2243]: 
reply_received(): transaction found - T:0x7f236b1cc3f0 branch:0

Next process 341 entry in syslog is 13+ minutes later after the freeze:

Sep  2 12:13:55 rox2 /usr/bin/sip-proxy[341]: DEBUG: tm [t_reply.c:2256]: 
reply_received(): org. status uas=408, uac[0]=408 local=0 is_invite=1)

-- Juha

___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


Re: [sr-dev] [kamailio/kamailio] Kemi API xlog doesn't support log_facility configuration (#2064)

2019-09-12 Thread adil-mafzool
thanks @miconda 
Wanted this feature to be logged as when you are moving from native to the kemi 
system it become easier

-- 
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/2064#issuecomment-530878591___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:5.1:468403d9: acc: extend documentation related to flag usage

2019-09-12 Thread Henning Westerholt
Module: kamailio
Branch: 5.1
Commit: 468403d98d8aec4a833e3f9a9be1913efe9897c8
URL: 
https://github.com/kamailio/kamailio/commit/468403d98d8aec4a833e3f9a9be1913efe9897c8

Author: Henning Westerholt 
Committer: Henning Westerholt 
Date: 2019-09-12T23:40:58+02:00

acc: extend documentation related to flag usage

(cherry picked from commit 40905046baab49fb3baf0f2fdded1307b023d08a)

---

Modified: src/modules/acc/doc/acc_admin.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/468403d98d8aec4a833e3f9a9be1913efe9897c8.diff
Patch: 
https://github.com/kamailio/kamailio/commit/468403d98d8aec4a833e3f9a9be1913efe9897c8.patch

---

diff --git a/src/modules/acc/doc/acc_admin.xml 
b/src/modules/acc/doc/acc_admin.xml
index 2588243f7c..36753ae10c 100644
--- a/src/modules/acc/doc/acc_admin.xml
+++ b/src/modules/acc/doc/acc_admin.xml
@@ -489,7 +489,9 @@ modparam("acc", "early_media", 1)
failed_transaction_flag 
(integer)

Per transaction flag which says if the transaction should be
-   accounted also in case of failure (status>=300).
+   accounted also in case of failure (SIP status code >= 300).
+   This flag triggers accouting when the whole transaction fails
+   (on the server side).


Default value is not-set (no flag).
@@ -679,12 +681,12 @@ modparam("acc", "log_flag", 2)

Request flag which needs to be set to account missed calls via 
syslog.
This can be used to e.g. account failures during the call setup 
phase
-   from the callee side, for example if you do forking to several
+   from the callee (client) side, for example if you do forking to 
several
destinations.


-   Keep in mind that this flag is reset after processing. 
Therefore it is
-   necessary to set it again e.g. in a failure_route if you do 
serial
+   Keep in mind that this flag is reset after branch completion. 
Therefore
+   it is necessary to set it again e.g. in a failure_route if you 
do serial
forking and want to log all attempts.


@@ -775,8 +777,15 @@ modparam("acc", "db_flag", 2)

db_missed_flag (integer)

-   Request flag which needs to be set to account missed
-   calls -- database specific.
+   Request flag which needs to be set to account missed calls via 
database.
+   This can be used to e.g. account failures during the call setup 
phase
+   from the callee (client) side, for example if you do forking to 
several
+   destinations.
+   
+   
+   Keep in mind that this flag is reset after branch completion. 
Therefore
+   it is necessary to set it again e.g. in a failure_route if you 
do serial
+   forking and want to log all attempts.


Default value is not-set (no flag).


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:40905046: acc: extend documentation related to flag usage

2019-09-12 Thread Henning Westerholt
Module: kamailio
Branch: master
Commit: 40905046baab49fb3baf0f2fdded1307b023d08a
URL: 
https://github.com/kamailio/kamailio/commit/40905046baab49fb3baf0f2fdded1307b023d08a

Author: Henning Westerholt 
Committer: Henning Westerholt 
Date: 2019-09-12T21:53:21+02:00

acc: extend documentation related to flag usage

---

Modified: src/modules/acc/doc/acc_admin.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/40905046baab49fb3baf0f2fdded1307b023d08a.diff
Patch: 
https://github.com/kamailio/kamailio/commit/40905046baab49fb3baf0f2fdded1307b023d08a.patch

---

diff --git a/src/modules/acc/doc/acc_admin.xml 
b/src/modules/acc/doc/acc_admin.xml
index 61e27a196e..a0794ca562 100644
--- a/src/modules/acc/doc/acc_admin.xml
+++ b/src/modules/acc/doc/acc_admin.xml
@@ -489,7 +489,9 @@ modparam("acc", "early_media", 1)
failed_transaction_flag 
(integer)

Per transaction flag which says if the transaction should be
-   accounted also in case of failure (status>=300).
+   accounted also in case of failure (SIP status code >= 300).
+   This flag triggers accouting when the whole transaction fails
+   (on the server side).


Default value is not-set (no flag).
@@ -679,12 +681,12 @@ modparam("acc", "log_flag", 2)

Request flag which needs to be set to account missed calls via 
syslog.
This can be used to e.g. account failures during the call setup 
phase
-   from the callee side, for example if you do forking to several
+   from the callee (client) side, for example if you do forking to 
several
destinations.


-   Keep in mind that this flag is reset after processing. 
Therefore it is
-   necessary to set it again e.g. in a failure_route if you do 
serial
+   Keep in mind that this flag is reset after branch completion. 
Therefore
+   it is necessary to set it again e.g. in a failure_route if you 
do serial
forking and want to log all attempts.


@@ -775,8 +777,15 @@ modparam("acc", "db_flag", 2)

db_missed_flag (integer)

-   Request flag which needs to be set to account missed
-   calls -- database specific.
+   Request flag which needs to be set to account missed calls via 
database.
+   This can be used to e.g. account failures during the call setup 
phase
+   from the callee (client) side, for example if you do forking to 
several
+   destinations.
+   
+   
+   Keep in mind that this flag is reset after branch completion. 
Therefore
+   it is necessary to set it again e.g. in a failure_route if you 
do serial
+   forking and want to log all attempts.


Default value is not-set (no flag).


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:5.2:daab9563: acc: extend documentation related to flag usage

2019-09-12 Thread Henning Westerholt
Module: kamailio
Branch: 5.2
Commit: daab9563d3edcdf59028ca5b4004bc1d6edecced
URL: 
https://github.com/kamailio/kamailio/commit/daab9563d3edcdf59028ca5b4004bc1d6edecced

Author: Henning Westerholt 
Committer: Henning Westerholt 
Date: 2019-09-12T23:40:52+02:00

acc: extend documentation related to flag usage

(cherry picked from commit 40905046baab49fb3baf0f2fdded1307b023d08a)

---

Modified: src/modules/acc/doc/acc_admin.xml

---

Diff:  
https://github.com/kamailio/kamailio/commit/daab9563d3edcdf59028ca5b4004bc1d6edecced.diff
Patch: 
https://github.com/kamailio/kamailio/commit/daab9563d3edcdf59028ca5b4004bc1d6edecced.patch

---

diff --git a/src/modules/acc/doc/acc_admin.xml 
b/src/modules/acc/doc/acc_admin.xml
index 61e27a196e..a0794ca562 100644
--- a/src/modules/acc/doc/acc_admin.xml
+++ b/src/modules/acc/doc/acc_admin.xml
@@ -489,7 +489,9 @@ modparam("acc", "early_media", 1)
failed_transaction_flag 
(integer)

Per transaction flag which says if the transaction should be
-   accounted also in case of failure (status>=300).
+   accounted also in case of failure (SIP status code >= 300).
+   This flag triggers accouting when the whole transaction fails
+   (on the server side).


Default value is not-set (no flag).
@@ -679,12 +681,12 @@ modparam("acc", "log_flag", 2)

Request flag which needs to be set to account missed calls via 
syslog.
This can be used to e.g. account failures during the call setup 
phase
-   from the callee side, for example if you do forking to several
+   from the callee (client) side, for example if you do forking to 
several
destinations.


-   Keep in mind that this flag is reset after processing. 
Therefore it is
-   necessary to set it again e.g. in a failure_route if you do 
serial
+   Keep in mind that this flag is reset after branch completion. 
Therefore
+   it is necessary to set it again e.g. in a failure_route if you 
do serial
forking and want to log all attempts.


@@ -775,8 +777,15 @@ modparam("acc", "db_flag", 2)

db_missed_flag (integer)

-   Request flag which needs to be set to account missed
-   calls -- database specific.
+   Request flag which needs to be set to account missed calls via 
database.
+   This can be used to e.g. account failures during the call setup 
phase
+   from the callee (client) side, for example if you do forking to 
several
+   destinations.
+   
+   
+   Keep in mind that this flag is reset after branch completion. 
Therefore
+   it is necessary to set it again e.g. in a failure_route if you 
do serial
+   forking and want to log all attempts.


Default value is not-set (no flag).


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] [kamailio/kamailio] ims_isc: fixed the RURI trigger point match (#2065)

2019-09-12 Thread grosssoftware
- use the RURI from the SIP message in the regex compare, rather
  than the regex string from the trigger point

!-- 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 youre unsure about any of these, dont hesitate to ask on 
sr-dev mailing list --
- [x] Commit message has the format required by CONTRIBUTING guide
- [x] Commits are split per component (core, individual modules, libs, utils, 
...)
- [x] Each component has a single commit (if not, squash them into one commit)
- [x] 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
- [x] Small bug fix (non-breaking change which fixes an issue)
- [ ] 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 --
- [x] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue # (replace  with an open issue number)

 Description
!-- Describe your changes in detail --

You can view, comment on, or merge this pull request online at:

  https://github.com/kamailio/kamailio/pull/2065

-- Commit Summary --

  * ims_isc: fixed the RURI trigger point match

-- File Changes --

M src/modules/ims_isc/checker.c (14)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/2065.patch
https://github.com/kamailio/kamailio/pull/2065.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/2065
___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev


[sr-dev] git:master:9f514da4: modules: readme files regenerated - acc ... [skip ci]

2019-09-12 Thread Kamailio Dev
Module: kamailio
Branch: master
Commit: 9f514da4f0e601d246ffdeee837ca4c5f0488084
URL: 
https://github.com/kamailio/kamailio/commit/9f514da4f0e601d246ffdeee837ca4c5f0488084

Author: Kamailio Dev 
Committer: Kamailio Dev 
Date: 2019-09-12T23:47:23+02:00

modules: readme files regenerated - acc ... [skip ci]

---

Modified: src/modules/acc/README

---

Diff:  
https://github.com/kamailio/kamailio/commit/9f514da4f0e601d246ffdeee837ca4c5f0488084.diff
Patch: 
https://github.com/kamailio/kamailio/commit/9f514da4f0e601d246ffdeee837ca4c5f0488084.patch

---

diff --git a/src/modules/acc/README b/src/modules/acc/README
index 022c65f341..bd73411bae 100644
--- a/src/modules/acc/README
+++ b/src/modules/acc/README
@@ -684,7 +684,8 @@ modparam("acc", "early_media", 1)
 6.2. failed_transaction_flag (integer)
 
Per transaction flag which says if the transaction should be accounted
-   also in case of failure (status>=300).
+   also in case of failure (SIP status code >= 300). This flag triggers
+   accouting when the whole transaction fails (on the server side).
 
Default value is not-set (no flag).
 
@@ -818,12 +819,12 @@ modparam("acc", "log_flag", 2)
 
Request flag which needs to be set to account missed calls via syslog.
This can be used to e.g. account failures during the call setup phase
-   from the callee side, for example if you do forking to several
+   from the callee (client) side, for example if you do forking to several
destinations.
 
-   Keep in mind that this flag is reset after processing. Therefore it is
-   necessary to set it again e.g. in a failure_route if you do serial
-   forking and want to log all attempts.
+   Keep in mind that this flag is reset after branch completion. Therefore
+   it is necessary to set it again e.g. in a failure_route if you do
+   serial forking and want to log all attempts.
 
Default value is not-set (no flag).
 
@@ -882,8 +883,14 @@ modparam("acc", "db_flag", 2)
 
 6.16. db_missed_flag (integer)
 
-   Request flag which needs to be set to account missed calls -- database
-   specific.
+   Request flag which needs to be set to account missed calls via
+   database. This can be used to e.g. account failures during the call
+   setup phase from the callee (client) side, for example if you do
+   forking to several destinations.
+
+   Keep in mind that this flag is reset after branch completion. Therefore
+   it is necessary to set it again e.g. in a failure_route if you do
+   serial forking and want to log all attempts.
 
Default value is not-set (no flag).
 


___
Kamailio (SER) - Development Mailing List
sr-dev@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev