[SR-Users] XMPP

2019-06-18 Thread David Villasmil
Hello guys,

I'm kind of confused as to what module exactly i need to user, let me
explain:

I have a service for DIDs and SMS from s.ms, i created a python script that
connects to the service using xmpp to their jabber server with a user and a
password, i.e.: xmpp_client.py my-num...@s.ms MY-PASSWORD

What i do with that script is basically connect and wait to receive SMS,
which i then insert in the proxy db (silo) and they get delivered by msilo.

I have several numbers and doing this for every number seems stupid, so i
started looking for a better solution, since the end user will be receive
the message via SIP MESSAGE on they sip client.

i came across kamailio/opensips' jabber and xmpp modules, but i'm not sure
which (if any) to use, and even HOW to, or the actual architecture, since
the documentation keeps talking about a local xmpp server?

I would REALLY appreciate some help here.

Thanks!


Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337
Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Question on Database Version Table

2019-06-18 Thread Alex Balashov
On Tue, Jun 18, 2019 at 10:09:56PM +0200, Daniel-Constantin Mierla wrote:

> Where did you meet such situation? 

I wish I could remember. It's been in various times over the years, but
I never filed a bug report--probably because I didn't really perceive it
as a bug consciously. :-) If I had to guess, I think it was in usrloc.

-- 
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] Question on Database Version Table

2019-06-18 Thread Daniel-Constantin Mierla

On 18.06.19 21:50, Alex Balashov wrote:
> It's probably also worth noting that Kamailio's DB layer offers
> "unpredictable" reactions to columns which are missing and which the
> given version expects to be there. 

Where did you meet such situation? A missing but expected column should
end up in an error at the sql query layer, because kamailio modules
explicitely do select/insert/... with column names.

The only unpredictable situation with some modules may be when the
column exist, but has a different type than expected. But a missing
column should be handled because of the db query error.

Cheers,
Daniel

>
> "Unpredictable" generally means a crash, but when it happens -- the
> presence of columns isn't always validated at boot time, depends on the
> module -- is the unpredictable part... 
>
> So, modernising your DB schema for built-in module tables, including
> seldom-used tables which are nevertheless formally used to back some
> module, is important when doing upgrades.
>
> On Tue, Jun 18, 2019 at 02:46:27PM -0500, JR Richardson wrote:
>
>> Yep
>> version_table
>> Set the name of the table holding the table version. Useful if the
>> proxy is sharing a database within a project and during upgrades.
>> Default value is “version”.
>> Example of usage:
>> version_table="version44"
>>
>> That's what I was looking for, perfect!
>>
>> Yes, I added accountcode and notes to my table for internal use, was
>> just making notes on columns I need on the new version upgrade.
>>
>> Thanks.
>>
>> JR
>>
>>
>> On Tue, Jun 18, 2019 at 2:17 PM Daniel-Constantin Mierla
>>  wrote:
>>> Hello,
>>>
>>> like Alex said, you can have two version tables, one for each versions
>>> of kamailio you play with and use in config the core parameter to set
>>> the name of that table.
>>>
>>> I am actually writing to say that address table never had accountcode
>>> and notes columns. Likely they were added in your deployment for other
>>> purposes or either the default column names were changed. The default
>>> column names are listed at:
>>>
>>>   -
>>> https://kamailio.org/docs/db-tables/kamailio-db-5.2.x.html#gen-db-address
>>>
>>> These were the same for rather long time, iirc the recent version number
>>> changed mainly due to with modifications done to the size, not due to
>>> new columns.
>>>
>>> Cheers,
>>> Daniel
>>>
>>> On 18.06.19 20:50, JR Richardson wrote:
 Hey All,

 I'm doing some upgrades and noticed database table version numbers
 have increased.

 database table adjustments:
 | address | production ver 3 | upgrade 5.2 ver 6 | need to add
 accountcode and notes column
 | dispatcher | production ver 3 | upgrade 5.2 ver 4 | need to add attr 
 column
 | trusted | production ver 5 | upgrade 5.2 ver 6 | need to add
 ruri_pattern and priority column

 I run mysql master/slave so I'm concerned about the master database
 not having the correct version numbers or can I just update the
 version number in the table when I do the upgrade of the kamailio
 versions?

 Thanks.

 JR
>> ___
>> 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 (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Question on Database Version Table

2019-06-18 Thread Alex Balashov
It's probably also worth noting that Kamailio's DB layer offers
"unpredictable" reactions to columns which are missing and which the
given version expects to be there. 

"Unpredictable" generally means a crash, but when it happens -- the
presence of columns isn't always validated at boot time, depends on the
module -- is the unpredictable part... 

So, modernising your DB schema for built-in module tables, including
seldom-used tables which are nevertheless formally used to back some
module, is important when doing upgrades.

On Tue, Jun 18, 2019 at 02:46:27PM -0500, JR Richardson wrote:

> Yep
> version_table
> Set the name of the table holding the table version. Useful if the
> proxy is sharing a database within a project and during upgrades.
> Default value is “version”.
> Example of usage:
> version_table="version44"
> 
> That's what I was looking for, perfect!
> 
> Yes, I added accountcode and notes to my table for internal use, was
> just making notes on columns I need on the new version upgrade.
> 
> Thanks.
> 
> JR
> 
> 
> On Tue, Jun 18, 2019 at 2:17 PM Daniel-Constantin Mierla
>  wrote:
> >
> > Hello,
> >
> > like Alex said, you can have two version tables, one for each versions
> > of kamailio you play with and use in config the core parameter to set
> > the name of that table.
> >
> > I am actually writing to say that address table never had accountcode
> > and notes columns. Likely they were added in your deployment for other
> > purposes or either the default column names were changed. The default
> > column names are listed at:
> >
> >   -
> > https://kamailio.org/docs/db-tables/kamailio-db-5.2.x.html#gen-db-address
> >
> > These were the same for rather long time, iirc the recent version number
> > changed mainly due to with modifications done to the size, not due to
> > new columns.
> >
> > Cheers,
> > Daniel
> >
> > On 18.06.19 20:50, JR Richardson wrote:
> > > Hey All,
> > >
> > > I'm doing some upgrades and noticed database table version numbers
> > > have increased.
> > >
> > > database table adjustments:
> > > | address | production ver 3 | upgrade 5.2 ver 6 | need to add
> > > accountcode and notes column
> > > | dispatcher | production ver 3 | upgrade 5.2 ver 4 | need to add attr 
> > > column
> > > | trusted | production ver 5 | upgrade 5.2 ver 6 | need to add
> > > ruri_pattern and priority column
> > >
> > > I run mysql master/slave so I'm concerned about the master database
> > > not having the correct version numbers or can I just update the
> > > version number in the table when I do the upgrade of the kamailio
> > > versions?
> > >
> > > Thanks.
> > >
> > > JR
> 
> ___
> 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] Question on Database Version Table

2019-06-18 Thread JR Richardson
Yep
version_table
Set the name of the table holding the table version. Useful if the
proxy is sharing a database within a project and during upgrades.
Default value is “version”.
Example of usage:
version_table="version44"

That's what I was looking for, perfect!

Yes, I added accountcode and notes to my table for internal use, was
just making notes on columns I need on the new version upgrade.

Thanks.

JR


On Tue, Jun 18, 2019 at 2:17 PM Daniel-Constantin Mierla
 wrote:
>
> Hello,
>
> like Alex said, you can have two version tables, one for each versions
> of kamailio you play with and use in config the core parameter to set
> the name of that table.
>
> I am actually writing to say that address table never had accountcode
> and notes columns. Likely they were added in your deployment for other
> purposes or either the default column names were changed. The default
> column names are listed at:
>
>   -
> https://kamailio.org/docs/db-tables/kamailio-db-5.2.x.html#gen-db-address
>
> These were the same for rather long time, iirc the recent version number
> changed mainly due to with modifications done to the size, not due to
> new columns.
>
> Cheers,
> Daniel
>
> On 18.06.19 20:50, JR Richardson wrote:
> > Hey All,
> >
> > I'm doing some upgrades and noticed database table version numbers
> > have increased.
> >
> > database table adjustments:
> > | address | production ver 3 | upgrade 5.2 ver 6 | need to add
> > accountcode and notes column
> > | dispatcher | production ver 3 | upgrade 5.2 ver 4 | need to add attr 
> > column
> > | trusted | production ver 5 | upgrade 5.2 ver 6 | need to add
> > ruri_pattern and priority column
> >
> > I run mysql master/slave so I'm concerned about the master database
> > not having the correct version numbers or can I just update the
> > version number in the table when I do the upgrade of the kamailio
> > versions?
> >
> > Thanks.
> >
> > JR

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


Re: [SR-Users] Question on Database Version Table

2019-06-18 Thread Daniel-Constantin Mierla
Hello,

like Alex said, you can have two version tables, one for each versions
of kamailio you play with and use in config the core parameter to set
the name of that table.

I am actually writing to say that address table never had accountcode
and notes columns. Likely they were added in your deployment for other
purposes or either the default column names were changed. The default
column names are listed at:

  -
https://kamailio.org/docs/db-tables/kamailio-db-5.2.x.html#gen-db-address

These were the same for rather long time, iirc the recent version number
changed mainly due to with modifications done to the size, not due to
new columns.

Cheers,
Daniel

On 18.06.19 20:50, JR Richardson wrote:
> Hey All,
>
> I'm doing some upgrades and noticed database table version numbers
> have increased.
>
> database table adjustments:
> | address | production ver 3 | upgrade 5.2 ver 6 | need to add
> accountcode and notes column
> | dispatcher | production ver 3 | upgrade 5.2 ver 4 | need to add attr column
> | trusted | production ver 5 | upgrade 5.2 ver 6 | need to add
> ruri_pattern and priority column
>
> I run mysql master/slave so I'm concerned about the master database
> not having the correct version numbers or can I just update the
> version number in the table when I do the upgrade of the kamailio
> versions?
>
> Thanks.
>
> JR

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda


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


