[SR-Users] Kamailio and exporting in-memory dialplan entries to another database

2019-03-07 Thread Olli Attila
Hello,

I was wondering that is there a command / procedure available in
Kamailio that would do dialplan.dump on a certain dialplan and then
export/write  the output to another sql database where another
dialplan table is present? This would be a sort of backup procedure
that I'm planning.

Cheers,
Olli

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


Re: [SR-Users] Licensing clarification of Kamailio scripting code

2019-03-07 Thread Olle E. Johansson


> On 7 Mar 2019, at 22:00, Henning Westerholt  wrote:
> 
> Am Mittwoch, 6. März 2019, 08:43:05 CET schrieb Wei Li Jiang:
>> I am aware the Kamailio itself as well as the native C modules are licensed
>> under the GPL.
>> What is the licensing situation with the Kamailio routing scripts, both
>> native and via KEMI?
> 
> Hello Wei,
> 
> I am not a lawyer, and for a definite answer to your particular case I'd 
> suggest you consult one.
> 
> You are correct, Kamailio is licensed mainly under GPL2 or later. The core is 
> licensed under the BSD license.
My interpretation is that while the core is contributed and the core source 
files are licensed
under BSD; the Kamailio distribution overall, including the core, is licensed 
under GPL2
when we distribute tarballs and distribution packages.

This includes the sample configuration files and the documentation READMEs 
included
in the distribution.

Again, I’m no lawyer either :-)

/O

> 
> About your question: 
> 
> Kamailio interprets the routing script during run-time. This does not enforce 
> a certain license on this particular Kamailio configuration script. You as an 
> author can choose a license that you prefer.
> 
> You will find a more extensive explanation in the GPL FAQ, first paragraph:
> 
> https://www.gnu.org/licenses/gpl-faq.html#IfInterpreterIsGPL
> 
> If you e.g. sell a Kamailio script to a customer, the customer can of course 
> access the script and look to it. It is available on the server in the end. 
> But this does not alter your right to choose a license.
> 
> Best regards,
> 
> Henning
> 
> -- 
> Henning Westerholt - https://skalatan.de/blog/
> Kamailio services - https://skalatan.de/services
> Kamailio security assessment - https://skalatan.de/de/assessment
> 
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


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


[SR-Users] "invalid cseq for aor" on registrar nodes

2019-03-07 Thread jay binks
Hi All,

I'm getting the ERROR message "invalid cseq for aor" on my registrar nodes
that sit behind my load balancers.

My LB's take REGISTER messages, perform all the AUTH, and post AUTH, the
messages are forwarded to my registrar nodes, and are then saved.

what im finding is messages similar to this :
ERROR: registrar [save.c:599]: test_max_contacts(): invalid cseq for aor


I believe everything is functioning as expected, AOR's are saved and
retrieved etc.
but at a minimum, this message is filling my logs with messages that look
scary!

( my ops team should not be expected to ignore ERROR Level log messages )

-- 
Sincerely

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


Re: [SR-Users] Licensing clarification of Kamailio scripting code

2019-03-07 Thread Henning Westerholt
Am Mittwoch, 6. März 2019, 08:43:05 CET schrieb Wei Li Jiang:
> I am aware the Kamailio itself as well as the native C modules are licensed
> under the GPL.
> What is the licensing situation with the Kamailio routing scripts, both
> native and via KEMI?

Hello Wei,

I am not a lawyer, and for a definite answer to your particular case I'd 
suggest you consult one.

You are correct, Kamailio is licensed mainly under GPL2 or later. The core is 
licensed under the BSD license.

About your question: 

Kamailio interprets the routing script during run-time. This does not enforce 
a certain license on this particular Kamailio configuration script. You as an 
author can choose a license that you prefer.

You will find a more extensive explanation in the GPL FAQ, first paragraph:

https://www.gnu.org/licenses/gpl-faq.html#IfInterpreterIsGPL

If you e.g. sell a Kamailio script to a customer, the customer can of course 
access the script and look to it. It is available on the server in the end. 
But this does not alter your right to choose a license.

Best regards,

Henning

-- 
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services
Kamailio security assessment - https://skalatan.de/de/assessment

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


Re: [SR-Users] Releasing Kamailio v5.2.2

