[sr-dev] [kamailio/kamailio] BLOG conversion (#1255)

2017-09-28 Thread sergey-safarov
### Description

I use kazoo and postgres modules on my host. I found that many database 
operation generates error like
```
19(150) exec: *** 
cfgtrace:request_route=[kazoo:consumer-event-presence-dialog-update] 
c=[//etc/kamailio/presence-role.cfg] l=270 a=32 n=kazoo_pua_publish_presence
17(148) exec: *** 
cfgtrace:request_route=[kazoo:consumer-event-presence-dialog-update] 
c=[//etc/kamailio/presence-role.cfg] l=271 a=27 n=pres_refresh_watchers
Entity: line 1: parser error : Start tag expected, '<' not found
\x3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223f3e3c
^
17(148) ERROR: presence_xml [notify_body.c:551]: agregate_xmls(): while parsing 
xml body message
17(148) ERROR: presence_xml [notify_body.c:156]: pres_agg_nbody(): while 
aggregating body
19(150) exec: *** 
cfgtrace:request_route=[kazoo:consumer-event-presence-dialog-update] 
c=[//etc/kamailio/presence-role.cfg] l=271 a=27 n=pres_refresh_watchers
Entity: line 1: parser error : Start tag expected, '<' not found
\x3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223f3e3c
^
19(150) ERROR: presence_xml [notify_body.c:551]: agregate_xmls(): while parsing 
xml body message
19(150) ERROR: presence_xml [notify_body.c:156]: pres_agg_nbody(): while 
aggregating body
18(149) exec: *** cfgtrace:request_route=[kazoo:consumer-event-nodes-advertise] 
c=[//etc/kamailio/nodes-role.cfg] l=66 a=63 n=assign
18(149) exec: *** cfgtrace:request_route=[kazoo:consumer-event-nodes-advertise] 
c=[//etc/kamailio/nodes-role.cfg] l=74 a=16 n=if
18(149) exec: *** cfgtrace:request_route=[kazoo:consumer-event-nodes-advertise] 
c=[//etc/kamailio/nodes-role.cfg] l=74 a=16 n=if
18(149) exec: *** cfgtrace:request_route=[kazoo:consumer-event-nodes-advertise] 
c=[//etc/kamailio/nodes-role.cfg] l=75 a=27 n=mq_add
Entity: line 1: parser error : Start tag expected, '<' not found
\x3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223f3e3c
^
17(148) ERROR: presence_xml [notify_body.c:551]: agregate_xmls(): while parsing 
xml body message
17(148) ERROR: presence_xml [notify_body.c:156]: pres_agg_nbody(): while 
aggregating body
Entity: line 1: parser error : Start tag expected, '<' not found
\x3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223f3e3c
^
19(150) ERROR: presence_xml [notify_body.c:551]: agregate_xmls(): while parsing 
xml body message
19(150) ERROR: presence_xml [notify_body.c:156]: pres_agg_nbody(): while 
aggregating body
Entity: line 1: parser error : Start tag expected, '<' not found
\x3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223f3e3c
^
17(148) ERROR: presence_xml [notify_body.c:551]: agregate_xmls(): while parsing 
xml body message
17(148) ERROR: presence_xml [notify_body.c:156]: pres_agg_nbody(): while 
aggregating body
17(148) exec: *** 
cfgtrace:request_route=[kazoo:consumer-event-presence-dialog-update] 
c=[//etc/kamailio/presence-role.cfg] l=276 a=26 n=xlog
17(148) INFO: 

[sr-dev] [kamailio/kamailio] need to refresh database script (#1254)

2017-09-28 Thread sergey-safarov
During loading kamailio i got error
```
 0(55) ERROR:  [db.c:450]: db_check_table_version(): invalid version 8 
for table location found, expected 9 (check table structure and table "version")
 0(55) ERROR: usrloc [dlist.c:659]: register_udomain(): error during table 
version check.
 0(55) ERROR: registrar [registrar.c:651]: domain_fixup(): failed to register 
domain
```

Module now use version 9 of table `location` but script contains version 8.
Please update database scripts

-- 
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/1254___
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] memory configuration using environment vars (#1252)

2017-09-28 Thread Luis Azedo
i think you can set shm_mem_size in script to a #DEFINE that can be overridden 
with -A


in script


#DEFINE SHM_MEM 64


shm_mem_size = #DEFINE



then kamailio -A SHM_MEM=32


haven't tried it, but Daniel mentioned -A in the devel meeting.


not sure if there's a pkg_mem we can also use.



From: sr-dev  on behalf of sergey-safarov 

Sent: Thursday, September 28, 2017 8:47:21 AM
To: Kamailio Devel List
Cc: Subscribed
Subject: [sr-dev] [kamailio/kamailio] memory configuration using environment 
vars (#1252)

Description

Docker container at runtime is configured using environment vars.
Kamailio now not supports configure memory using environment vars and need use 
workarroud like 
entrypoint.sh.

I want remove this workarround but need to add ability to configure kamailio 
memory using vars SHM_MEMORY and PKG_MEMORY when kamailio started without -m 
and -M keys

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on 
GitHub, or mute the 
thread.
___
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] Problem with process limit at startup (#1237)

2017-09-28 Thread Julien Chavanton
This is on Linux Alpine in docker

-- 
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/1237#issuecomment-332881939___
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] Problem with process limit at startup (#1237)

2017-09-28 Thread Julien Chavanton
sorry for the delay, I was thinking I would receive an email notification

14 processes
```
/ # ps | grep kamailio
7 root   0:03 /usr/sbin/kamailio
   24 root   0:00 /usr/sbin/kamailio
   25 root   0:00 /usr/sbin/kamailio
   26 root   0:00 /usr/sbin/kamailio
   27 root   0:00 /usr/sbin/kamailio
   28 root   0:00 /usr/sbin/kamailio
   29 root   0:00 /usr/sbin/kamailio
   30 root   0:00 /usr/sbin/kamailio
   31 root   0:00 /usr/sbin/kamailio
   32 root   0:00 /usr/sbin/kamailio
   33 root   0:00 /usr/sbin/kamailio
   34 root   0:00 /usr/sbin/kamailio
   35 root   0:00 /usr/sbin/kamailio
   36 root   0:00 /usr/sbin/kamailio
```

```
/ # kamcmd ps
7   main process - attendant
24  udp receiver child=0 sock=117.75.69.33:5060
25  udp receiver child=0 sock=117.75.69.33:5160
26  slow timer
27  timer
28  secondary timer
29  JSONRPC-S FIFO
30  JSONRPC-S DATAGRAM
31  ctl handler
32  RTIMER EXEC child=0 timer=tmetrics
33  HTable Timer
34  Dialog Clean Timer
35  tcp receiver (generic) child=0
36  tcp main process
```
If you do not find the answer spontaneously, I will  troubleshoot it further

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


[sr-dev] [kamailio/kamailio] Add stop_recording function, and make start/stop_recording functions accept flags (#1253)

2017-09-28 Thread Paul Claudiu Boriga




 Pre-Submission Checklist



- [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
- [ ] 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:

- [ ] PR should be backported to stable branches
- [x] Tested changes locally
- [ ] Related to issue # (replace  with an open issue number)

 Description


ce5362d adds stop_recording function that is similar to start_recording. This 
is useful when wanting to stop recording in the middle of the call since it has 
it's own message and is not attached to the offer/answer/delete message (like 
the "record-call off" flag in rtpengine_manage function).

45b4d35  enables the use of flags with both start_recording and stop_recording 
functions. This allows overwriting fields like call-id to start/stop recording 
for different ongoing calls (for example from a rtimer route).
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * rtpengine: add stop_recording function
  * rtpengine: make start_recording and stop_recording accept flags

-- File Changes --

M src/modules/rtpengine/doc/rtpengine_admin.xml (37)
M src/modules/rtpengine/rtpengine.c (55)
M src/modules/rtpengine/rtpengine.h (1)

-- Patch Links --

https://github.com/kamailio/kamailio/pull/1253.patch
https://github.com/kamailio/kamailio/pull/1253.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/1253
___
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] cancel the branches instantly instead of on provisional replies (#909)

2017-09-28 Thread Brandon Armstead
Perhaps look at onreply_route{ }

As well as: t_any_replied(), 

https://kamailio.org/docs/modules/5.0.x/modules/tm.html#tm.f.t_any_replied

This may help achieve your desired outcome.

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


[sr-dev] git:master:9339850b: xhttp_pi: updated the path for installation of pi_framework.xml

2017-09-28 Thread Daniel-Constantin Mierla
Module: kamailio
Branch: master
Commit: 9339850b0c6ad13b796afe37f84db81d00aa3861
URL: 
https://github.com/kamailio/kamailio/commit/9339850b0c6ad13b796afe37f84db81d00aa3861

Author: Daniel-Constantin Mierla 
Committer: Daniel-Constantin Mierla 
Date: 2017-09-28T12:32:22+02:00

xhttp_pi: updated the path for installation of pi_framework.xml

---

Modified: src/modules/xhttp_pi/Makefile

---

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

---

diff --git a/src/modules/xhttp_pi/Makefile b/src/modules/xhttp_pi/Makefile
index 8bfb1f8543..6e4b23b63c 100644
--- a/src/modules/xhttp_pi/Makefile
+++ b/src/modules/xhttp_pi/Makefile
@@ -42,7 +42,8 @@ install-cfg:
@$(call try_err, mkdir -p $(cfg_prefix)/$(cfg_dir))
@$(call try_err, $(INSTALL_TOUCH) \
$(cfg_prefix)/$(cfg_dir)/pi_framework.xml.sample)
-   @$(call try_err, $(INSTALL_CFG) ../../../misc/examples/pi_framework.xml 
\
+   @$(call try_err, $(INSTALL_CFG) \
+   ../../../misc/examples/pi_framework/pi_framework.xml \
$(cfg_prefix)/$(cfg_dir)/pi_framework.xml.sample)
@if [ -z "${skip_cfg_install}" -a \
! -f $(cfg_prefix)/$(cfg_dir)/pi_framework.xml ]; then \


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


[sr-dev] [kamailio/kamailio] memory configuration using environment vars (#1252)

2017-09-28 Thread sergey-safarov
### Description
Docker container at runtime is configured using environment vars.
Kamailio now not supports configure memory using environment vars and need use 
workarroud like 
[entrypoint.sh](https://github.com/kamailio/kamailio/blob/master/pkg/kamailio/alpine_docker/entrypoint.sh).

I want remove this workarround but need to add ability to configure kamailio 
memory using vars `SHM_MEMORY` and `PKG_MEMORY` when kamailio started without 
`-m` and `-M` keys 

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


Re: [sr-dev] use key dynamic for xavp

2017-09-28 Thread Daniel-Constantin Mierla
Hello,


iirc, xavp specs do not support variables in their name, it would
require some C coding.


Getting the value might be possible using pv_evalx(), the result should
be string, but then using {s.int} can get it to int.


If you need an workaround, you can probably do it with using sqlops with
sql_xquery and some temporary tables, but it can look strange in config. 


Cheers,
Daniel

On 28.09.17 05:46, Luis Azedo wrote:
>
> Hi List,
>
>
> shouldn't this be possible ?
>
>
> $xavp(ulattrs=>first) = 33;
>
> $var(ccv) = "whatever";
> $xavp(ulattrs[0]=>$var(ccv)) = "some value";
>
> when using in the particular case of usrloc attrs, i see the value of
> the attr created as "first" (correct) and "$var(ccv)" which i believe
> is incorrect, it should be "whatever".
>
> thoughts ?
>
>
>
>
>
> ___
> Kamailio (SER) - Development Mailing List
> sr-dev@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - www.kamailioworld.com

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


[sr-dev] git:master:1473be69: cfgt: format code using clang-format

2017-09-28 Thread Victor Seva
Module: kamailio
Branch: master
Commit: 1473be69e191c6873cfc4e2501999ebeb8a45159
URL: 
https://github.com/kamailio/kamailio/commit/1473be69e191c6873cfc4e2501999ebeb8a45159

Author: Victor Seva 
Committer: Victor Seva 
Date: 2017-09-28T08:41:57+02:00

cfgt: format code using clang-format

---

Modified: src/modules/cfgt/cfgt.c
Modified: src/modules/cfgt/cfgt.h
Modified: src/modules/cfgt/cfgt_int.c
Modified: src/modules/cfgt/cfgt_int.h
Modified: src/modules/cfgt/cfgt_json.c
Modified: src/modules/cfgt/cfgt_json.h
Modified: src/modules/cfgt/cfgt_mod.c
Modified: src/modules/cfgt/cfgt_mod.h

---

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


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