Re: [SR-Users] Question on Database Version Table

2019-06-18 Thread Alex Balashov
Hi JR,

A Kamailio of a given version will want the version table entries it
expects for its version, and will blow up on boot if it does not find
them. But it is safe to update them while Kamailio is running, as long
as you acknowledge that Kamailio will not start properly if it crashes
or is restarted unless the correct table versions are in place.

Best practice for upgrading in parallel - that is, any situation where
multiple Kamailio instances (e.g. active and standby) share a database
and need to both be running at the same time - is to make use of this
core config parameter:

https://www.kamailio.org/wiki/cookbooks/5.2.x/core#version_table

That way, you can make yourself a different version table with entries
appropriate for a given Kamailio release, and tell your new Kamailio
instance to use that one, while keeping the old one until you're
prepared to decommission it. Then you can rename the table to 'version',
or just keep 'version52' or whatever and have 'version_table' perennially
set in the config.

-- Alex

On Tue, Jun 18, 2019 at 01:50:35PM -0500, JR Richardson wrote:

> Hey All,
> 
> I'm doing some upgrades and noticed database table version numbers
> have increased.
> 
> database table adjustments:
> | address | production ver 3 | upgrade 5.2 ver 6 | need to add
> accountcode and notes column
> | dispatcher | production ver 3 | upgrade 5.2 ver 4 | need to add attr column
> | trusted | production ver 5 | upgrade 5.2 ver 6 | need to add
> ruri_pattern and priority column
> 
> I run mysql master/slave so I'm concerned about the master database
> not having the correct version numbers or can I just update the
> version number in the table when I do the upgrade of the kamailio
> versions?
> 
> Thanks.
> 
> JR
> -- 
> JR Richardson
> Engineering for the Masses
> Chasing the Azeotrope
> 
> ___
> 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


[SR-Users] Question on Database Version Table

2019-06-18 Thread JR Richardson
Hey All,

I'm doing some upgrades and noticed database table version numbers
have increased.

database table adjustments:
| address | production ver 3 | upgrade 5.2 ver 6 | need to add
accountcode and notes column
| dispatcher | production ver 3 | upgrade 5.2 ver 4 | need to add attr column
| trusted | production ver 5 | upgrade 5.2 ver 6 | need to add
ruri_pattern and priority column

I run mysql master/slave so I'm concerned about the master database
not having the correct version numbers or can I just update the
version number in the table when I do the upgrade of the kamailio
versions?

Thanks.

JR
-- 
JR Richardson
Engineering for the Masses
Chasing the Azeotrope

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


[SR-Users] FHoSS db web interface failing for retrievals

2019-06-18 Thread Woscek, Martin W.
Hi all,

We can enter user data into our HSS, we just cant retrieve data.


Just to verify, FHoSS is based on Java 1.7 and java.lang.CharSequence is in 
Java 1.7?

What we have:
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

The error:
HTTP Status 500 -

type Exception report
message
description The server encountered an internal error () that prevented it from 
fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: 116 in the jsp file: 
/pages/user/imsu_search_result.jsp
Generated servlet error:
The type java.lang.CharSequence cannot be resolved. It is indirectly referenced 
from required .class files


   
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)

org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)

org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)

org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
  
org.apache.struts.tiles.TilesRequestProcessor.doForward(TilesRequestProcessor.java:263)
org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:386)
org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:318)

org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

Thanks,
_Martin

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


Re: [SR-Users] Kamailio Crashing when using Evapi with CGRateS

2019-06-18 Thread Efelin Novak
Hi Daniel,

I was afraid of such answer :) I'll have a look what I can do here.

Thanks anyway.

Regards

Efelin

ut 18. 6. 2019 o 16:41 Daniel-Constantin Mierla 
napísal(a):

> Hello,
>
> kamailio 4.4 is no longer maintained. Upgrade to latest kamailio 5.2.x and
> try again. The backtrace indicates the race in tm wait handler that was
> fixed a while ago, but likely after 4.4 series.
>
> If you still get the issue with 5.2.x, then send the new backtrace you get
> with that version.
>
> Cheers,
> Daniel
> On 18.06.19 16:29, Efelin Novak wrote:
>
> Hi folks,
>
> I am doing some experiments with Kamailio and Cgrates. To be precise I am
> testing evapi module. When in testing environment I do not have any
> problem. After redirecting some production traffic to this kamailio, It
> crashes in at random times (few minutes to 20). I didn't find any pattern
> here.
>
> CGRateS doesn't write anything in logs.
>
> I'm on the last 4.4 Kamailio (compiled recently). CGRateS is on the last
> version.
>
> Can you please point to how to continue with debugging?
>
> Thanks
>
> Efelin
>
> Here is the problem in syslog:
>
> kamailio[9594]: :  [mem/f_malloc.c:599]: fm_free(): BUG: fm_free:
> bad pointer 0x97894818 (out of memory block!), called from tm: h_table.c:
> free_cell_helper(185) - abortingkamailio[9608]: CRITICAL: 
> [pass_fd.c:277]: receive_fd(): EOF on 16
> kamailio[9588]: ALERT:  [main.c:743]: handle_sigs(): child process
> 9594 exited by a signal 6
> kamailio[9588]: ALERT:  [main.c:746]: handle_sigs(): core was not
> generated
> kamailio[9588]: INFO:  [main.c:768]: handle_sigs(): terminating due
> to SIGCHLD
> kamailio[9604]: INFO:  [main.c:823]: sig_usr(): signal 15 received
> kamailio[9606]: INFO:  [main.c:823]: sig_usr(): signal 15 received
> kamailio[9603]: INFO:  [main.c:823]: sig_usr(): signal 15 received
>
>
>
> bt full
>
> #0  0xb77d1424 in __kernel_vsyscall ()
> No symbol table info available.
> #1  0xb7673661 in raise () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
> No symbol table info available.
> #2  0xb7676a92 in abort () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
> No symbol table info available.
> #3  0x082611a3 in fm_free (qmp=0x56779000, p=0x2d4e4f49, file=0x970932ee
> "tm: h_table.c",
> func=0x970935b7 "free_cell_helper", line=185, mname=0x97092d20 "tm")
> at mem/f_malloc.c:601
> qm = 0x56779000
> f = 0x56df046c
> __FUNCTION__ = "fm_free"
> #4  0x96fd0559 in free_cell_helper (dead_cell=0x56d935c4, silent=0,
> fname=0x970b90ca "timer.c",
> fline=648) at h_table.c:185
> b = 0x56df0490 "CANCEL sip:00444123456@192.168.1.3:5060
> SIP/2.0\r\nVia: SIP/2.0/UDP
> 192.168.1.2;branch=z9hG4bKb6ae.5d03d7e94e5ec25f34930629f434a006.1\r\nMax-Forwards:
> 66\r\nFrom: \"0044454321\"  i = 1
> rpl = 0x9797e818
> tt = 0xbfe44c68
> foo = 0x970ccb14
> cbs = 0x0
> cbs_tmp = 0x56d12b68
> __FUNCTION__ = "free_cell_helper"
> #5  0x9706884f in wait_handler (ti=31715179, wait_tl=0x56d9360c,
> data=0x56d935c4) at timer.c:648
> p_cell = 0x56d935c4
> ret = 0
> #6  0x08241e20 in timer_list_expire (t=31715179, h=0x567a3b68,
> slow_l=0x567a5394, slow_mark=1772)
> at timer.c:873
> tl = 0x56d9360c
> ret = 0
> #7  0x08242211 in timer_handler () at timer.c:938
> saved_ticks = 31715179
> run_slow_timer = 0
> i = 748
> __FUNCTION__ = "timer_handler"
> #8  0x0824266b in timer_main () at timer.c:977
> No locals.
> #9  0x080f0005 in main_loop () at main.c:1699
> i = 3
> pid = 0
> si = 0x0
> si_desc = "udp receiver child=2 
> sock=192.168.1.2:5060\000\270\301\310V\270\301\310V\000\000\000\000\000\000\000\020c\000\000\000\001\000\000\000\000\000\000\000\374Q\344\277HO\344\277\341`&\b\230\071\220\227\004\000\000\000٧5\b$\271\065\bn\000\000\000\324\247\065\b\n\000\000\000\363\320\372\060",
> '\000' 
> nrprocs = 3
> woneinit = 1
> __FUNCTION__ = "main_loop"
> #10 0x080f6b3a in main (argc=13, argv=0xbfe45374) at main.c:2644
> cfg_stream = 0x8491008
> c = -1
> r = 0
> tmp = 0xbfe4577c ""
> tmp_len = 1
> port = 0
> proto = 0
> options = 0x8350e74
> ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:"
> ret = -1
> seed = 1759582648
> rfd = 4
> debug_save = 0
> debug_flag = 0
> dont_fork_cnt = 0
> n_lst = 0xbfe452a0
> p = 0x805cc8c "[\201Ä4;"
> st = {st_dev = 14, __pad1 = 0, st_ino = 6161, st_mode = 16877,
> st_nlink = 2, st_uid = 109,
>   st_gid = 111, st_rdev = 0, __pad2 = 0, st_size = 60, st_blksize
> = 4096, st_blocks = 0,
>   st_atim = {tv_sec = 1560160293, tv_nsec = 983219454}, st_mtim =
> {tv_sec = 1560165082,
> tv_nsec = 861178334}, st_ctim = {tv_sec = 1560165082, tv_nsec
> = 861178334},
>   __unused4 = 0, __unused5 = 0}
> __FUNCTION__ = 

Re: [SR-Users] Kamailio Crashing when using Evapi with CGRateS

2019-06-18 Thread Daniel-Constantin Mierla
Hello,

kamailio 4.4 is no longer maintained. Upgrade to latest kamailio 5.2.x
and try again. The backtrace indicates the race in tm wait handler that
was fixed a while ago, but likely after 4.4 series.

If you still get the issue with 5.2.x, then send the new backtrace you
get with that version.

Cheers,
Daniel

On 18.06.19 16:29, Efelin Novak wrote:
> Hi folks,
>
> I am doing some experiments with Kamailio and Cgrates. To be precise I
> am testing evapi module. When in testing environment I do not have any
> problem. After redirecting some production traffic to this kamailio,
> It crashes in at random times (few minutes to 20). I didn't find any
> pattern here.
>
> CGRateS doesn't write anything in logs.
>
> I'm on the last 4.4 Kamailio (compiled recently). CGRateS is on the
> last version.
>
> Can you please point to how to continue with debugging?
>
> Thanks
>
> Efelin
>
> Here is the problem in syslog:
>
> kamailio[9594]: :  [mem/f_malloc.c:599]: fm_free(): BUG:
> fm_free: bad pointer 0x97894818 (out of memory block!), called from
> tm: h_table.c: free_cell_helper(185) - abortingkamailio[9608]:
> CRITICAL:  [pass_fd.c:277]: receive_fd(): EOF on 16
> kamailio[9588]: ALERT:  [main.c:743]: handle_sigs(): child
> process 9594 exited by a signal 6
> kamailio[9588]: ALERT:  [main.c:746]: handle_sigs(): core was
> not generated
> kamailio[9588]: INFO:  [main.c:768]: handle_sigs(): terminating
> due to SIGCHLD
> kamailio[9604]: INFO:  [main.c:823]: sig_usr(): signal 15 received
> kamailio[9606]: INFO:  [main.c:823]: sig_usr(): signal 15 received
> kamailio[9603]: INFO:  [main.c:823]: sig_usr(): signal 15 received
>
>
>
> bt full
>
> #0  0xb77d1424 in __kernel_vsyscall ()
> No symbol table info available.
> #1  0xb7673661 in raise () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
> No symbol table info available.
> #2  0xb7676a92 in abort () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
> No symbol table info available.
> #3  0x082611a3 in fm_free (qmp=0x56779000, p=0x2d4e4f49,
> file=0x970932ee "tm: h_table.c",
>     func=0x970935b7 "free_cell_helper", line=185, mname=0x97092d20
> "tm") at mem/f_malloc.c:601
>         qm = 0x56779000
>         f = 0x56df046c
>         __FUNCTION__ = "fm_free"
> #4  0x96fd0559 in free_cell_helper (dead_cell=0x56d935c4, silent=0,
> fname=0x970b90ca "timer.c",
>     fline=648) at h_table.c:185
>         b = 0x56df0490 "CANCEL sip:00444123456@192.168.1.3:5060
>  SIP/2.0\r\nVia: SIP/2.0/UDP
> 192.168.1.2;branch=z9hG4bKb6ae.5d03d7e94e5ec25f34930629f434a006.1\r\nMax-Forwards:
> 66\r\nFrom: \"0044454321\"          i = 1
>         rpl = 0x9797e818
>         tt = 0xbfe44c68
>         foo = 0x970ccb14
>         cbs = 0x0
>         cbs_tmp = 0x56d12b68
>         __FUNCTION__ = "free_cell_helper"
> #5  0x9706884f in wait_handler (ti=31715179, wait_tl=0x56d9360c,
> data=0x56d935c4) at timer.c:648
>         p_cell = 0x56d935c4
>         ret = 0
> #6  0x08241e20 in timer_list_expire (t=31715179, h=0x567a3b68,
> slow_l=0x567a5394, slow_mark=1772)
>     at timer.c:873
>         tl = 0x56d9360c
>         ret = 0
> #7  0x08242211 in timer_handler () at timer.c:938
>         saved_ticks = 31715179
>         run_slow_timer = 0
>         i = 748
>         __FUNCTION__ = "timer_handler"
> #8  0x0824266b in timer_main () at timer.c:977
> No locals.
> #9  0x080f0005 in main_loop () at main.c:1699
>         i = 3
>         pid = 0
>         si = 0x0
>         si_desc = "udp receiver child=2 sock=192.168.1.2:5060
> \000\270\301\310V\270\301\310V\000\000\000\000\000\000\000\020c\000\000\000\001\000\000\000\000\000\000\000\374Q\344\277HO\344\277\341`&\b\230\071\220\227\004\000\000\000٧5\b$\271\065\bn\000\000\000\324\247\065\b\n\000\000\000\363\320\372\060",
> '\000' 
>         nrprocs = 3
>         woneinit = 1
>         __FUNCTION__ = "main_loop"
> #10 0x080f6b3a in main (argc=13, argv=0xbfe45374) at main.c:2644
>         cfg_stream = 0x8491008
>         c = -1
>         r = 0
>         tmp = 0xbfe4577c ""
>         tmp_len = 1
>         port = 0
>         proto = 0
>         options = 0x8350e74
> ":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:"
>         ret = -1
>         seed = 1759582648
>         rfd = 4
>         debug_save = 0
>         debug_flag = 0
>         dont_fork_cnt = 0
>         n_lst = 0xbfe452a0
>         p = 0x805cc8c "[\201Ä4;"
>         st = {st_dev = 14, __pad1 = 0, st_ino = 6161, st_mode = 16877,
> st_nlink = 2, st_uid = 109,
>           st_gid = 111, st_rdev = 0, __pad2 = 0, st_size = 60,
> st_blksize = 4096, st_blocks = 0,
>           st_atim = {tv_sec = 1560160293, tv_nsec = 983219454},
> st_mtim = {tv_sec = 1560165082,
>             tv_nsec = 861178334}, st_ctim = {tv_sec = 1560165082,
> tv_nsec = 861178334},
>           __unused4 = 0, __unused5 = 0}
>         __FUNCTION__ = "main" 
>
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> 

