Re: [SR-Users] subnet match

2018-03-14 Thread Hugh Waite
Hi, The log message doesn't quite match your code sample. The code puts the subnet into the log, but your output does not have the /16 (in red below). Could you repeat and print all the avp's before and after is-in-subnet()? I can't remember if the subnet needs to have the lowest bits masked, but

Re: [SR-Users] Lua script reload

2018-03-14 Thread Daniel-Constantin Mierla
Hello, On 13.03.18 15:03, Igor Olhovskiy wrote: > Hi! > > I’m playing with new KEMI framework and trying to reload script > without reloading Kamailio. > > Lua code is mostly one from example. > > ... > modparam("app_lua", "load", "/etc/kamailio/lua/kamailio.lua") > cfgengine "lua" > ... > > So,

Re: [SR-Users] Lua script reload

2018-03-14 Thread Daniel-Constantin Mierla
has_totag() is exported by siputils module, not by textops. Cheers, Daniel On 13.03.18 15:15, Igor Olhovskiy wrote: > Maybe it’s due to errors in config (as syslog tells me), but according > to doc, there is no errors > > app_lua_run_ex(): error from Lua: /etc/kamailio/lua/kamailio.lua:394: >

Re: [SR-Users] R: R: Segmentation fault Dialog RPC

2018-03-14 Thread Daniel-Constantin Mierla
Hello, the question about testing with 5.1 was more like doing it on a separate instance, a testing server, just to see if you can reproduce it. I understand that upgrading the production can take time, but having a second server just for testing could be feasable (e.g., running inside a virtual

Re: [SR-Users] Lua script reload

2018-03-14 Thread Daniel-Constantin Mierla
Again, wrote in previous response, if you are looking for has_totag(), you look at the wrong module. However, regarding the exports, you are using a version during devel phase, upgrade to latest stable 5.1.x and you will get more exported functions. On the other hand, for some of the functions

Re: [SR-Users] subnet match

2018-03-14 Thread Daniel-Constantin Mierla
Hello, maybe it is what Hugh said in his response, respectively that the subnet needs to have the lowest bits masked. Can you run with debug=3? Maybe ipops module writes more debug message to track it. Cheers, Daniel On 14.03.18 13:33, volga...@networklab.ca wrote: > Hello Daniel, > I

Re: [SR-Users] Kamailio With SMPP

2018-03-14 Thread Daniel-Constantin Mierla
Hello, you can use kannel as a sms gateway (https://www.kannel.org). From kamailio you can do http query to kannel in order to send sms. Cheers, Daniel On 13.03.18 22:38, Amar Tinawi wrote: > Hello  > > Is there a method to integrate kamailio to an smpp smsc ?  > Thanks  > > >

Re: [SR-Users] subnet match

2018-03-14 Thread Daniel-Constantin Mierla
Hello, On 14.03.18 00:19, volga...@networklab.ca wrote: > Hello Everyone, > Not sure what I am missing, but can't match ip address to subnet > > Log says > >  INFO:

Re: [SR-Users] Lua script reload

2018-03-14 Thread Daniel-Constantin Mierla
5.1.0-dev6 is a development snapshot of v5.1.x, likely few months before having the full release out, with more new features. You should update to latest stable version 5.1.2. Cheers, Daniel On 13.03.18 15:04, Igor Olhovskiy wrote: > Kamailio version is kamailio 5.1.0-dev6 > > Regards, Igor > >

Re: [SR-Users] subnet match

2018-03-14 Thread volga629
I tried /30, /32, /24 none of them works. Slava. On Wed, Mar 14, 2018 at 9:39 AM, Daniel-Constantin Mierla wrote: Hello, maybe it is what Hugh said in his response, respectively that the subnet needs to have the lowest bits masked. Can you run with debug=3? Maybe ipops

Re: [SR-Users] subnet match

2018-03-14 Thread volga629
Hello Daniel, Thank you the following worked. Slava. On Wed, Mar 14, 2018 at 1:02 PM, Daniel-Constantin Mierla wrote: Based on what Hugh found, you need to use subnet masked address, so try like: if(!is_in_subnet("$si", "$(dd{s.select,0,.}).$(dd{s.select,1,.}).0.0/16"))

Re: [SR-Users] subnet match

2018-03-14 Thread Daniel-Constantin Mierla
If you set debug=3 and these are all log messages you got, then the debug level is diverted to another file by your syslog configuration. You should see a lot of log messages with "DEBUG" inside them. Cheers, Daniel On 14.03.18 14:21, volga...@networklab.ca wrote: > in debug in level 3 or 4 not

Re: [SR-Users] subnet match

2018-03-14 Thread Daniel-Constantin Mierla
Based on what Hugh found, you need to use subnet masked address, so try like: if(!is_in_subnet("$si", "$(dd{s.select,0,.}).$(dd{s.select,1,.}).0.0/16")) { Cheers, Daniel On 14.03.18 15:28, volga...@networklab.ca wrote: > I tried /30, /32, /24 none of them works. > > Slava. > > On Wed, Mar 14,

Re: [SR-Users] Lua script reload

2018-03-14 Thread Igor Olhovskiy
It was has_body(), not has_totag() Thanks for tip, will try to upgrade. This version was from debian repo. Also missing quite needed function like ds_is_from_list Regards, Igor On Mar 14, 2018, 11:13 AM +0200, Daniel-Constantin Mierla , wrote: > Again, wrote in previous

Re: [SR-Users] Lua script reload

2018-03-14 Thread Daniel-Constantin Mierla
On 14.03.18 16:53, Igor Olhovskiy wrote: > It was has_body(), not has_totag() Ohh, I misread... > > Thanks for tip, will try to upgrade. This version was from debian repo. Probably from debian repo for master branch, which meanwhile has kamailio 5.2.0-dev there. > > Also missing quite needed

[SR-Users] INFO: Relevant fixes in the last releases

2018-03-14 Thread Daniel-Constantin Mierla
Hello, I want to highlight that the last stable versions (for the latest 3 release series: 4.4, 5.0 and 5.1) include fixes for two issues that can crash a running instance of Kamailio, therefore it is strongly recommended to upgrade if you are using tmx or lcr modules. Next week a CVE report is

Re: [SR-Users] Dimensioning ds_hash_size value for dispatcher module

2018-03-14 Thread Alvaro Araos
Daniel, Muchas gracias por tu respuesta. Saludos, ALVARO ARAOS MÉNDEZ Director de Tecnología en FONOIP +56 2 2947 9000 alv...@fonoip.com | www.fonoip.com [2] Moisés Chacón 46, El Monte, RM El 08-03-2018 05:01, Daniel-Constantin Mierla escribió: > Hello, > > this hash table

Re: [SR-Users] subnet match

2018-03-14 Thread volga629
in debug in level 3 or 4 not providing any useful messages. Mar 14 14:10:20 prx00 kamailio[1414]: {2 2 INVITE 143678_rel51ZGUyMTI5YWE0Y2Q3OWIzYWQ4NmMyYmM2ZWI0M2IyYmE} 5(1421) exec: *** cfgtrace:failure_route=[NATMANAGE] c=[/etc/kamailio/kamailio.cfg] l=807 a=26 n=is_in_subnet Mar 14 14:10:20

Re: [SR-Users] subnet match

2018-03-14 Thread Hugh Waite
Hi, It looks from the code that the subnet IP address must be masked. https://github.com/kamailio/kamailio/blob/master/src/modules/ipops/ipops_mod.c#L393 if ((ip->s_addr & ipv4_mask) == net_addr.s_addr) return 1; return 0; So 10.1.1.0/24 will match 10.1.1.241 but 10.1.1.128/24 will NOT match

[SR-Users] Kamailio Edge Proxy & Kamailio Core Sip Server behind NAT

2018-03-14 Thread Ed
Hi all, I would like to thank you all for the work you are doing. Having a Kamailio Edge proxy (2 interfaces - 1 pvt, 1 public) & Kamailio Core Sip server behind NAT, is it necessary to set up rtpengine on both servers? Thanks, Ed ___ Kamailio (SER)