Re: [SR-Users] Planning Kamailio v5.0.5

2017-12-18 Thread Daniel-Constantin Mierla
Hello,

short note to remind that later today I plan to release v5.0.5 out of
branch 5.0. Until the announcement of the release, any backports should
be announced on sr-dev mailing list not to conflict with building the
release.

Cheers,
Daniel


On 14.12.17 09:25, Daniel-Constantin Mierla wrote:
> Hello,
>
> I am considering to release in the near future a new version from branch
> 5.0, respectively v5.0.5, a candidate day being next week, on Tuesday,
> December 19, 2017.
>
> If you are aware of any issue in branch 5.0 which is not yet reported on
> github.com/kamailio/kamailio issues tracker, then do it as soon as
> possible to have a chance to look at it.
>
> Cheers,
> Daniel
>

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com


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


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-18 Thread Alex Balashov
Julien,

I am running PG 10. That is the only difference I can discern thus far,
but let me compare your notes to mine and see if I can spot anything.

Thank you very much for your testing and assistance!

On Mon, Dec 18, 2017 at 08:33:26PM -0800, Julien Chavanton wrote:

> kamailio510=# SELECT version();
> 
> version
> -
>  PostgreSQL 9.5.6 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu
> 4.8.2-19ubuntu1) 4.8.2, 64-bit
> (1 row)
> 
> 
> 
> #
> U 127.0.0.1:5061 -> 127.0.1.101:5060
> REGISTER sip:flowroute.com SIP/2.0.
> Via: SIP/2.0/UDP 127.0.1.1:5061;branch=z9hG4bK-29823-2-0.
> Via: SIP/2.0/UDP 1.1.1.2:5061;branch=z9hG4bK-29823-2-0.
> From: ;tag=2.
> To: .
> Call-ID: 2-29823@127.0.1.1.
> CSeq: 1 REGISTER.
> Contact: sip:10001-1@1.1.1.2:5061.
> Max-Forwards: 10.
> Expires: 3000.
> Content-Length: 0.
> Path: .
> .
> 
> #
> U 127.0.1.101:5060 -> 127.0.1.103:5060
> KDMQ sip:usrloc@127.0.1.103:5060 SIP/2.0.
> Via: SIP/2.0/UDP
> 127.0.1.101;branch=z9hG4bKdd91.f90e0903.0.
> To: .
> From:  >;tag=36786f8e01b2230090da58c495caeae0-9338.
> CSeq: 10 KDMQ.
> Call-ID: 567aa40265453df7-29439@127.0.1.101.
> Content-Length: 304.
> User-Agent: kamailio (5.1.0 (x86_64/linux)).
> Max-Forwards: 1.
> Content-Type: application/json.
> .
> {"action":1,"aor":"10001","ruid":"uloc-5a3891cf-72ff-1","c":"
> sip:10001-1@1.1.1.2:5061","received":"","path":"","callid":"
> 2-29823@127.0.1.1
> ","user_agent":"n/a","instance":"","expires":1513660874,"cseq":1,"flags":0,"cflags":0,"q":-1,"last_modified":1513657874,"methods":4294967295,"reg_id":0,"server_id":0}
> #
> U 127.0.1.101:5060 -> 127.0.0.1:5061
> SIP/2.0 200 OK.
> Via: SIP/2.0/UDP 127.0.1.1:5061;branch=z9hG4bK-29823-2-0;received=127.0.0.1.
> Via: SIP/2.0/UDP 1.1.1.2:5061;branch=z9hG4bK-29823-2-0.
> From: ;tag=2.
> To: ;tag=3a03bde2e7478628969f6eb67250a042.25c7.
> Call-ID: 2-29823@127.0.1.1.
> CSeq: 1 REGISTER.
> Contact: ;expires=3000,
> ;expires=1917,
> ;expires=1917,  >;expires=1917.
> Server: kamailio (5.1.0 (x86_64/linux)).
> Content-Length: 0.
> .
> 
> 
> 
> 
> On Mon, Dec 18, 2017 at 8:26 PM, Alex Balashov 
> wrote:
> 
> > Hello Julien,
> >
> > On Mon, Dec 18, 2017 at 08:17:54PM -0800, Julien Chavanton wrote:
> >
> > > Hi Alex, I have done some tests in a lab with dmq usrloc,
> >
> > Thank you for that!
> >
> > > With almost the same settings, only 2 servers using DMQ, the contacts are
> > > written into postgres when replicated, I wonder what is the problem you
> > are
> > > facing ?
> >
> > I wonder that too. :-) What version of PG?
> >
> > > Maybe double check the DB schema, just in case ?
> > > ../kamailio/utils/kamctl/postgres/usrloc-create.sql
> >
> > Yep, that's one of the first things I did. It's 100% conformant.
> >
> > Also, usrloc db_mode 3 without dmq_usrloc works just fine. This is
> > something highly specific to dmq_usrloc.
> >
> > > Maybe you could send the trace of the SIP REGISTER to emulate it in the
> > > test.
> >
> > I'm just testing pretty standard registrations from Bria on Android.
> >
> > -- Alex
> >
> > --
> > Alex Balashov | Principal | Evariste Systems LLC
> >
> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > Web: http://www.evaristesys.com/, http://www.csrpswitch.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