Re: [SR-Users] Modify DMQ 200OK in on_reply route

2019-06-18 Thread Charles Chance
Perfect - glad that resolved the issue for you.

Best,

Charles

On Tue, 18 Jun 2019 at 13:59,  wrote:

> Charles,
>
> Yes i now only see the "external" host ip in the DMQ packets (except for
> the callid header):
>
> --
> Session Initiation Protocol (KDMQ)
>  Request-Line: KDMQ sip:usrloc@10.20.8.88:5063 SIP/2.0
>  Method: KDMQ
>  Request-URI: sip:usrloc@10.20.8.88:5063
>  Request-URI User Part: usrloc
>  Request-URI Host Part: 10.20.8.88
>  Request-URI Host Port: 5063
>  [Resent Packet: False]
>  Message Header
>  Via: SIP/2.0/UDP
> 10.20.8.89:5063;branch=z9hG4bK6bd9.e406be74.0
>  Transport: UDP
>  Sent-by Address: 10.20.8.89
>  Sent-by port: 5063
>  Branch: z9hG4bK6bd9.e406be74.0
>  To: 
>  SIP to address: sip:usrloc@10.20.8.88:5063
>  SIP to address User Part: usrloc
>  SIP to address Host Part: 10.20.8.88
>  SIP to address Host Port: 5063
>  From:
> ;tag=eeb67b6ee91998d3c4ad015de5249b76-9cd9
>  SIP from address: sip:usrloc@10.20.8.89:5063
>  SIP from address User Part: usrloc
>  SIP from address Host Part: 10.20.8.89
>  SIP from address Host Port: 5063
>  SIP from tag: eeb67b6ee91998d3c4ad015de5249b76-9cd9
>  CSeq: 10 KDMQ
>  Sequence Number: 10
>  Method: KDMQ
>  Call-ID: 30b095bd0e83ad17-388@172.17.0.2
>  Content-Length: 12
>  User-Agent: kamailio (5.1.8 (x86_64/linux))
>  Max-Forwards: 1
>  Content-Type: application/json
>  Message Body
>  JavaScript Object Notation: application/json
>  Object
>  Member Key: "action"
>  Number value: 3
>
> --
>
> Jan
>
> Charles Chance schreef op 2019-06-18 13:43:
> > The value of the server address parameter is what appears in the from
> > header - so if you want replies to go to your advertised/public
> > address then this is what the server address should be set to.
> >
> > Do the messages now contain the correct IP since updating the server
> > address?
> >
> > Cheers,
> >
> > Charles
> >
> > On Tue, 18 Jun 2019 at 12:09,  wrote:
> >
> >> All
> >>
> >> Here the KDMQ reqest from the node that comes online:
> >>
> >> --
> >> Kamailio start on 10.20.8.89, sends a request to the active node
> >> 10.20.8.88
> >> --
> >> KDMQ sip:usrloc@10.20.8.88:5063 [1] SIP/2.0
> >> Via: SIP/2.0/UDP
> >>
> > 10.20.8.89:5063;branch=z9hG4bKd5bb.c2abf9b4.0
> >> To: 
> >> From:
> >>  >> [2]>;tag=eeb67b6ee91998d3c4ad015de5249b76-7d61
> >> CSeq: 10 KDMQ
> >> Call-ID: 58f8ada547fd5ba0-225@172.17.0.2
> >> Content-Length: 12
> >> User-Agent: kamailio (5.1.8 (x86_64/linux))
> >> Max-Forwards: 1
> >> Content-Type: application/json
> >>
> >> {"action":3}
> >>
> >> SIP/2.0 200 OK
> >> Via: SIP/2.0/UDP
> >>
> > 10.20.8.89:5063;branch=z9hG4bKd5bb.c2abf9b4.0
> >> To:
> >>  >> [1]>;tag=616b7acb681ed5e9cbc485b3faa09d62.f2b6
> >> From:
> >>  >> [2]>;tag=eeb67b6ee91998d3c4ad015de5249b76-7d61
> >> CSeq: 10 KDMQ
> >> Call-ID: 58f8ada547fd5ba0-225@172.17.0.2
> >> Server: kamailio (5.1.8 (x86_64/linux))
> >> Content-Length: 0
> >> -
> >>
> >> But after this to response from 10.20.8.88 back to 10.20.8.89 with
> >> the
> >> usrloc data.  If i replace the primary node that should send the
> >> usrloc
> >> info with the original kamailio server that is not running in docker
> >> i
> >> see a KDMQ usrloc@... back to the server that is starting with all
> >> the
> >> usrloc data in the body.
> >>
> >> Let me know if you need more details or debug logs.
> >>
> >> Thanks,
> >>
> >> Jan
> >>
> >> je...@cyberchaos.nl schreef op 2019-06-18 08:51:
> >>> Julien,
> >>>
> >>> I have the following config:
> >>>
> >>> Host ip: 10.20.8.88  Internal container ip:  172.17.0.2
> >>>
> >>>
> >>> listen=udp:172.17.0.2:5063 [3] advertise 10.20.8.88:5063 [4]
> >>>
> >>>
> >>> # - dmq params -
> >>> modparam("dmq", "server_address", "sip:172.17.0.2:5063 [3]")
> >>> modparam("dmq", "num_workers", 4)
> >>> modparam("dmq", "ping_interval", 90)
> >>> modparam("dmq", "notification_address",
> >>> "sip:sip12.voip.domain.test:5063")  (on the other node this is
> >>> sip11.domain.test)
> >>> modparam("dmq", "multi_notify", 1)
> >>>
> >>> # - dmq_usrloc params -
> >>> modparam("dmq_usrloc", "enable", 1)
> >>> modparam("dmq_usrloc", "sync", 1)
> >>> modparam("dmq_usrloc", "batch_msg_contacts", 50)  # 50 contacts /
> >>> message
> >>> modparam("dmq_usrloc", "batch_size", 1)   # 1 contacts
> >> /
> >>> batch
> >>> modparam("dmq_usrloc", "batch_usleep", 50)# one batch
> >> every
> >>> 500ms
> >>>
> >>>
> >>> Here is the output of the kamcmd 