2019-03-07 Thread PICCORO McKAY Lenz
El jue., 7 de mar. de 2019 a la(s) 09:12, Daniel-Constantin Mierla (
mico...@gmail.com) escribió:

> I think in old debian/other-linux distros, the /var/run/kamailio was
> created from init.d, not by kamailio. On newer OS versions, should be
> created by
>
debian 8, 9 , and "old" as you pointed does not use init.d by default...
and about systemd


> systemd/tmpfsd at startup, otherwise kamailio attempts to create if it has
> enough privileges.
>
seems that's the problem, systemd create it with root privilegies

in wheeze backported the kamailio and uses init.d and there's no problem.,
so "olders" dont seems have problem..
but noted that when kamailio starts the pid are owned by root!

Cheers,
> Daniel
> On 07.03.19 13:14, PICCORO McKAY Lenz wrote:
>
> the /var/run/kamailio directory for the fifo and crtl files STILL are
> denied for acces to the service
> as i can see directory are owed byt root and only ower and group have
> access
>
> kamailio 4.4 backported by me for Debian jessie have this:
> drwxr-xr-x 2 kamailio kamailio 100 Aug 15 17:33 kamailio
> kamailio 5.2 installed on buster/testing build from sources:
> drwxr-x--- 2 root root 120 Jan 30 09:35 kamailio
>
>
> Lenz McKAY Gerardo (PICCORO)
> http://qgqlochekone.blogspot.com
>
>
> El mié., 6 de mar. de 2019 a la(s) 04:00, Daniel-Constantin Mierla (
> mico...@gmail.com) escribió:
>
>> Hello,
>>
>> I am considering to release a new version from branch 5.2, respectively
>> v5.2.2, on next Monday, March 11.
>>
>> As usual, check if any fixes done on master for issues you reported were
>> backported to 5.2 already or not (I just pushed a bunch of backports
>> earlier today).
>>
>> Also, if you are aware of issues not reported to the bug tracker,
>> register them to get a chance to review and eventually fix.
>>
>> Cheers,
>> Daniel
>>
>> --
>> Daniel-Constantin Mierla -- www.asipto.com
>> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>> Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
>> Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA --
>> www.asipto.com
>>
>>
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
> Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
> www.asipto.com
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Sanity check with default_checks=0

2019-03-07 Thread Denys Pozniak
It shows error and sometimes it brakes REGISTER:
ERROR: sanity [sanity_mod.c:228]: w_sanity_check(): input parameter (0)
outside of valid range <1-16384)



чт, 7 мар. 2019 г. в 15:10, Daniel-Constantin Mierla :

> Hello,
>
> On 07.03.19 12:04, Denys Pozniak wrote:
> > Hello!
> >
> > I have Kamailio v4.4 and use (historical) the next param setting to
> > disable sanity check:
> > modparam("sanity", "default_checks", 0)
> >
> > I see that this value 0 is not described in module documentation, but
> > looks like this modparam behaves in another way on Kamailio v5.
> >
> > So my question is how to disable sanity checking in modparam?
>
> How it behaves in v5?
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
> Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA --
> www.asipto.com
>
>

-- 

BR,
Denys Pozniak
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Releasing Kamailio v5.2.2

2019-03-07 Thread Daniel-Constantin Mierla
Hello,

I think in old debian/other-linux distros, the /var/run/kamailio was
created from init.d, not by kamailio. On newer OS versions, should be
created by systemd/tmpfsd at startup, otherwise kamailio attempts to
create if it has enough privileges.

Cheers,
Daniel

On 07.03.19 13:14, PICCORO McKAY Lenz wrote:
>
> the /var/run/kamailio directory for the fifo and crtl files STILL are
> denied for acces to the service
> as i can see directory are owed byt root and only ower and group have
> access
>
> kamailio 4.4 backported by me for Debian jessie have this:
> |drwxr-xr-x 2 kamailio kamailio 100 Aug 15 17:33 kamailio|
> kamailio 5.2 installed on buster/testing build from sources:
> |drwxr-x--- 2 root root 120 Jan 30 09:35 kamailio
> |
>
>
> ||
>
> Lenz McKAY Gerardo (PICCORO)
> http://qgqlochekone.blogspot.com
>
>
> El mié., 6 de mar. de 2019 a la(s) 04:00, Daniel-Constantin Mierla
> (mico...@gmail.com ) escribió:
>
> Hello,
>
> I am considering to release a new version from branch 5.2,
> respectively
> v5.2.2, on next Monday, March 11.
>
> As usual, check if any fixes done on master for issues you
> reported were
> backported to 5.2 already or not (I just pushed a bunch of backports
> earlier today).
>
> Also, if you are aware of issues not reported to the bug tracker,
> register them to get a chance to review and eventually fix.
>
> Cheers,
> Daniel
>
> -- 
> Daniel-Constantin Mierla -- www.asipto.com 
> www.twitter.com/miconda  --
> www.linkedin.com/in/miconda 
> Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
> 
> Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC,
> USA -- www.asipto.com 
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org 
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com

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