-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-18 Thread Julien Chavanton
kamailio510=# SELECT version();

version
-
 PostgreSQL 9.5.6 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu
4.8.2-19ubuntu1) 4.8.2, 64-bit
(1 row)



#
U 127.0.0.1:5061 -> 127.0.1.101:5060
REGISTER sip:flowroute.com SIP/2.0.
Via: SIP/2.0/UDP 127.0.1.1:5061;branch=z9hG4bK-29823-2-0.
Via: SIP/2.0/UDP 1.1.1.2:5061;branch=z9hG4bK-29823-2-0.
From: ;tag=2.
To: .
Call-ID: 2-29823@127.0.1.1.
CSeq: 1 REGISTER.
Contact: sip:10001-1@1.1.1.2:5061.
Max-Forwards: 10.
Expires: 3000.
Content-Length: 0.
Path: .
.

#
U 127.0.1.101:5060 -> 127.0.1.103:5060
KDMQ sip:usrloc@127.0.1.103:5060 SIP/2.0.
Via: SIP/2.0/UDP
127.0.1.101;branch=z9hG4bKdd91.f90e0903.0.
To: .
From: ;tag=36786f8e01b2230090da58c495caeae0-9338.
CSeq: 10 KDMQ.
Call-ID: 567aa40265453df7-29439@127.0.1.101.
Content-Length: 304.
User-Agent: kamailio (5.1.0 (x86_64/linux)).
Max-Forwards: 1.
Content-Type: application/json.
.
{"action":1,"aor":"10001","ruid":"uloc-5a3891cf-72ff-1","c":"
sip:10001-1@1.1.1.2:5061","received":"","path":"","callid":"
2-29823@127.0.1.1
","user_agent":"n/a","instance":"","expires":1513660874,"cseq":1,"flags":0,"cflags":0,"q":-1,"last_modified":1513657874,"methods":4294967295,"reg_id":0,"server_id":0}
#
U 127.0.1.101:5060 -> 127.0.0.1:5061
SIP/2.0 200 OK.
Via: SIP/2.0/UDP 127.0.1.1:5061;branch=z9hG4bK-29823-2-0;received=127.0.0.1.
Via: SIP/2.0/UDP 1.1.1.2:5061;branch=z9hG4bK-29823-2-0.
From: ;tag=2.
To: ;tag=3a03bde2e7478628969f6eb67250a042.25c7.
Call-ID: 2-29823@127.0.1.1.
CSeq: 1 REGISTER.
Contact: ;expires=3000,
;expires=1917,
;expires=1917, ;expires=1917.
Server: kamailio (5.1.0 (x86_64/linux)).
Content-Length: 0.
.




On Mon, Dec 18, 2017 at 8:26 PM, Alex Balashov 
wrote:

> Hello Julien,
>
> On Mon, Dec 18, 2017 at 08:17:54PM -0800, Julien Chavanton wrote:
>
> > Hi Alex, I have done some tests in a lab with dmq usrloc,
>
> Thank you for that!
>
> > With almost the same settings, only 2 servers using DMQ, the contacts are
> > written into postgres when replicated, I wonder what is the problem you
> are
> > facing ?
>
> I wonder that too. :-) What version of PG?
>
> > Maybe double check the DB schema, just in case ?
> > ../kamailio/utils/kamctl/postgres/usrloc-create.sql
>
> Yep, that's one of the first things I did. It's 100% conformant.
>
> Also, usrloc db_mode 3 without dmq_usrloc works just fine. This is
> something highly specific to dmq_usrloc.
>
> > Maybe you could send the trace of the SIP REGISTER to emulate it in the
> > test.
>
> I'm just testing pretty standard registrations from Bria on Android.
>
> -- Alex
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.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


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-18 Thread Alex Balashov
Hello Julien,