[SR-Users] Kamailio Crashing when using Evapi with CGRateS

2019-06-18 Thread Efelin Novak
Hi folks,

I am doing some experiments with Kamailio and Cgrates. To be precise I am
testing evapi module. When in testing environment I do not have any
problem. After redirecting some production traffic to this kamailio, It
crashes in at random times (few minutes to 20). I didn't find any pattern
here.

CGRateS doesn't write anything in logs.

I'm on the last 4.4 Kamailio (compiled recently). CGRateS is on the last
version.

Can you please point to how to continue with debugging?

Thanks

Efelin

Here is the problem in syslog:

kamailio[9594]: :  [mem/f_malloc.c:599]: fm_free(): BUG: fm_free: bad
pointer 0x97894818 (out of memory block!), called from tm: h_table.c:
free_cell_helper(185) - abortingkamailio[9608]: CRITICAL: 
[pass_fd.c:277]: receive_fd(): EOF on 16
kamailio[9588]: ALERT:  [main.c:743]: handle_sigs(): child process
9594 exited by a signal 6
kamailio[9588]: ALERT:  [main.c:746]: handle_sigs(): core was not
generated
kamailio[9588]: INFO:  [main.c:768]: handle_sigs(): terminating due
to SIGCHLD
kamailio[9604]: INFO:  [main.c:823]: sig_usr(): signal 15 received
kamailio[9606]: INFO:  [main.c:823]: sig_usr(): signal 15 received
kamailio[9603]: INFO:  [main.c:823]: sig_usr(): signal 15 received



bt full

#0  0xb77d1424 in __kernel_vsyscall ()
No symbol table info available.
#1  0xb7673661 in raise () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
No symbol table info available.
#2  0xb7676a92 in abort () from /lib/i386-linux-gnu/i686/cmov/libc.so.6
No symbol table info available.
#3  0x082611a3 in fm_free (qmp=0x56779000, p=0x2d4e4f49, file=0x970932ee
"tm: h_table.c",
func=0x970935b7 "free_cell_helper", line=185, mname=0x97092d20 "tm") at
mem/f_malloc.c:601
qm = 0x56779000
f = 0x56df046c
__FUNCTION__ = "fm_free"
#4  0x96fd0559 in free_cell_helper (dead_cell=0x56d935c4, silent=0,
fname=0x970b90ca "timer.c",
fline=648) at h_table.c:185
b = 0x56df0490 "CANCEL sip:00444123456@192.168.1.3:5060
SIP/2.0\r\nVia: SIP/2.0/UDP
192.168.1.2;branch=z9hG4bKb6ae.5d03d7e94e5ec25f34930629f434a006.1\r\nMax-Forwards:
66\r\nFrom: \"0044454321\" 
nrprocs = 3
woneinit = 1
__FUNCTION__ = "main_loop"
#10 0x080f6b3a in main (argc=13, argv=0xbfe45374) at main.c:2644
cfg_stream = 0x8491008
c = -1
r = 0
tmp = 0xbfe4577c ""
tmp_len = 1
port = 0
proto = 0
options = 0x8350e74
":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:"
ret = -1
seed = 1759582648
rfd = 4
debug_save = 0
debug_flag = 0
dont_fork_cnt = 0
n_lst = 0xbfe452a0
p = 0x805cc8c "[\201Ä4;"
st = {st_dev = 14, __pad1 = 0, st_ino = 6161, st_mode = 16877,
st_nlink = 2, st_uid = 109,
  st_gid = 111, st_rdev = 0, __pad2 = 0, st_size = 60, st_blksize =
4096, st_blocks = 0,
  st_atim = {tv_sec = 1560160293, tv_nsec = 983219454}, st_mtim =
{tv_sec = 1560165082,
tv_nsec = 861178334}, st_ctim = {tv_sec = 1560165082, tv_nsec =
861178334},
  __unused4 = 0, __unused5 = 0}
__FUNCTION__ = "main"
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Rabbitmq module blocks sip request

2019-06-18 Thread Denys Pozniak
Hello!

I use rabbitmq module to get destination IP for the next call routing, but
this module blocks sip request in case of RabbitMQ server is unreachable
(timeout_sec/usec does not run out here).

- Is there any solution to avoid such behavior and force function
rabbitmq_publish_consume() to return an error code and continue script
execution?
- Is this connected with the nature of rabbitmq-c client?  ("Currently
librabbitmq offers no async API, but sync API, with a timeout.")

-- 

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] Modify DMQ 200OK in on_reply route

2019-06-18 Thread jenus

Charles,

Yes i now only see the "external" host ip in the DMQ packets (except for 
the callid header):


--
Session Initiation Protocol (KDMQ)
Request-Line: KDMQ sip:usrloc@10.20.8.88:5063 SIP/2.0
Method: KDMQ
Request-URI: sip:usrloc@10.20.8.88:5063
Request-URI User Part: usrloc
Request-URI Host Part: 10.20.8.88
Request-URI Host Port: 5063
[Resent Packet: False]
Message Header
Via: SIP/2.0/UDP 
10.20.8.89:5063;branch=z9hG4bK6bd9.e406be74.0

Transport: UDP
Sent-by Address: 10.20.8.89
Sent-by port: 5063
Branch: z9hG4bK6bd9.e406be74.0
To: 
SIP to address: sip:usrloc@10.20.8.88:5063
SIP to address User Part: usrloc
SIP to address Host Part: 10.20.8.88
SIP to address Host Port: 5063
From: 
;tag=eeb67b6ee91998d3c4ad015de5249b76-9cd9

SIP from address: sip:usrloc@10.20.8.89:5063
SIP from address User Part: usrloc
SIP from address Host Part: 10.20.8.89
SIP from address Host Port: 5063
SIP from tag: eeb67b6ee91998d3c4ad015de5249b76-9cd9
CSeq: 10 KDMQ
Sequence Number: 10
Method: KDMQ
Call-ID: 30b095bd0e83ad17-388@172.17.0.2
Content-Length: 12
User-Agent: kamailio (5.1.8 (x86_64/linux))
Max-Forwards: 1
Content-Type: application/json
Message Body
JavaScript Object Notation: application/json
Object
Member Key: "action"
Number value: 3

--

Jan

Charles Chance schreef op 2019-06-18 13:43:

The value of the server address parameter is what appears in the from
header - so if you want replies to go to your advertised/public
address then this is what the server address should be set to.

Do the messages now contain the correct IP since updating the server
address?

Cheers,

Charles

On Tue, 18 Jun 2019 at 12:09,  wrote:


All

Here the KDMQ reqest from the node that comes online:

--
Kamailio start on 10.20.8.89, sends a request to the active node
10.20.8.88
--
KDMQ sip:usrloc@10.20.8.88:5063 [1] SIP/2.0
Via: SIP/2.0/UDP


10.20.8.89:5063;branch=z9hG4bKd5bb.c2abf9b4.0

To: 
From:
;tag=eeb67b6ee91998d3c4ad015de5249b76-7d61
CSeq: 10 KDMQ
Call-ID: 58f8ada547fd5ba0-225@172.17.0.2
Content-Length: 12
User-Agent: kamailio (5.1.8 (x86_64/linux))
Max-Forwards: 1
Content-Type: application/json

{"action":3}

SIP/2.0 200 OK
Via: SIP/2.0/UDP


10.20.8.89:5063;branch=z9hG4bKd5bb.c2abf9b4.0

To:
;tag=616b7acb681ed5e9cbc485b3faa09d62.f2b6
From:
;tag=eeb67b6ee91998d3c4ad015de5249b76-7d61
CSeq: 10 KDMQ
Call-ID: 58f8ada547fd5ba0-225@172.17.0.2
Server: kamailio (5.1.8 (x86_64/linux))
Content-Length: 0
-