Re: [SR-Users] Sanity check with default_checks=0

2019-03-07 Thread Daniel-Constantin Mierla
Hello,

On 07.03.19 12:04, Denys Pozniak wrote:
> Hello!
>
> I have Kamailio v4.4 and use (historical) the next param setting to
> disable sanity check:
> modparam("sanity", "default_checks", 0)
>
> I see that this value 0 is not described in module documentation, but
> looks like this modparam behaves in another way on Kamailio v5.
>
> So my question is how to disable sanity checking in modparam?

How it behaves in v5?

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com


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


Re: [SR-Users] Releasing Kamailio v5.2.2

2019-03-07 Thread PICCORO McKAY Lenz
the /var/run/kamailio directory for the fifo and crtl files STILL are
denied for acces to the service
as i can see directory are owed byt root and only ower and group have
access

kamailio 4.4 backported by me for Debian jessie have this:
drwxr-xr-x 2 kamailio kamailio 100 Aug 15 17:33 kamailio
kamailio 5.2 installed on buster/testing build from sources:
drwxr-x--- 2 root root 120 Jan 30 09:35 kamailio


Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com


El mié., 6 de mar. de 2019 a la(s) 04:00, Daniel-Constantin Mierla (
mico...@gmail.com) escribió:

> Hello,
>
> I am considering to release a new version from branch 5.2, respectively
> v5.2.2, on next Monday, March 11.
>
> As usual, check if any fixes done on master for issues you reported were
> backported to 5.2 already or not (I just pushed a bunch of backports
> earlier today).
>
> Also, if you are aware of issues not reported to the bug tracker,
> register them to get a chance to review and eventually fix.
>
> Cheers,
> Daniel
>
> --
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
> Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA --
> www.asipto.com
>
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Sanity check with default_checks=0

2019-03-07 Thread Denys Pozniak
Hello!

I have Kamailio v4.4 and use (historical) the next param setting to disable
sanity check:
modparam("sanity", "default_checks", 0)

I see that this value 0 is not described in module documentation, but looks
like this modparam behaves in another way on Kamailio v5.

So my question is how to disable sanity checking in modparam?
-- 

BR,
Denys Pozniak
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] log_prefix missing

2019-03-07 Thread Daniel-Constantin Mierla
Hello,

I haven't had the time to check the logs and relate from where they are
printed in the code, but as a general rule: the log prefix is used when
executing route blocks. If a log messages is printed from a part of the
code executed out of routing blocks actions (e.g., can be timer, evapi
worker process, ...), there is no log prefix set, because this one
requires a valid sip message structure to work with.

Cheers,
Daniel

On 07.03.19 10:36, Mikko Lehto wrote:
> Joonas wrote:
>
>> I am having a problem where log_prefix is missing on acc_cdr log row when
>> call is canceled.
> Hi, I didn't look at your specific case, but as a general note:
>
> there was similar issue earlier on tm failure_route as well.
> Reported on GH issue 1531, fixed in commit 
> eb2f25ca0810f966d089da3aa1e32e3e98a4ab16
>
> Maybe solution is somehow similar or maybe I am just wasting bandwidth.
>
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
Kamailio Advanced Training - Mar 25-27, 2019, in Washington, DC, USA -- 
www.asipto.com


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


Re: [SR-Users] log_prefix missing

2019-03-07 Thread Mikko Lehto
Joonas wrote:

> I am having a problem where log_prefix is missing on acc_cdr log row when
> call is canceled.

Hi, I didn't look at your specific case, but as a general note:

there was similar issue earlier on tm failure_route as well.
Reported on GH issue 1531, fixed in commit 
eb2f25ca0810f966d089da3aa1e32e3e98a4ab16

Maybe solution is somehow similar or maybe I am just wasting bandwidth.

-- 
Mikko

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


[SR-Users] log_prefix missing

2019-03-07 Thread Joonas Kamailio

Dear List,

I am having a problem where log_prefix is missing on acc_cdr log row 
when call is canceled.


Here is an example of two lines of acc_cdr log file, first one is 
completed normally and second one is canceled before 200 OK:


Mar  6 12:04:48 edge3 kamailio[27669]: NOTICE: {2 1 BYE 
23d4e04c0c79ff6950accbd1706b9...@example.com} acc [acc_cdr.c:367]: 
log_write_cdr(): start_time=1551873885.018; end_time=1551873888.379; 
duration=3.361;
Mar  6 12:03:40 edge3 kamailio[27707]: NOTICE: acc [acc_cdr.c:367]: 
log_write_cdr(): start_time=1551873809.148; end_time=1551873809.148; 
duration=0;


I tried to take a debug on this matter and noticed that log_prefix is 
lost at this point:


Mar  6 13:54:25 edge3 kamailio[10665]: DEBUG: {1 102 INVITE 
6917f51f0955bd8b3a1aa62361a47...@example.com} tm [t_lookup.c:1019]: 
t_check_msg(): msg (0x7f1a889a8a30) id=0 global id=0 T start=0x7f1a8899b450
Mar  6 13:54:25 edge3 kamailio[10665]: DEBUG: {1 102 INVITE 
6917f51f0955bd8b3a1aa62361a47...@example.com} tm [t_lookup.c:1092]: 
t_check_msg(): T (0x7f1a8899b450) already found for msg (0x7f1a889a8a30)!
Mar  6 13:54:25 edge3 kamailio[10665]: DEBUG: {1 102 INVITE 
6917f51f0955bd8b3a1aa62361a47...@example.com} dialog [dlg_var.c:97]: 
cb_dlg_locals_reset(): resetting the local dialog shortcuts on script 
callback: 2147483650
Mar  6 13:54:25 edge3 kamailio[10665]: DEBUG: tm [t_reply.c:1806]: 
relay_reply(): branch=0, save=0, relay=0 icode=0 msg status=487
Mar  6 13:54:25 edge3 kamailio[10665]: DEBUG:  
[core/msg_translator.c:2288]: generate_res_buf_from_sip_res(): old size: 
483, new size: 399


On normal call the prefix stays in intact:

Mar  6 13:57:29 edge3 kamailio[10670]: DEBUG: {2 103 BYE 
03cd8f3464d42b7b01966e6b1154e...@example.com} tm [t_lookup.c:1088]: 
t_check_msg(): msg (0x7f1a95baad10) id=2 global id=2 T end=0x7f1a8899f8f0
Mar  6 13:57:29 edge3 kamailio[10670]: DEBUG: {2 103 BYE 
03cd8f3464d42b7b01966e6b1154e...@example.com} tm [t_reply.c:2237]: 
reply_received(): org. status uas=0, uac[0]=0 local=0 is_invite=0)
Mar  6 13:57:29 edge3 kamailio[10670]: DEBUG: {2 103 BYE 
03cd8f3464d42b7b01966e6b1154e...@example.com} tm [t_reply.c:1263]: 
t_should_relay_response(): -> T_code=0, new_code=200
Mar  6 13:57:29 edge3 kamailio[10670]: DEBUG: {2 103 BYE 
03cd8f3464d42b7b01966e6b1154e...@example.com} tm [t_reply.c:1806]: 
relay_reply(): branch=0, save=0, relay=0 icode=0 msg status=200
Mar  6 13:57:29 edge3 kamailio[10670]: DEBUG: {2 103 BYE 
03cd8f3464d42b7b01966e6b1154e...@example.com}  
[core/msg_translator.c:2288]: generate_res_buf_from_sip_res(): old size: 
491, new size: 407


The problem exists at least in the following version:

version: kamailio 5.2.0 (x86_64/linux) c5216b
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, 
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_URI_SIZE 1024, 
BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB

poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: c5216b
compiled on 13:05:00 Jan  7 2019 with gcc 6.3.

Best Regards,
Joonas Keskitalo



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