On Mon, Dec 18, 2017 at 08:17:54PM -0800, Julien Chavanton wrote:

> Hi Alex, I have done some tests in a lab with dmq usrloc,

Thank you for that!

> With almost the same settings, only 2 servers using DMQ, the contacts are
> written into postgres when replicated, I wonder what is the problem you are
> facing ?

I wonder that too. :-) What version of PG? 

> Maybe double check the DB schema, just in case ?
> ../kamailio/utils/kamctl/postgres/usrloc-create.sql

Yep, that's one of the first things I did. It's 100% conformant.

Also, usrloc db_mode 3 without dmq_usrloc works just fine. This is
something highly specific to dmq_usrloc.

> Maybe you could send the trace of the SIP REGISTER to emulate it in the
> test.

I'm just testing pretty standard registrations from Bria on Android. 

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-18 Thread Julien Chavanton
Hi Alex, I have done some tests in a lab with dmq usrloc,

--
version: kamailio 5.1.0 (x86_64/linux)

commit 28011aa9fdca7012103506d9a437c8e44dc8963c
Author: Daniel-Constantin Mierla 
Date:   Mon Dec 11 16:31:31 2017 +0100
--

With almost the same settings, only 2 servers using DMQ, the contacts are
written into postgres when replicated, I wonder what is the problem you are
facing ?

Maybe double check the DB schema, just in case ?
../kamailio/utils/kamctl/postgres/usrloc-create.sql


Maybe you could send the trace of the SIP REGISTER to emulate it in the
test.



The config I modified to try to test yours :

# - usrloc params -
modparam("usrloc", "db_url", "postgres://
postgres:cacao@127.0.0.1:5432/kamailio510")
modparam("usrloc", "db_mode", 3)
modparam("usrloc", "db_load", 0)
#modparam("usrloc", "db_insert_update", 1)
modparam("usrloc", "use_domain", 1)
modparam("usrloc", "nat_bflag", 6)
modparam("usrloc", "matching_mode", 2)
modparam("usrloc", "fetch_rows", 1)
modparam("usrloc", "timer_interval", 5)
modparam("usrloc", "timer_procs", 1)
modparam("usrloc", "db_timer_clean", 1)
modparam("usrloc", "hash_size", 19)
# extra just for testing
modparam("usrloc", "nat_bflag", 1)
modparam("usrloc", "desc_time_order", 0)
modparam("usrloc", "matching_mode", 0)
modparam("usrloc", "cseq_delay", 10)
modparam("usrloc", "fetch_rows", 1000)
modparam("usrloc", "hash_size", 16)

#!ifdef WITH_DMQ
loadmodule "dmq.so"
loadmodule "dmq_usrloc.so"
modparam("dmq", "server_address", "sip:127.0.1.103:5060")
modparam("dmq", "notification_address", "sip:127.0.1.101:5060")
modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "batch_size", 512)
modparam("dmq_usrloc", "batch_msg_size", 65536)
modparam("dmq_usrloc", "sync", 1)
#!endif





On Mon, Dec 18, 2017 at 6:00 AM, Alex Balashov 
wrote:

> Hello Charles,
>
> On Mon, Dec 18, 2017 at 11:50:55AM +, Charles Chance wrote:
>
> > Can you provide your usrloc and dmq_usrloc module parameters please?
>
> Well, naturally!
>
> modparam("usrloc", "nat_bflag", 1)
> modparam("usrloc", "use_domain", 1)
> modparam("usrloc", "db_url", "DB_DRIVER://DB_USER:DB_PASSWORD@DB_HOST
> /DB_NAME")
> modparam("usrloc", "db_mode", 3)
> modparam("usrloc", "desc_time_order", 0)
> #modparam("usrloc", "timer_interval", 60)
> modparam("usrloc", "matching_mode", 0)
> modparam("usrloc", "cseq_delay", 10)
> modparam("usrloc", "fetch_rows", 1000)
> modparam("usrloc", "hash_size", 16)
> modparam("usrloc", "timer_procs", 1)
>
> modparam("dmq", "server_address", "sip::5060")
> modparam("dmq", "notification_address", "sip:evaristesys-testbed-2:5060")
> modparam("dmq_usrloc", "enable", 1)
> modparam("dmq_usrloc", "batch_size", 512)
> modparam("dmq_usrloc", "batch_msg_size", 65536)
>
> -- Alex
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.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] PIPELIMIT - limit change after time interval change. bug?