But after this to response from 10.20.8.88 back to 10.20.8.89 with
the
usrloc data.  If i replace the primary node that should send the
usrloc
info with the original kamailio server that is not running in docker
i
see a KDMQ usrloc@... back to the server that is starting with all
the
usrloc data in the body.

Let me know if you need more details or debug logs.

Thanks,

Jan

je...@cyberchaos.nl schreef op 2019-06-18 08:51:

Julien,

I have the following config:

Host ip: 10.20.8.88  Internal container ip:  172.17.0.2


listen=udp:172.17.0.2:5063 [3] advertise 10.20.8.88:5063 [4]


# - dmq params -
modparam("dmq", "server_address", "sip:172.17.0.2:5063 [3]")
modparam("dmq", "num_workers", 4)
modparam("dmq", "ping_interval", 90)
modparam("dmq", "notification_address",
"sip:sip12.voip.domain.test:5063")  (on the other node this is
sip11.domain.test)
modparam("dmq", "multi_notify", 1)

# - dmq_usrloc params -
modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "sync", 1)
modparam("dmq_usrloc", "batch_msg_contacts", 50)  # 50 contacts /
message
modparam("dmq_usrloc", "batch_size", 1)   # 1 contacts

/

batch
modparam("dmq_usrloc", "batch_usleep", 50)# one batch

every

500ms


Here is the output of the kamcmd dmq.list_nodes

root@9d81434d491f:/# kamcmd dmq.list_nodes
{
host: 10.20.8.89
port: 5063
resolved_ip: 10.20.8.89
status: active
last_notification: 0
local: 0
}
{
host: 10.20.8.88
port: 5063
resolved_ip: 10.20.8.88
status: active
last_notification: 0
local: 0
}
{
host: 172.17.0.2
port: 5063
resolved_ip: 172.17.0.2
status: active
last_notification: 0
local: 1
}


I will collect some traces as well of the sync request as

requested by

Charles.

Thanks,

Jan

Julien Chavanton schreef op 2019-06-17 21:00:

Can you share the settings you are using :

modparam("dmq", "server_address", "?")
modparam("dmq", "notification_address", "?")

On Mon, Jun 17, 2019 at 11:30 AM  wrote:


Hi all,

Is there any other way to filter DMQ peers? I now 

Re: [SR-Users] Info: Kamailio.org - Infrastructure Maintenance - June 18, 2019

2019-06-18 Thread Daniel-Constantin Mierla
Hello,

most of the services should be back online now after the maintenance
work on infrastructure.

Maybe some old portals (like sip-router.org site components) are not all
up to date and may not be available due to use of php7 instead of php5
after this upgrade -- working to figure out if any still has issue, but
if you discover any problem, report them to mailing lists or directly to me.

Cheers,
Daniel

On 18.06.19 08:32, Daniel-Constantin Mierla wrote:
>
> Hello,
>
> short reminder that work to upgrade some components of kamailio.org
> server will start soon. Expect some interruption to services such web
> site, wiki and mailing lists. Hopefully it will be finished quickly, I
> will send a notification when all is finished.
>
> Cheers,
> Daniel
>
> On 17.06.19 10:37, Daniel-Constantin Mierla wrote:
>>
>> The infrastructure hosting the main server for Kamailio project will
>> go under scheduled maintenance during June 18, 2019 (tomorrow). The
>> work is expected to start around 7:00am UTC and can last for a few hours.
>>
>> During the maintenance interval, the services related to Kamailio
>> project may become unavailable, among them:
>>
>>   * the web server (www.kamailio.org), including the wiki portal
>> (www.kamailio.org/wiki)
>>   * the mailing lists and the email contact addresses
>>   * the GIT repository mirror git.kamailio.org
>>
>> Once the maintenance work is completed, there will be an update
>> notification sent about it!
>>
>> If there are relevant events to be notified, we are going to publish
>> on our twitter stream:
>>
>>   * https://twitter.com/kamailio
>>
>> Also, you can join #kamailio channel on irc.freenode.net in case you
>> want to report some incident related to our infrastructure that you
>> discover while maintenance goes on. For bugs or other issues related
>> to Kamailio code, use the tracker on github.com/kamailio/kamailio –
>> that service is not affected being maintained by GitHub corporation.
>>
>> Cheers,
>> Daniel
>>
>> -- 
>> Daniel-Constantin Mierla -- www.asipto.com
>> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> -- 
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda

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


Re: [SR-Users] Modify DMQ 200OK in on_reply route

2019-06-18 Thread Charles Chance
The value of the server address parameter is what appears in the from
header - so if you want replies to go to your advertised/public address
then this is what the server address should be set to.

Do the messages now contain the correct IP since updating the server
address?

Cheers,

Charles

On Tue, 18 Jun 2019 at 12:09,  wrote:

> All
>
> Here the KDMQ reqest from the node that comes online:
>
> --
> Kamailio start on 10.20.8.89, sends a request to the active node
> 10.20.8.88
> --
> KDMQ sip:usrloc@10.20.8.88:5063 SIP/2.0
> Via: SIP/2.0/UDP
> 10.20.8.89:5063;branch=z9hG4bKd5bb.c2abf9b4.0
> To: 
>  From:
> ;tag=eeb67b6ee91998d3c4ad015de5249b76-7d61
> CSeq: 10 KDMQ
> Call-ID: 58f8ada547fd5ba0-225@172.17.0.2
> Content-Length: 12
> User-Agent: kamailio (5.1.8 (x86_64/linux))
> Max-Forwards: 1
> Content-Type: application/json
>
> {"action":3}
>
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP
> 10.20.8.89:5063;branch=z9hG4bKd5bb.c2abf9b4.0
> To:
> ;tag=616b7acb681ed5e9cbc485b3faa09d62.f2b6
>  From:
> ;tag=eeb67b6ee91998d3c4ad015de5249b76-7d61
> CSeq: 10 KDMQ
> Call-ID: 58f8ada547fd5ba0-225@172.17.0.2
> Server: kamailio (5.1.8 (x86_64/linux))
> Content-Length: 0
> -
>
>
> But after this to response from 10.20.8.88 back to 10.20.8.89 with the
> usrloc data.  If i replace the primary node that should send the usrloc
> info with the original kamailio server that is not running in docker i
> see a KDMQ usrloc@... back to the server that is starting with all the
> usrloc data in the body.
>
> Let me know if you need more details or debug logs.
>
> Thanks,
>
> Jan
>
>
>
>
> je...@cyberchaos.nl schreef op 2019-06-18 08:51:
> > Julien,
> >
> > I have the following config:
> >
> > Host ip: 10.20.8.88  Internal container ip:  172.17.0.2
> >
> >
> > listen=udp:172.17.0.2:5063 advertise 10.20.8.88:5063
> >
> >
> > # - dmq params -
> > modparam("dmq", "server_address", "sip:172.17.0.2:5063")
> > modparam("dmq", "num_workers", 4)
> > modparam("dmq", "ping_interval", 90)
> > modparam("dmq", "notification_address",
> > "sip:sip12.voip.domain.test:5063")  (on the other node this is
> > sip11.domain.test)
> > modparam("dmq", "multi_notify", 1)
> >
> > # - dmq_usrloc params -
> > modparam("dmq_usrloc", "enable", 1)
> > modparam("dmq_usrloc", "sync", 1)
> > modparam("dmq_usrloc", "batch_msg_contacts", 50)  # 50 contacts /
> > message
> > modparam("dmq_usrloc", "batch_size", 1)   # 1 contacts /
> > batch
> > modparam("dmq_usrloc", "batch_usleep", 50)# one batch every
> > 500ms
> >
> >
> > Here is the output of the kamcmd dmq.list_nodes
> >
> > root@9d81434d491f:/# kamcmd dmq.list_nodes
> > {
> > host: 10.20.8.89
> > port: 5063
> > resolved_ip: 10.20.8.89
> > status: active
> > last_notification: 0
> > local: 0
> > }
> > {
> > host: 10.20.8.88
> > port: 5063
> > resolved_ip: 10.20.8.88
> > status: active
> > last_notification: 0
> > local: 0
> > }
> > {
> > host: 172.17.0.2
> > port: 5063
> > resolved_ip: 172.17.0.2
> > status: active
> > last_notification: 0
> > local: 1
> > }
> >
> >
> > I will collect some traces as well of the sync request as requested by
> > Charles.
> >
> > Thanks,
> >
> > Jan
> >
> > Julien Chavanton schreef op 2019-06-17 21:00:
> >> Can you share the settings you are using :
> >>
> >> modparam("dmq", "server_address", "?")
> >> modparam("dmq", "notification_address", "?")
> >>
> >> On Mon, Jun 17, 2019 at 11:30 AM  wrote:
> >>
> >>> Hi all,
> >>>
> >>> Is there any other way to filter DMQ peers? I now have a issue with
> >>> dmq_usrloc when running in a docker container. When the node comes
> >>> online the peer is sending the KDMQ usrloc packet (with the
> >>> registered
> >>> contacts) to the internal container ip and not the actual external
> >>> ip.
> >>> Both ip's show up as DMQ peers, after a few keepalive failures the
> >>> dmq
> >>> peer with the internal container ip becomes inactive and no updates
> >>> are
> >>> sent to that peer. But the usrloc sync seems to happen before the
> >>> peer
> >>> is inactive.
> >>>
> >>> I tried to strip the peers with the internal container ip's, this
> >>> works
> >>> for the requests, but i'm not able to fix this for the responses.
> >>>
> >>> Thanks,
> >>>
> >>> Jan
> >>>
> >>> je...@cyberchaos.nl schreef op 2019-05-02 08:59:
>  Hi all,
> 
>  I'm trying to run a kamailio DMQ node inside a docker container.
> >>> All
>  works fine but i have one issue with DMQ. Since the kamailio
> >>> process
>  inside the container is behind a nat i have set the advertise
> >>> address
>  to the external ip, this works fine for the via headers but DMQ
> >>> keeps
>  sending the internal interface in the KDMQ notification_peer
> >>> messages.
>  The external ip is in there as well. 

[SR-Users] 100% CPU usage after NTP date update

2019-06-18 Thread Benjamin Marty
Hello,

I'm facing the same issue. Is there a solution for this in the meantime?

Benjamin

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


Re: [SR-Users] Modify DMQ 200OK in on_reply route

2019-06-18 Thread jenus

All

Here the KDMQ reqest from the node that comes online:

--
Kamailio start on 10.20.8.89, sends a request to the active node 
10.20.8.88

--
KDMQ sip:usrloc@10.20.8.88:5063 SIP/2.0
Via: SIP/2.0/UDP 
10.20.8.89:5063;branch=z9hG4bKd5bb.c2abf9b4.0

To: 
From: 
;tag=eeb67b6ee91998d3c4ad015de5249b76-7d61

CSeq: 10 KDMQ
Call-ID: 58f8ada547fd5ba0-225@172.17.0.2
Content-Length: 12
User-Agent: kamailio (5.1.8 (x86_64/linux))
Max-Forwards: 1
Content-Type: application/json

{"action":3}

SIP/2.0 200 OK
Via: SIP/2.0/UDP 
10.20.8.89:5063;branch=z9hG4bKd5bb.c2abf9b4.0
To: 
;tag=616b7acb681ed5e9cbc485b3faa09d62.f2b6
From: 
;tag=eeb67b6ee91998d3c4ad015de5249b76-7d61

CSeq: 10 KDMQ
Call-ID: 58f8ada547fd5ba0-225@172.17.0.2
Server: kamailio (5.1.8 (x86_64/linux))
Content-Length: 0
-


But after this to response from 10.20.8.88 back to 10.20.8.89 with the 
usrloc data.  If i replace the primary node that should send the usrloc 
info with the original kamailio server that is not running in docker i 
see a KDMQ usrloc@... back to the server that is starting with all the 
usrloc data in the body.


Let me know if you need more details or debug logs.

Thanks,

Jan




je...@cyberchaos.nl schreef op 2019-06-18 08:51:

Julien,

I have the following config:

Host ip: 10.20.8.88  Internal container ip:  172.17.0.2


listen=udp:172.17.0.2:5063 advertise 10.20.8.88:5063


# - dmq params -
modparam("dmq", "server_address", "sip:172.17.0.2:5063")
modparam("dmq", "num_workers", 4)
modparam("dmq", "ping_interval", 90)
modparam("dmq", "notification_address",
"sip:sip12.voip.domain.test:5063")  (on the other node this is
sip11.domain.test)
modparam("dmq", "multi_notify", 1)

# - dmq_usrloc params -
modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "sync", 1)
modparam("dmq_usrloc", "batch_msg_contacts", 50)  # 50 contacts / 
message
modparam("dmq_usrloc", "batch_size", 1)   # 1 contacts / 
batch
modparam("dmq_usrloc", "batch_usleep", 50)# one batch every 
500ms



Here is the output of the kamcmd dmq.list_nodes

root@9d81434d491f:/# kamcmd dmq.list_nodes
{
host: 10.20.8.89
port: 5063
resolved_ip: 10.20.8.89
status: active
last_notification: 0
local: 0
}
{
host: 10.20.8.88
port: 5063
resolved_ip: 10.20.8.88
status: active
last_notification: 0
local: 0
}
{
host: 172.17.0.2
port: 5063
resolved_ip: 172.17.0.2
status: active
last_notification: 0
local: 1
}


I will collect some traces as well of the sync request as requested by 
Charles.


Thanks,

Jan

Julien Chavanton schreef op 2019-06-17 21:00:

Can you share the settings you are using :

modparam("dmq", "server_address", "?")
modparam("dmq", "notification_address", "?")

On Mon, Jun 17, 2019 at 11:30 AM  wrote:


Hi all,

Is there any other way to filter DMQ peers? I now have a issue with
dmq_usrloc when running in a docker container. When the node comes
online the peer is sending the KDMQ usrloc packet (with the
registered
contacts) to the internal container ip and not the actual external
ip.
Both ip's show up as DMQ peers, after a few keepalive failures the
dmq
peer with the internal container ip becomes inactive and no updates
are
sent to that peer. But the usrloc sync seems to happen before the
peer
is inactive.

I tried to strip the peers with the internal container ip's, this
works
for the requests, but i'm not able to fix this for the responses.

Thanks,

Jan

je...@cyberchaos.nl schreef op 2019-05-02 08:59:

Hi all,

I'm trying to run a kamailio DMQ node inside a docker container.

All

works fine but i have one issue with DMQ. Since the kamailio

process

inside the container is behind a nat i have set the advertise

address

to the external ip, this works fine for the via headers but DMQ

keeps

sending the internal interface in the KDMQ notification_peer

messages.

The external ip is in there as well. Example:

SIP/2.0 200 OK
Via: SIP/2.0/UDP
10.10.10.13;branch=z9hG4bK2dcb.c6326de2.0
To:

[1]>;tag=616b7acb681ed5e9cbc485b3faa09d62.0a3d

From:

[2]>;tag=e8f29c06c4b85a188f6533f08d60feb6-ff29

CSeq: 10 KDMQ
Call-ID: 17042656602ca532-23367@x.x.x.x
Content-Type: text/plain
Server: kamailio (5.1.4 (x86_64/linux))
Content-Length: 222

sip:10.10.10.13:5060;status=active
sip:10.10.10.12:5060;status=active
sip:10.10.10.92:5060;status=active
sip:10.10.10.93:5060;status=active
sip:10.10.10.94:5060;status=active   <-- entry for container

external

ip
sip:172.17.0.2:5060;status=disabled  <-- entry for container

internal

ip


I tried to strip this entry using the replace_body_atonce in the
tm:local-request route. This works fine for the KDMQ request, but

when

i try to remove the same line from 200OK responses that are send

out

as a response to incomming KDMQ messages this seems 

Re: [SR-Users] Modify DMQ 200OK in on_reply route

2019-06-18 Thread jenus

Charles,

That seems to solve the problem. Usrloc is now synced at startup.  I 
don't have any duplicate dmq peers anymore as well. I will do some 
testing but for now the issue seems to be solved.


Many thanks for your quick help.

Jan

Charles Chance schreef op 2019-06-18 11:33:

Hi Jan,

What happens if you set the dmq server address to the advertised
address?

listen=udp:172.17.0.2:5063 [1] advertise 10.20.8.88:5063 [2]
modparam("dmq", "server_address", "SIP:10.20.8.88:5063 [2]")

Cheers,

Charles

On Tue, 18 Jun 2019 at 07:53,  wrote:


Julien,

I have the following config:

Host ip: 10.20.8.88  Internal container ip:  172.17.0.2

listen=udp:172.17.0.2:5063 [1] advertise 10.20.8.88:5063 [2]

# - dmq params -
modparam("dmq", "server_address", "sip:172.17.0.2:5063 [1]")
modparam("dmq", "num_workers", 4)
modparam("dmq", "ping_interval", 90)
modparam("dmq", "notification_address",
"sip:sip12.voip.domain.test:5063")  (on the other node this is
sip11.domain.test)
modparam("dmq", "multi_notify", 1)

# - dmq_usrloc params -
modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "sync", 1)
modparam("dmq_usrloc", "batch_msg_contacts", 50)  # 50 contacts /
message
modparam("dmq_usrloc", "batch_size", 1)   # 1 contacts /

batch
modparam("dmq_usrloc", "batch_usleep", 50)# one batch every
500ms

Here is the output of the kamcmd dmq.list_nodes

root@9d81434d491f:/# kamcmd dmq.list_nodes
{
host: 10.20.8.89
port: 5063
resolved_ip: 10.20.8.89
status: active
last_notification: 0
local: 0
}
{
host: 10.20.8.88
port: 5063
resolved_ip: 10.20.8.88
status: active
last_notification: 0
local: 0
}
{
host: 172.17.0.2
port: 5063
resolved_ip: 172.17.0.2
status: active
last_notification: 0
local: 1
}

I will collect some traces as well of the sync request as requested
by
Charles.

Thanks,

Jan

Julien Chavanton schreef op 2019-06-17 21:00:

Can you share the settings you are using :

modparam("dmq", "server_address", "?")
modparam("dmq", "notification_address", "?")

On Mon, Jun 17, 2019 at 11:30 AM  wrote:


Hi all,

Is there any other way to filter DMQ peers? I now have a issue

with

dmq_usrloc when running in a docker container. When the node

comes

online the peer is sending the KDMQ usrloc packet (with the
registered
contacts) to the internal container ip and not the actual

external

ip.
Both ip's show up as DMQ peers, after a few keepalive failures

the

dmq
peer with the internal container ip becomes inactive and no

updates

are
sent to that peer. But the usrloc sync seems to happen before the
peer
is inactive.

I tried to strip the peers with the internal container ip's, this
works
for the requests, but i'm not able to fix this for the responses.

Thanks,

Jan

je...@cyberchaos.nl schreef op 2019-05-02 08:59:

Hi all,

I'm trying to run a kamailio DMQ node inside a docker container.

All

works fine but i have one issue with DMQ. Since the kamailio

process

inside the container is behind a nat i have set the advertise

address

to the external ip, this works fine for the via headers but DMQ

keeps

sending the internal interface in the KDMQ notification_peer

messages.

The external ip is in there as well. Example:

SIP/2.0 200 OK
Via: SIP/2.0/UDP


10.10.10.13;branch=z9hG4bK2dcb.c6326de2.0

To:

[1]>;tag=616b7acb681ed5e9cbc485b3faa09d62.0a3d

From:

[2]>;tag=e8f29c06c4b85a188f6533f08d60feb6-ff29

CSeq: 10 KDMQ
Call-ID: 17042656602ca532-23367@x.x.x.x
Content-Type: text/plain
Server: kamailio (5.1.4 (x86_64/linux))
Content-Length: 222

sip:10.10.10.13:5060;status=active
sip:10.10.10.12:5060;status=active
sip:10.10.10.92:5060;status=active
sip:10.10.10.93:5060;status=active
sip:10.10.10.94:5060;status=active   <-- entry for container

external

ip
sip:172.17.0.2:5060;status=disabled  <-- entry for container

internal

ip


I tried to strip this entry using the replace_body_atonce in the
tm:local-request route. This works fine for the KDMQ request,

but

when

i try to remove the same line from 200OK responses that are send

out

as a response to incomming KDMQ messages this seems to fail. I

use

the

following code:

# Working code (for outgoing KDMQ requests):
event_route [tm:local-request]
{
if(is_method("KDMQ") && $rU == "notification_peer")
replace_body_atonce("sip:172.17.0.*:5060;status=.*", "");
}

# Failing code (for 200OK responses):
reply_route
{
xlog("L_ALERT", "REPLY: Sending out reply, tU is $tU  rs is

$rs\n");

if ($rs == "200" && $tU == "notification_peer")
{
replace_body_atonce("sip:172.17.0.*:5060;status=.*", "");
}
}


I'm running kamailio 5.1.4. Is there a way to strip a line from

the

body of a local generated 200OK response? Or is there a way to

avoid

that DMQ inserts the internal container ip in the first place.


Thanks,

Jan Hazenberg


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



Re: [SR-Users] Kamailio 4.4.x CDR db accounting

2019-06-18 Thread Daniel Tryba
On Mon, Jun 17, 2019 at 05:18:42PM +0200, Laura wrote:
> ++--+--+-+-++
> | Field   | Type | Null | Key | Default | 
> Extra   
> ++--+--+-+-++
> | id | int(10) unsigned 
> | method | varchar(16)  
> | from_tag | varchar(64)   |
> | to_tag | varchar(64)  
> | callid | varchar(255) 
> | sip_code | varchar(3) 
> | sip_reason | varchar(128) | NO
> | time | datetime   
> | src_user | varchar(64)   |
> | src_domain | varchar(128) | NO
> | src_ip | varchar(64)  
> | dst_ouser   | varchar(64)   | 
> | dst_user | varchar(64)   |
> | dst_domain | varchar(128) | NO
> | info | varchar(128)   
> | time_a | datetime 
> 00:00:00 |  
> | unix_t | varchar(64)  
> | sign | int(1) 
> ++--+--+-+-++
> 
> info field is nothing come from any alter table from my side..
 
The table structure you have is based on
https://github.com/kamailio/kamailio/blob/4.4/examples/kamailio/acc-mysql.cfg

info, time_a, unix_t and sign is something someone at you side has added 
 
The config example listed also show how to populate custom fields in the
acc table:

modparam("acc", "db_extra", 
"src_user=$fU;src_domain=$fd;dst_user=$rU;dst_domain=$rd")

So add info and a variable and it should be stored in the table.

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


Re: [SR-Users] Modify DMQ 200OK in on_reply route

2019-06-18 Thread Charles Chance
Hi Jan,

What happens if you set the dmq server address to the advertised address?

listen=udp:172.17.0.2:5063 advertise 10.20.8.88:5063
modparam("dmq", "server_address", "*sip:10.20.8.88:5063
*")

Cheers,

Charles


On Tue, 18 Jun 2019 at 07:53,  wrote:

> Julien,
>
> I have the following config:
>
> Host ip: 10.20.8.88  Internal container ip:  172.17.0.2
>
>
> listen=udp:172.17.0.2:5063 advertise 10.20.8.88:5063
>
>
> # - dmq params -
> modparam("dmq", "server_address", "sip:172.17.0.2:5063")
> modparam("dmq", "num_workers", 4)
> modparam("dmq", "ping_interval", 90)
> modparam("dmq", "notification_address",
> "sip:sip12.voip.domain.test:5063")  (on the other node this is
> sip11.domain.test)
> modparam("dmq", "multi_notify", 1)
>
> # - dmq_usrloc params -
> modparam("dmq_usrloc", "enable", 1)
> modparam("dmq_usrloc", "sync", 1)
> modparam("dmq_usrloc", "batch_msg_contacts", 50)  # 50 contacts /
> message
> modparam("dmq_usrloc", "batch_size", 1)   # 1 contacts /
> batch
> modparam("dmq_usrloc", "batch_usleep", 50)# one batch every
> 500ms
>
>
> Here is the output of the kamcmd dmq.list_nodes
>
> root@9d81434d491f:/# kamcmd dmq.list_nodes
> {
>  host: 10.20.8.89
>  port: 5063
>  resolved_ip: 10.20.8.89
>  status: active
>  last_notification: 0
>  local: 0
> }
> {
>  host: 10.20.8.88
>  port: 5063
>  resolved_ip: 10.20.8.88
>  status: active
>  last_notification: 0
>  local: 0
> }
> {
>  host: 172.17.0.2
>  port: 5063
>  resolved_ip: 172.17.0.2
>  status: active
>  last_notification: 0
>  local: 1
> }
>
>
> I will collect some traces as well of the sync request as requested by
> Charles.
>
> Thanks,
>
> Jan
>
> Julien Chavanton schreef op 2019-06-17 21:00:
> > Can you share the settings you are using :
> >
> > modparam("dmq", "server_address", "?")
> > modparam("dmq", "notification_address", "?")
> >
> > On Mon, Jun 17, 2019 at 11:30 AM  wrote:
> >
> >> Hi all,
> >>
> >> Is there any other way to filter DMQ peers? I now have a issue with
> >> dmq_usrloc when running in a docker container. When the node comes
> >> online the peer is sending the KDMQ usrloc packet (with the
> >> registered
> >> contacts) to the internal container ip and not the actual external
> >> ip.
> >> Both ip's show up as DMQ peers, after a few keepalive failures the
> >> dmq
> >> peer with the internal container ip becomes inactive and no updates
> >> are
> >> sent to that peer. But the usrloc sync seems to happen before the
> >> peer
> >> is inactive.
> >>
> >> I tried to strip the peers with the internal container ip's, this
> >> works
> >> for the requests, but i'm not able to fix this for the responses.
> >>
> >> Thanks,
> >>
> >> Jan
> >>
> >> je...@cyberchaos.nl schreef op 2019-05-02 08:59:
> >>> Hi all,
> >>>
> >>> I'm trying to run a kamailio DMQ node inside a docker container.
> >> All
> >>> works fine but i have one issue with DMQ. Since the kamailio
> >> process
> >>> inside the container is behind a nat i have set the advertise
> >> address
> >>> to the external ip, this works fine for the via headers but DMQ
> >> keeps
> >>> sending the internal interface in the KDMQ notification_peer
> >> messages.
> >>> The external ip is in there as well. Example:
> >>>
> >>> SIP/2.0 200 OK
> >>> Via: SIP/2.0/UDP
> >>> 10.10.10.13;branch=z9hG4bK2dcb.c6326de2.0
> >>> To:
> >>>  >> [1]>;tag=616b7acb681ed5e9cbc485b3faa09d62.0a3d
> >>> From:
> >>>  >> [2]>;tag=e8f29c06c4b85a188f6533f08d60feb6-ff29
> >>> CSeq: 10 KDMQ
> >>> Call-ID: 17042656602ca532-23367@x.x.x.x
> >>> Content-Type: text/plain
> >>> Server: kamailio (5.1.4 (x86_64/linux))
> >>> Content-Length: 222
> >>>
> >>> sip:10.10.10.13:5060;status=active
> >>> sip:10.10.10.12:5060;status=active
> >>> sip:10.10.10.92:5060;status=active
> >>> sip:10.10.10.93:5060;status=active
> >>> sip:10.10.10.94:5060;status=active   <-- entry for container
> >> external
> >>> ip
> >>> sip:172.17.0.2:5060;status=disabled  <-- entry for container
> >> internal
> >>> ip
> >>>
> >>>
> >>> I tried to strip this entry using the replace_body_atonce in the
> >>> tm:local-request route. This works fine for the KDMQ request, but
> >> when
> >>> i try to remove the same line from 200OK responses that are send
> >> out
> >>> as a response to incomming KDMQ messages this seems to fail. I use
> >> the
> >>> following code:
> >>>
> >>> # Working code (for outgoing KDMQ requests):
> >>> event_route [tm:local-request]
> >>> {
> >>> if(is_method("KDMQ") && $rU == "notification_peer")
> >>> replace_body_atonce("sip:172.17.0.*:5060;status=.*", "");
> >>> }
> >>>
> >>> # Failing code (for 200OK responses):
> >>> reply_route
> >>> {
> >>> xlog("L_ALERT", "REPLY: Sending out reply, tU is $tU  rs is
> >> $rs\n");
> >>> if ($rs == "200" && $tU == "notification_peer")
> >>> {
> >>> 

[SR-Users] Forward calls between kamailio registrar nodes (dmq + dmq_usrloc)

2019-06-18 Thread Ildar Mukhametzhanov

Hello!

I am developing setup with several kamailio nodes as registrar cluster 
(dmq + dmq_usrloc).


Location sync works, I see locations of both servers on every server.

Is there any standard approach to redirect call between nodes except 
replacing of $ru?


Executing of lookup("location") for user registered on another node 
return negative response.



--
Sincerely,
*Ildar Mukhametzhanov*
Head of software development
VoiceON Telecom Services GmbH
i...@voice-on.net 
t. +49 30 398 20 500-77
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Modify DMQ 200OK in on_reply route

2019-06-18 Thread jenus

Julien,

I have the following config:

Host ip: 10.20.8.88  Internal container ip:  172.17.0.2


listen=udp:172.17.0.2:5063 advertise 10.20.8.88:5063


# - dmq params -
modparam("dmq", "server_address", "sip:172.17.0.2:5063")
modparam("dmq", "num_workers", 4)
modparam("dmq", "ping_interval", 90)
modparam("dmq", "notification_address", 
"sip:sip12.voip.domain.test:5063")  (on the other node this is 
sip11.domain.test)

modparam("dmq", "multi_notify", 1)

# - dmq_usrloc params -
modparam("dmq_usrloc", "enable", 1)
modparam("dmq_usrloc", "sync", 1)
modparam("dmq_usrloc", "batch_msg_contacts", 50)  # 50 contacts / 
message
modparam("dmq_usrloc", "batch_size", 1)   # 1 contacts / 
batch
modparam("dmq_usrloc", "batch_usleep", 50)# one batch every 
500ms



Here is the output of the kamcmd dmq.list_nodes

root@9d81434d491f:/# kamcmd dmq.list_nodes
{
host: 10.20.8.89
port: 5063
resolved_ip: 10.20.8.89
status: active
last_notification: 0
local: 0
}
{
host: 10.20.8.88
port: 5063
resolved_ip: 10.20.8.88
status: active
last_notification: 0
local: 0
}
{
host: 172.17.0.2
port: 5063
resolved_ip: 172.17.0.2
status: active
last_notification: 0
local: 1
}


I will collect some traces as well of the sync request as requested by 
Charles.


Thanks,

Jan

Julien Chavanton schreef op 2019-06-17 21:00:

Can you share the settings you are using :

modparam("dmq", "server_address", "?")
modparam("dmq", "notification_address", "?")

On Mon, Jun 17, 2019 at 11:30 AM  wrote:


Hi all,

Is there any other way to filter DMQ peers? I now have a issue with
dmq_usrloc when running in a docker container. When the node comes
online the peer is sending the KDMQ usrloc packet (with the
registered
contacts) to the internal container ip and not the actual external
ip.
Both ip's show up as DMQ peers, after a few keepalive failures the
dmq
peer with the internal container ip becomes inactive and no updates
are
sent to that peer. But the usrloc sync seems to happen before the
peer
is inactive.

I tried to strip the peers with the internal container ip's, this
works
for the requests, but i'm not able to fix this for the responses.

Thanks,

Jan

je...@cyberchaos.nl schreef op 2019-05-02 08:59:

Hi all,

I'm trying to run a kamailio DMQ node inside a docker container.

All

works fine but i have one issue with DMQ. Since the kamailio

process

inside the container is behind a nat i have set the advertise

address

to the external ip, this works fine for the via headers but DMQ

keeps

sending the internal interface in the KDMQ notification_peer

messages.

The external ip is in there as well. Example:

SIP/2.0 200 OK
Via: SIP/2.0/UDP
10.10.10.13;branch=z9hG4bK2dcb.c6326de2.0
To:

[1]>;tag=616b7acb681ed5e9cbc485b3faa09d62.0a3d

From:

[2]>;tag=e8f29c06c4b85a188f6533f08d60feb6-ff29

CSeq: 10 KDMQ
Call-ID: 17042656602ca532-23367@x.x.x.x
Content-Type: text/plain
Server: kamailio (5.1.4 (x86_64/linux))
Content-Length: 222

sip:10.10.10.13:5060;status=active
sip:10.10.10.12:5060;status=active
sip:10.10.10.92:5060;status=active
sip:10.10.10.93:5060;status=active
sip:10.10.10.94:5060;status=active   <-- entry for container

external

ip
sip:172.17.0.2:5060;status=disabled  <-- entry for container

internal

ip


I tried to strip this entry using the replace_body_atonce in the
tm:local-request route. This works fine for the KDMQ request, but

when

i try to remove the same line from 200OK responses that are send

out

as a response to incomming KDMQ messages this seems to fail. I use

the

following code:

# Working code (for outgoing KDMQ requests):
event_route [tm:local-request]
{
if(is_method("KDMQ") && $rU == "notification_peer")
replace_body_atonce("sip:172.17.0.*:5060;status=.*", "");
}

# Failing code (for 200OK responses):
reply_route
{
xlog("L_ALERT", "REPLY: Sending out reply, tU is $tU  rs is

$rs\n");

if ($rs == "200" && $tU == "notification_peer")
{
replace_body_atonce("sip:172.17.0.*:5060;status=.*", "");
}
}


I'm running kamailio 5.1.4. Is there a way to strip a line from

the

body of a local generated 200OK response? Or is there a way to

avoid

that DMQ inserts the internal container ip in the first place.


Thanks,

Jan Hazenberg


___
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



Links:
--
[1] http://sip:notification_peer@10.10.10.94:5060
[2] http://sip:notification_peer@10.10.10.13:5060
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org

Re: [SR-Users] Info: Kamailio.org - Infrastructure Maintenance - June 18, 2019

2019-06-18 Thread Daniel-Constantin Mierla
Hello,

short reminder that work to upgrade some components of kamailio.org
server will start soon. Expect some interruption to services such web
site, wiki and mailing lists. Hopefully it will be finished quickly, I
will send a notification when all is finished.

Cheers,
Daniel

On 17.06.19 10:37, Daniel-Constantin Mierla wrote:
>
> The infrastructure hosting the main server for Kamailio project will
> go under scheduled maintenance during June 18, 2019 (tomorrow). The
> work is expected to start around 7:00am UTC and can last for a few hours.
>
> During the maintenance interval, the services related to Kamailio
> project may become unavailable, among them:
>
>   * the web server (www.kamailio.org), including the wiki portal
> (www.kamailio.org/wiki)
>   * the mailing lists and the email contact addresses
>   * the GIT repository mirror git.kamailio.org
>
> Once the maintenance work is completed, there will be an update
> notification sent about it!
>
> If there are relevant events to be notified, we are going to publish
> on our twitter stream:
>
>   * https://twitter.com/kamailio
>
> Also, you can join #kamailio channel on irc.freenode.net in case you
> want to report some incident related to our infrastructure that you
> discover while maintenance goes on. For bugs or other issues related
> to Kamailio code, use the tracker on github.com/kamailio/kamailio –
> that service is not affected being maintained by GitHub corporation.
>
> Cheers,
> Daniel
>
> -- 
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda

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


Re: [SR-Users] Authenticating xhttp request

2019-06-18 Thread Olli Attila
Hello,

Ok I loaded the permissions module, and used the allow_trusted()
function call to test if the request is coming from a trusted address.
Works very well and I also used the caching option of the module so
that the database is not queried every time src ip has to be verified.

Cheers,
Olli

ma 17. kesäk. 2019 klo 13.49 Daniel-Constantin Mierla
(mico...@gmail.com) kirjoitti:
>
> Hello,
>
> you can use permissions module with address table for IP based access
> policies.
>
> Cheers,
> Daniel
>
> On 16.06.19 19:58, Olli Attila wrote:
> > Hello,
> >
> > After reading comments from Daniel and Alex I decided to proceed with
> > the design model that uses a middleware server (eg. not exposing
> > kamailio straight to users) which will be the node taking to Kamailio
> > JSONRPC API.
> >
> > That being said... I could go for the ip address authentication. Are
> > there any best practice guides for this?
> >
> > Cheer,
> > Olli
> >
> > pe 14. kesäk. 2019 klo 16.21 Daniel-Constantin Mierla
> > (mico...@gmail.com) kirjoitti:
> >> Hello,
> >>
> >> I would not expose the kamailio to API interactions triggered by the end
> >> users, be careful not to block its activity.
> >>
> >> Anyhow, you can use the www_challenge()/www_authenticate() function from
> >> auth/auth_db modules that are using the records from subscriber table
> >> perform HTTP digest authentication.
> >>
> >> Cheers,
> >> Daniel
> >>
> >> On 14.06.19 09:14, Olli Attila wrote:
> >>> Hello,
> >>>
> >>> I think it would be better to do the authentication with
> >>> username/password. We are developing a web interface which will be
> >>> used to alter dialplan & htable entries and after changes have been
> >>> made, user would command the sip proxies to reload new data from the
> >>> database via jasonrpc. With this design, user authentication would be
> >>> more suitable.
> >>>
> >>> Cheers,
> >>> Olli Attila
> >>>
> >>> pe 14. kesäk. 2019 klo 10.04 Daniel-Constantin Mierla
> >>> (mico...@gmail.com) kirjoitti:
>  Hello,
> 
>  do you want to authenticate with ip addresses stored in database or with
>  username/password?
> 
>  Cheers,
>  Daniel
> 
>  On 13.06.19 08:12, Olli Attila wrote:
> > Hello,
> >
> > I have this xhttp event_route on Kamailio that I am using to signal
> > the proxy to reload dialplans and htable when necessary:
> >
> > event_route[xhttp:request] {
> > if(src_ip!=127.0.0.1) {
> > xhttp_reply("403", "Forbidden", "text/html",
> > "Not allowed from $si");
> > exit;
> > }
> > if ($hu =~ "^/RPC") {
> > jsonrpc_dispatch();
> > } else {
> > xhttp_reply("200", "OK", "text/html",
> > "Wrong URL $hu");
> > }
> > return;
> > }
> >
> > Now instead of returning 403 forbidden for requests coming from other
> > src_ip than proxy itsef, I would like to authenticate the http request
> > via proxy database. How can this be done if possible?
> >
> > Cheers,
> > Olli
> >
> > ___
> > 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
> 
> >> --
> >> Daniel-Constantin Mierla -- www.asipto.com
> >> www.twitter.com/miconda -- www.linkedin.com/in/miconda
> >>
> >
> --
> Daniel-Constantin Mierla -- www.asipto.com
> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>


-- 
"Logic is the art of going wrong with confidence."

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