2017-12-18 Thread Juan Priotti
Hi,
I'm making some tests with pipelimit module and when changing the time
interval the limit gets changed in a way that it's multiplied by the time
interval. For example if I use a time interval of 1 second and a limit of
20 (if (!pl_check("$si", "TAILDROP", "20"))) the module start limiting
right after the traffic gets over 20 CPS. But if I change the time interval
to 3 seconds, the module starts limiting the traffic right after 60 CPS.
This is my configuration:

# - pipelimit params-
modparam("pipelimit", "timer_interval", 3)
modparam("pipelimit", "hash_size", 10)
modparam("pipelimit", "db_url", DBURL)
modparam("pipelimit", "reply_code", 503)
modparam("pipelimit", "reply_reason", "Limiting")

...
...
...

request_route {
...
...
if(is_method("INVITE")) {
$var(limit) = 20;
if (!pl_check("$si", "TAILDROP", "$var(limit)")) {
xlog("L_INFO", "[$ci] $si - Limiting INVITE using pipe
$var(limit) req/sec\n");
pl_drop();
exit;
}
.
.
.
}
}


Checking the source for pipelimit module (
https://github.com/kamailio/kamailio/blob/master/src/modules/pipelimit/pipelimit.c)
I see that for taildrop it's checking for the limit times the time_interval:

case PIPE_ALGO_TAILDROP:
ret = (pipe->counter <= pipe->limit * timer_interval) ? 1 : -1;
break;

I've made a change eliminating the time_interval (set it to 1) from that
check and after that I've got the limit working OK, and the traffic gets
drop right after it's over the limit (20 cps) using any time_interval. Is
there some issue with the timer for the check not being updated by the
module settings (timer_interval)? I'm using kamailio 4.4 and I've also
tested it in kamailio 4.3 and 5.1 with same results.
Thanks in advance,

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


[SR-Users] Kamailio World 2018 - Call for Presentations

2017-12-18 Thread Daniel-Constantin Mierla
Hello,

I would like to announce that Call for Presentations at Kamailio World
2018 is now open. You can submit your proposal or see more details at:

  - https://www.kamailioworld.com/k06/call-for-speakers/

The 6th edition of the event takes place again in Berlin, Germany,
during May 14-16, 2018. Expect over 150 participants, developers and
community members as well as representatives from other popular open
source VoIP projects such as Asterisk or FreeSwitch.

Looking forward to meeting many of you there!

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com


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


Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-18 Thread Alex Balashov
Hello Charles,

On Mon, Dec 18, 2017 at 11:50:55AM +, Charles Chance wrote:

> Can you provide your usrloc and dmq_usrloc module parameters please?

Well, naturally!

modparam("usrloc", "nat_bflag", 1)
modparam("usrloc", "use_domain", 1)
modparam("usrloc", "db_url", "DB_DRIVER://DB_USER:DB_PASSWORD@DB_HOST/DB_NAME")
modparam("usrloc", "db_mode", 3)
modparam("usrloc", "desc_time_order", 0)
#modparam("usrloc", "timer_interval", 60)
modparam("usrloc", "matching_mode", 0)
modparam("usrloc", "cseq_delay", 10)
modparam("usrloc", "fetch_rows", 1000)
modparam("usrloc", "hash_size", 16)
modparam("usrloc", "timer_procs", 1)

modparam("dmq", "server_address", "sip::5060")
modparam("dmq", "notification_address", "sip:evaristesys-testbed-2:5060")
modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "batch_size", 512)
modparam("dmq_usrloc", "batch_msg_size", 65536)

-- Alex

-- 
Alex Balashov | Principal | Evariste Systems LLC

Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free) 
Web: http://www.evaristesys.com/, http://www.csrpswitch.com/

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


Re: [SR-Users] Do configuration script file comes under GPL License?

2017-12-18 Thread Daniel-Constantin Mierla
Hello,


On 18.12.17 07:58, Seshu Kumar G wrote:
>
> Hello Everyone,
>
>
> We are using only modifying Kamailio configuration files (In IMS
> application), to tune to our application,  without modifying any
> underlying software.
>
> Does configuration script files comes under GPL License?

as far as I know, config files were not exposed to the license of the
application. But I am not a lawyer to really confirm this rule.

On the other hand, if needed to clarify this aspect, have it simple and
straight, we can explicitly make config files shipped as part of
kamailio distribution under public domain.

If anyone has other opinions or suggestions, let's discuss them.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - www.asipto.com
Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com

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


Re: [SR-Users] 5.0 to 5.1 - No module matching found

2017-12-18 Thread Daniel-Constantin Mierla
I did a test here with geoip2 module and the $gip2(...) variable works fine.

Cheers,
Daniel


On 17.12.17 03:33, Daniel W. Graham wrote:
>
> Issue on new image was a linker config issue, (missing
> /usr/local/lib/). I verified this existed on the previous image so my
> best guess is the original issue was related to selinux.
>
>  
>
> -dan
>
>  
>
> *From:*sr-users [mailto:sr-users-boun...@lists.kamailio.org] *On
> Behalf Of *Daniel W. Graham
> *Sent:* Saturday, December 16, 2017 2:42 AM
> *To:* Kamailio (SER) - Users Mailing List
> ; mico...@gmail.com
> *Subject:* Re: [SR-Users] 5.0 to 5.1 - No module matching  found
>
>  
>
> Didn’t notice the issue with libmaxminddb.so.0
>
>  
>
> # ls -l /usr/local/lib/
>
> lrwxrwxrwx 1 root root 21 Dec 15 23:00 libmaxminddb.so ->
> libmaxminddb.so.0.0.7
>
> lrwxrwxrwx 1 root root 21 Dec 15 23:00 libmaxminddb.so.0 ->
> libmaxminddb.so.0.0.7
>
> -rwxr-xr-x 1 root root  81472 Dec 15 23:00 libmaxminddb.so.0.0.7
>
>  
>
> I did get the libmaxminddb.so.0  error to go away while using my
> previous cfg file, I’ll dig in more later.
>
>  
>
> -dan
>
>  
>
> *From:*sr-users [mailto:sr-users-boun...@lists.kamailio.org] *On
> Behalf Of *Daniel W. Graham
> *Sent:* Saturday, December 16, 2017 2:04 AM
> *To:* Kamailio (SER) - Users Mailing List  >; mico...@gmail.com
> 
> *Subject:* Re: [SR-Users] 5.0 to 5.1 - No module matching  found
>
>  
>
> After a clean system install (CentOS 7) -
>
>  
>
> Using default 5.1 cfg file this time for testing with these added
> lines (in proper locations):
>
>  
>
> loadmodule "geoip2.so"
>
>  
>
> modparam("geoip2", "path", "/usr/local/share/GeoIP/GeoLite2-City.mmdb")
>
>  
>
> if (geoip2_match("$si", "src")) {
>
>     }
>
>  
>
> ERROR:  [core/sr_module.c:582]: load_module(): could not open
> module :
> libmaxminddb.so.0: cannot open shared object file: No such file or
> directory
>
> CRITICAL:  [core/cfg.y:3447]: yyerror_at(): parse error in
> config file /usr/local/etc/kamailio/kamailio.cfg, line 241, column
> 12-22: failed to load module
>
> ERROR:  [core/modparam.c:152]: set_mod_param_regex(): No module
> matching  found
>
> CRITICAL:  [core/cfg.y:3450]: yyerror_at(): parse error in
> config file /usr/local/etc/kamailio/kamailio.cfg, line 291, column 71:
> Can't set module parameter
>
> ERROR:  [core/cfg.y:3310]: yyparse(): cfg. parser: failed to
> find command geoip2_match (params 2)
>
> CRITICAL:  [core/cfg.y:3450]: yyerror_at(): parse error in
> config file /usr/local/etc/kamailio/kamailio.cfg, line 457, column 31:
> unknown command, missing loadmodule?
>
> CRITICAL:  [core/cfg.y:3450]: yyerror_at(): parse error in
> config file /usr/local/etc/kamailio/kamailio.cfg, line 458, column 2:
> syntax error
>
> CRITICAL:  [core/cfg.y:3450]: yyerror_at(): parse error in
> config file /usr/local/etc/kamailio/kamailio.cfg, line 458, column 2:
>
> INFO:  [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API not
> initialized
>
>  
>
> (Starts fine without the above config lines)
>
>  
>
> # ls -l /usr/local/lib64/kamailio/modules/ | grep geo
>
> -rwxr-xr-x 1 root root   73800 Dec 16 01:44 geoip2.so
>
>  
>
> ls -l /usr/local/share/GeoIP | grep Geo
>
> -rw-r--r-- 1 root root 63478091 Dec 15 23:08 GeoLite2-City.mmdb
>
>  
>
> version: kamailio 5.1.0 (x86_64/linux)
>
> flags: STATS: Off, 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 23:13:35 Dec 15 2017 with gcc 4.8.5
>
>  
>
> # uname -r
>
> 3.10.0-693.el7.x86_64
>
>  
>
> Again, I have working fine on another host, that does have a different
> kernel version / other packages.
>
> Any ideas?
>
>  
>
> -dan
>
>  
>
> *From:*sr-users [mailto:sr-users-boun...@lists.kamailio.org] *On
> Behalf Of *Daniel W. Graham
> *Sent:* Friday, December 15, 2017 11:08 AM
> *To:* mico...@gmail.com ; Kamailio (SER) -
> Users Mailing List  >
> *Subject:* Re: [SR-Users] 5.0 to 5.1 - No module matching  found
>
>  
>
> I noticed that there were SE contexts applied to pretty much all
> folders, /usr/bin/lib (where my libmaxminddb lives)  /usr/local/sbin
> and even /usr/local/src/.
>
>  
>
> The security context applied was: unconfined_u:object_r:usr_t:s0
>
>  
>
> I haven’t figured out what caused this, as I have systems without this
> behavior. My guess is it is related to disabling selinux after the
> build was complete. Despite my 

Re: [SR-Users] kamailio 4.4.5 Crash

2017-12-18 Thread Daniel-Constantin Mierla
Hello,

are you monitoring memory usage?

kamctl stats shmem

Is it increasing over the time?

Cheers,
Daniel


On 15.12.17 16:16, Andrew Paul wrote:
> Hi Daniel,
>
> We were running the kamailio without any issue after changing the
> shared memory to 1024. We dont have any issue on last two months. 
>
> But today we got the issue and we are not able to connect new tls
> connections. 
>
> Dec 15 08:13:56 webrtc /usr/sbin/kamailio[19550]: ERROR: tls
> [tls_server.c:190]: tls_complete_init(): tls: ssl bug #1491
> workaround: not enough memory for safe operation: shm=9886536
> threshold1=9961472
> Dec 15 08:13:56 webrtc /usr/sbin/kamailio[19550]: ERROR: 
> [tcp_read.c:1321]: tcp_read_req(): ERROR: tcp_read_req: error reading
> - c: 0x7f642bb1c668 r: 0x7f642bb1c6e8
> Dec 15 08:13:56 webrtc /usr/sbin/kamailio[19550]: ERROR: tls
> [tls_server.c:190]: tls_complete_init(): tls: ssl bug #1491
> workaround: not enough memory for safe operation: shm=9886536
> threshold1=9961472
> Dec 15 08:13:56 webrtc /usr/sbin/kamailio[19550]: ERROR: 
> [tcp_read.c:1321]: tcp_read_req(): ERROR: tcp_read_req: error reading
> - c: 0x7f642bb1c668 r: 0x7f642bb1c6e8
>
> There is no crash, it is only low memory and new connections not
> occuring. 
>
> Can you suggest what can be the resolution here ?. Do we need a
> process restart to free up the memory resource ?. 
>
> Regards
>
> Varghese Paul 
>
> On Wed, Oct 11, 2017 at 2:28 PM, Sergey Safarov  > wrote:
>
> Hello Daniel
> Could you look this ticket with attached backtrace
> https://2600hz.atlassian.net/browse/KAZOO-5699
> 
>
> I not sure where is root of issue. May be your comment clean this.
>
>
>
> ср, 11 окт. 2017 г. в 10:43, Daniel-Constantin Mierla
> >:
>
> Still curious if you got a core file so far (or it was just
> those error messages) and if yes, it would be good to get the
> backtrace.
>
> Cheers,
> Daniel
>
>
> On 11.10.17 05:27, Andrew Paul wrote:
>> Thanks Daniel. We have increase shm memory to 1024 from 64
>> and private memory to 64 from 8MB.
>>
>> We will closely monitor and will update the thread if
>> encounter any issue.
>>
>> Regards
>>
>> Varghese Paul 
>>
>> On Tue, Oct 10, 2017 at 10:04 PM, Daniel-Constantin Mierla
>> > wrote:
>>
>> Hello,
>>
>> these errors do not indicate a crash, but unability to
>> read due to low available memory. Did you get a crash
>> (kamailio stopped)? If yes, any core file from where you
>> can extract the backtrace?
>>
>> Anyhow, as hint, if you use a lot of tls, increase the
>> size for shared memory, it is needed a lot there.
>>
>> Cheers,
>> Daniel
>>
>>
>> On 10.10.17 16:32, Andrew Paul wrote:
>>> Hi all,
>>>
>>> We were using kamailio 4.4.5 and we enabled only for webrtc.
>>>
>>> We were observing two memory crashed in last two weeks. 
>>>
>>> Oct 10 01:03:03 webrtc /usr/sbin/kamailio[18002]: ERROR:
>>>  [tcp_read.c:1321]: tcp_read_req(): ERROR:
>>> tcp_read_req: error reading - c: 0x7f21ea8f6198 r:
>>> 0x7f21ea8f6218
>>> Oct 10 01:03:04 webrtc /usr/sbin/kamailio[18003]: ERROR:
>>> tls [tls_server.c:190]: tls_complete_init(): tls: ssl
>>> bug #1491 workaround: not enough memory for safe
>>> operation: shm=9926856 threshold1=9961472
>>> Oct 10 01:03:04 webrtc /usr/sbin/kamailio[18003]: ERROR:
>>>  [tcp_read.c:1321]: tcp_read_req(): ERROR:
>>> tcp_read_req: error reading - c: 0x7f21ea8f6198 r:
>>> 0x7f21ea8f6218
>>> Oct 10 01:03:05 webrtc /usr/sbin/kamailio[18004]: ERROR:
>>> tls [tls_server.c:190]: tls_complete_init(): tls: ssl
>>> bug #1491 workaround: not enough memory for safe
>>> operation: shm=9926856 threshold1=9961472
>>> Oct 10 01:03:05 webrtc /usr/sbin/kamailio[18004]: ERROR:
>>>  [tcp_read.c:1321]: tcp_read_req(): ERROR:
>>> tcp_read_req: error reading - c: 0x7f21ea8f6198 r:
>>> 0x7f21ea8f6218
>>>
>>>
>>> Is there any known issue for tls module in
>>> kamailio_4.4.5 ?. We are using default 64MB for shared
>>> memory and 8MB for private memory. Do we need to
>>> increase this ?.
>>>
>>> Regards
>>>
>>> Andrew
>>>
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org
>>> 
>>>  

[SR-Users] Dispatcher module OPTIONS and event routes: how are they handled by core?

2017-12-18 Thread George Diamantopoulos
Hello all,

I use the dispatcher module extensively for load balancing and fail-over.
My kamailio instance is multihomed, and I use the "socket" attribute to
determine which socket SIP messages should use for each dispatcher
destination, as such:

++---+-+---+--+-+
| id | setid | destination | flags | priority |
attrs   |
++---+-+---+--+-+
|  1 | 0 | sip:192.168.0.1:5060| 8 |0 | socket=udp:
10.10.10.1:5060  |
|  2 | 1 | sip:111.111.11.1:5060   | 8 |0 | socket=udp:
44.44.44.1:5060  |
|  3 | 1 | sip:222.222.22.2:5060   | 8 |0 | socket=udp:
55.55.55.1:5060  |
++---+-+---+--+-+

The dispatcher module uses OPTIONS to probe each destination for
availability. When a destination goes down or up, the respective
event-route is executed.

What I need to do is to be able to "capture" the sending socket used for
this probing when a destination becomes unavailable or available in the
event-routes. The $fs variable is set, but unfortunately its value does not
make sense. Here's an example route and the results that are printed:

event_route[dispatcher:dst-down] {
xlog("L_ERR", "Destination down: $rm $ru ($du) $ds $fs $Ru $T_req($fs)
$T_req($Ru)\n");
}

Now say destination with id = '2' goes down. This is what I get in the logs
for the event_route above:

ERROR: 

Re: [SR-Users] dmq_usrloc, usrloc:db_mode 3, and PostgreSQL

2017-12-18 Thread Charles Chance
Hi Alex,

Can you provide your usrloc and dmq_usrloc module parameters please?

Cheers,

Charles


On Fri, 15 Dec 2017 at 20:54, Alex Balashov 
wrote:

> By way of follow-up:
>
> db_mode 1 likewise fails, in the same fashion.
>
> db_mode 2 does work and successfully sync the contact to the DB on
> timer_interval.
>
> So, I suspect this is some sort of race that raises when immediate
> database write-through is required.
>
> On Fri, Dec 15, 2017 at 02:31:06PM -0500, Alex Balashov wrote:
>
> > Hi,
> >
> > Running bleeding-edge branch 5.1 clone here.
> >
> > dmq_usrloc replication works fine when using in-memory only backing for
> > the underlying usrloc module, i.e. db_mode 0. I haven't tried mode 1 and
> > mode 2.
> >
> > I use mode 3, so that contacts are immediately persisted straight to a
> > local database. The database flavour is PostgreSQL in this case.
> >
> > When new contacts replicated via dmq_usrloc come in, I get this in the
> > Kamailio log:
> >
> > Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR:  [db.c:465]: db_use_table(): invalid parameter value
> > Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR: usrloc [udomain.c:817]: db_load_urecord_by_ruid(): failed to use
> table location
> > Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> WARNING: dmq_usrloc [usrloc_sync.c:147]: delete_contact(): AOR/Contact not
> found
> > Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR:  [db.c:465]: db_use_table(): invalid parameter value
> > Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR: usrloc [udomain.c:817]: db_load_urecord_by_ruid(): failed to use
> table location
> > Dec 15 19:23:35 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> WARNING: dmq_usrloc [usrloc_sync.c:147]: delete_contact(): AOR/Contact not
> found
> >
> > I added some code to lib/srdb1/db.c to print the parameter name and the
> > location being passed to db_use_table():
> >
> >   */
> >  int db_use_table(db1_con_t* _h, const str* _t)
> >  {
> > +   LM_ERR("DB handle = %p\n", _h);
> > +
> > if (!_h || !_t || !_t->s) {
> > -   LM_ERR("invalid parameter value\n");
> > +   LM_ERR("invalid parameter value %.*s\n", _t->len, _t->s);
> > return -1;
> > }
> >
> > And got this:
> >
> > Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR:  [db.c:462]: db_use_table(): DB handle = (nil)
> > Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR:  [db.c:465]: db_use_table(): invalid parameter value location
> > Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR: usrloc [udomain.c:631]: db_load_urecord(): failed to use table
> location
> > Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR:  [db.c:462]: db_use_table(): DB handle = (nil)
> > Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR:  [db.c:465]: db_use_table(): invalid parameter value location
> > Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR: usrloc [ucontact.c:679]: db_insert_ucontact(): sql use_table failed
> > Dec 15 19:23:36 evaristesys-testbed-2 /usr/local/sbin/kamailio[9395]:
> ERROR: usrloc [urecord.c:582]: insert_ucontact(): failed to insert in
> database
> >
> > So, it appears the DB handle being passed here is NULL is in this
> > situation.
> >
> > The same AOR is present in 'ul.dump' RPC command when using db_mode 0.
> >
> > Please advise? :)
> >
> > -- Alex
> >
> > --
> > Alex Balashov | Principal | Evariste Systems LLC
> >
> > Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> > Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
> >
> > ___
> > Kamailio (SER) - Users Mailing List
> > sr-users@lists.kamailio.org
> > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Alex Balashov | Principal | Evariste Systems LLC
>
> Tel: +1-706-510-6800 / +1-800-250-5920 (toll-free)
> Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>

-- 
Sipcentric Ltd. Company registered in England & Wales no. 7365592. Registered 
office: Faraday Wharf, Innovation Birmingham Campus, Holt Street, 
Birmingham Science Park, Birmingham B7 4BB.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users