Re: [SR-Users] Late offer ACKs not passing through branch_route

2019-07-01 Thread Enrico Bandiera
Hi Daniel, thank you.
I will add a special case for ACKs in the request route.

Cheers,
Enrico.

Il giorno mar 25 giu 2019 alle ore 16:46 Daniel-Constantin Mierla <
dan...@kamailio.org> ha scritto:

> Hello,
>
> the ACK doesn't get through the branch_route block because it is forwarded
> in stateless mode. The ACK doesn't have a reply, therefore is not
> transaction state to be kept for it. You have to apply all the rules you
> want for the ACK inside the request_route logic. If there is a
> retransmission of the ACK, again it is not detected, so it will just run
> again through the same rules in request_route. This is of course for the
> ACK following the 200ok.
>
> Cheers,
> Daniel
>
> June 25, 2019 1:42 PM, "Bandiera, Enrico" <
> enrico.bandi...@cloud.timenet.it
> <%22Bandiera,%20enrico%22%20%3cenrico.bandi...@cloud.timenet.it%3E>>
> wrote:
>
> Hi, I'm encountering an issue when relaying late offer ACKs, before
> relaying I set the branch_route with t_on_branch() but kamailio never
> enters that route after calling t_relay
> I'm keeping the rtpengine module calls inside branch_routes to avoid
> issues when re-routing in failure routes
> I suppose it's something related to ACK packets but I'm not sure what the
> issue is.
> Any hints?
> Thanks,
> Enrico.
>
>
>
> --
> Daniel-Constantin Mierla
> www.kamailio.org -- www.asipto.com
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Kamailio crashing and infinite-looping when trying to free memory

2019-03-19 Thread Enrico Bandiera
e8, to = {s = {
sa_family = 2, sa_data =
"\023\304\n\000\026\002\000\000\000\000\000\000\000"}, sin = {sin_family =
2, sin_port = 50195, sin_addr = {s_addr = 34996234}, sin_zero =
"\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 2,
sin6_port = 50195, sin6_flowinfo = 34996234, sin6_addr =
{__in6_u = {__u6_addr8 = '\000' , __u6_addr16 = {0, 0, 0,
0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0, 0}}}, sin6_scope_id = 0}}, id = 0,
proto = 1 '\001',
send_flags = {f = 0, blst_imask = 0}}, retr_expire = 89094237,
fr_expire = 89094261}, local_totag = {
  s = 0x7ff409a905ef "14.188.1:5060>\r\nCall-ID:
42-30198@127.0.1.1\r\nCSeq:
2 INVITE\r\nServer: EVOX SIP Proxy\r\nContent-Length:
0\r\n\r\n06db.0\r\nP-SR-XBranch:
z9hG4bKb7bf.5005efca94dce298f0c9b16618c0439f.0\r\n\r\n\r\nl-ID:
91-30180@127.0"..., len = 0}, cancel_reas = 0x0, status = 407}, uac =
0x7ff409e1b748, async_backup = {backup_route = 0, backup_branch = 0,
blind_uac = 0, ruri_new = 0}, fwded_totags = 0x0, uri_avps_from =
0x7ff40a9ad510, uri_avps_to = 0x0,
  user_avps_from = 0x0, user_avps_to = 0x0, domain_avps_from = 0x0,
domain_avps_to = 0x0, xavps_list = 0x7ff40a9dfcd0, reply_mutex = {val = 0},
reply_locker_pid = {val = 0}, reply_rec_lock_level = 0, fr_timeout = 32,
  fr_inv_timeout = 960, rt_t1_timeout_ms = 500, rt_t2_timeout_ms = 4000,
end_of_life = 89097109, relayed_reply_branch = 0, on_failure = 0,
on_branch_failure = 0, on_reply = 1, on_branch = 0, on_branch_delayed = 1,
  md5 = 0x7ff409e1b728 "8e69898f97f4cf0927e5279e913d45ab"}
(gdb) list
684 in timer.c


Il giorno mar 19 mar 2019 alle ore 17:07 Daniel-Constantin Mierla <
mico...@gmail.com> ha scritto:

> Hello,
>
> can you get the output of the next gdb commands:
>
>   - first core file
>
> frame 2
> p *p_cell
> list
>
>   - second core file
>
> frame 8
> p *p_cell
> list
>
> Is there any way that I can get access to the system with the core files
> via ssh? It would help speeding up investigating the core files. If yes, I
> can provide my ssh key.
>
> Cheers,
> Daniel
> On 19.03.19 16:12, Enrico Bandiera wrote:
>
> Hi guys, recently we had some issues with kamailio in production, a proxy
> at the edge of the infrastructure was crashing seemingly randomly, it
> happened a couple of times in a timespan of 4-5 days until a point where we
> found it in an endless loop, unable to process SIP packets anymore and
> printing in loop messages like these:
>
> 50(60) CRITICAL:  [core/mem/q_malloc.c:512]: qm_free(): BUG: freeing
> already freed pointer (0x7ff40a359450), called from core: core/usr_avp.c:
> destroy_avp_list_unsafe(626), first free core: core/usr_avp.c:
> destroy_avp_list_unsafe(626) - ignoring
> 50(60) CRITICAL:  [core/mem/q_malloc.c:512]: qm_free(): BUG: freeing
> already freed pointer (0x7ff409c4fa58), called from core: core/usr_avp.c:
> destroy_avp_list_unsafe(626), first free core: core/usr_avp.c:
> destroy_avp_list_unsafe(626) - ignoring
>
> We managed to replicate the crash and the loop in a dev environment with a
> lot of difficulties. It seems not related to the peak load, but to the
> growing number of processed calls
> The kamailio version is:
> version: kamailio 5.2.2 (x86_64/linux)
> flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
> DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
> Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
> FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
> USE_DST_BLACKLIST, HAVE_RESOLV_RES
> ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024,
> BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
> poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
> id: unknown
> compiled with gcc 5.3.1
>
>
> Every time this happened it was the timer pid that was crashing or
> looping, we managed to get 2 core dumps of the crash and 1 of the loop (got
> it after killing the timer with SIGQUIT).
> The timer process crashes after attempting to free memory that it's not
> correctly managed. In particular we saw that it happens inside
> destroy_avp_list_unsafe() called by the tm timer, when uri_avps_from points
> to an invalid memory address.
> We don't use dialog, uac, http_async_client, but we do use topos.
>
> In the crash dumps it seems that there's something wrong inside
> free_cell_helper(), when trying to clean the dead_cell something goes wrong
> while freeing uri_avps_from, here's the crash log:
>
> 61(76) CRITICAL:  [core/pass_fd.c:277]: receive_fd(): EOF on 66
>  0(15) ALERT:  [main.c:740]: handle_sigs(): child process 65 exited
> by a signal 11
>  0(15) ALERT:  [main.c:743]: handle_sigs(): core was generated
>  0(15) INFO:  [main.c:766]: handle_sigs(): terminating due to SIGCH

[SR-Users] Kamailio crashing and infinite-looping when trying to free memory

2019-03-19 Thread Enrico Bandiera
Hi guys, recently we had some issues with kamailio in production, a proxy
at the edge of the infrastructure was crashing seemingly randomly, it
happened a couple of times in a timespan of 4-5 days until a point where we
found it in an endless loop, unable to process SIP packets anymore and
printing in loop messages like these:

50(60) CRITICAL:  [core/mem/q_malloc.c:512]: qm_free(): BUG: freeing
already freed pointer (0x7ff40a359450), called from core: core/usr_avp.c:
destroy_avp_list_unsafe(626), first free core: core/usr_avp.c:
destroy_avp_list_unsafe(626) - ignoring
50(60) CRITICAL:  [core/mem/q_malloc.c:512]: qm_free(): BUG: freeing
already freed pointer (0x7ff409c4fa58), called from core: core/usr_avp.c:
destroy_avp_list_unsafe(626), first free core: core/usr_avp.c:
destroy_avp_list_unsafe(626) - ignoring

We managed to replicate the crash and the loop in a dev environment with a
lot of difficulties. It seems not related to the peak load, but to the
growing number of processed calls
The kamailio version is:
version: kamailio 5.2.2 (x86_64/linux)
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC,
Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX,
FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR,
USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024,
BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown
compiled with gcc 5.3.1


Every time this happened it was the timer pid that was crashing or looping,
we managed to get 2 core dumps of the crash and 1 of the loop (got it after
killing the timer with SIGQUIT).
The timer process crashes after attempting to free memory that it's not
correctly managed. In particular we saw that it happens inside
destroy_avp_list_unsafe() called by the tm timer, when uri_avps_from points
to an invalid memory address.
We don't use dialog, uac, http_async_client, but we do use topos.

In the crash dumps it seems that there's something wrong inside
free_cell_helper(), when trying to clean the dead_cell something goes wrong
while freeing uri_avps_from, here's the crash log:

61(76) CRITICAL:  [core/pass_fd.c:277]: receive_fd(): EOF on 66
 0(15) ALERT:  [main.c:740]: handle_sigs(): child process 65 exited
by a signal 11
 0(15) ALERT:  [main.c:743]: handle_sigs(): core was generated
 0(15) INFO:  [main.c:766]: handle_sigs(): terminating due to SIGCHLD

 0(15) CRITICAL:  [core/mem/q_malloc.c:512]: qm_free(): BUG: freeing
already freed pointer (0x7f4d60a2e168), called from htable: ht_api.c:
ht_cell_free(217), first free core: core/usr_avp.c:
destroy_avp_list_unsafe(626) - ignoring
 0(15) INFO:  [core/sctp_core.c:53]: sctp_core_destroy(): SCTP API
not initialized

Before the crash we have no warnings on errors about shared memory
allocation

backtrace:

(gdb) bt full
#0  0x006371d7 in destroy_avp_list_unsafe (list=0x7f34f7a411b0) at
core/usr_avp.c:625
avp = 0x2
foo = 0x2
__func__ = "destroy_avp_list_unsafe"
#1  0x7f351c6909ab in free_cell_helper (dead_cell=0x7f34f7a41018,
silent=0, fname=0x7f351c796a02 "timer.c", fline=689) at h_table.c:260
b = 0x0
i = 1
rpl = 0x0
tt = 0x0
foo = 0x11c68daf2
cbs = 0x0
cbs_tmp = 0x7f34f80c3790
__func__ = "free_cell_helper"
#2  0x7f351c7291e6 in wait_handler (ti=1984410416,
wait_tl=0x7f34f7a410a0, data=0x7f34f7a41018) at timer.c:689
p_cell = 0x7f34f7a41018
ret = 1
unlinked = 0
rcount = 1
__func__ = "wait_handler"
#3  0x004d0f56 in timer_list_expire (t=1984410416,
h=0x7f34f6be7850, slow_l=0x7f34f6bea368, slow_mark=2702) at core/timer.c:874
tl = 0x7f34f7a410a0
ret = 0
#4  0x004d13bd in timer_handler () at core/timer.c:939
saved_ticks = 1984410416
run_slow_timer = 0
i = 654
__func__ = "timer_handler"
#5  0x004d1845 in timer_main () at core/timer.c:978
No locals.
#6  0x00425cc8 in main_loop () at main.c:1727
i = 8
pid = 0
si = 0x0
si_desc = "udp receiver child=7 sock=127.0.0.1:5060
\000\000\000\000q\000\000\000@6y\000\000\000\000\000\000\b\206|\210X\322:\032\301\255\000\000\000\000\000\000\000\000
\000\000\000\000\000\000\000\002\000\000\000\000\063\275{\000\000\000\000\000>",
'\000' ,
"\320\220\377\226\374\177\000\000\351\022a\000\000\000\000"
nrprocs = 8
woneinit = 1
__func__ = "main_loop"
#7  0x0042ca76 in main (argc=10, argv=0x7ffc96ff9398) at main.c:2696
cfg_stream = 0x25ca010
c = -1
r = 0
tmp = 0x7ffc96ffa4c9 ""
tmp_len = -1761635728
port = 32764
proto = -1761635632
options = 0x76c598
":f:cm:M:dVIhEeb:l:L:n:vKrRDTN:W:w:t:u:g:P:G:SQ:O:a:A:x:X:Y:"
ret = -1
seed = 

[SR-Users] Using the avp [*] index with jansson module functions

2019-02-26 Thread Enrico Bandiera
Hello, I would like to use the [*] index for the avps (to overwrite instead
of adding to the stack) when passing the variable to jansson module
functions.

When trying to do so I get this error:

 9(35) ERROR: jansson [jansson_funcs.c:219]: janssonmod_set(): result has
json error at line 1: end of file expected near ','

I suppose this is unsupported but maybe I'm doing something wrong, any
suggestions?

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


Re: [SR-Users] Fwd: pv_buffer_size config value actually ignored?

2019-02-14 Thread Enrico Bandiera
Thank you Daniel, setting it to 8192 solved the issue.

Cheers,
Enrico.

Il giorno mer 13 feb 2019 alle ore 22:18 Daniel-Constantin Mierla <
mico...@gmail.com> ha scritto:

> Hello,
>
> you actually need to set the modparam for it:
>
>   -
> https://www.kamailio.org/docs/modules/stable/modules/xlog.html#xlog.p.buf_size
>
> xlog module is using its own buffer, not the one from pv core file.
>
> Cheers,
> Daniel
> On 13.02.19 21:36, Enrico Bandiera wrote:
>
> Hi, could it be caused by this?
>
>
> https://github.com/kamailio/kamailio/blob/master/src/modules/xlog/xlog.c#L65
>
> I tried to increment it, recompiled kamailio and the error doesn't show up
> anymore
>
> Thanks,
> Enrico
>
>
>
> Il giorno mer 13 feb 2019 alle ore 17:29 Enrico Bandiera <
> enrico.bandi...@cloud.timenet.it> ha scritto:
>
>> Hello Daniel, here are the logs:
>>
>> 29(46) ERROR:  [core/pvapi.c:1457]: pv_printf(): no more space for
>> spec value - printed:7 token:5131 buffer:4096
>> 29(46) ERROR:  [core/pvapi.c:1467]: pv_printf(): buffer overflow --
>> increase the buffer size...
>> 29(46) ERROR:  [core/pvapi.c:1457]: pv_printf(): no more space for
>> spec value - printed:7 token:5129 buffer:4096
>> 29(46) ERROR:  [core/pvapi.c:1467]: pv_printf(): buffer overflow --
>> increase the buffer size...
>>
>> Thanks,
>> Enrico
>>
>>
>> Il giorno mer 13 feb 2019 alle ore 09:45 Daniel-Constantin Mierla <
>> mico...@gmail.com> ha scritto:
>>
>>> Hello,
>>>
>>> I pushed a patch to print more details about printed size, current token
>>> size and overall output buffer size in those error log messages -- the
>>> commit:
>>>
>>>   *
>>> https://github.com/kamailio/kamailio/commit/44e48809a608d4de46d61198137cd669c6a4763f
>>>
>>> Can you try with this patch and send again here on mailing list the
>>> error log messages?
>>>
>>> Cheers,
>>> Daniel
>>> On 13.02.19 09:20, Enrico Bandiera wrote:
>>>
>>>
>>>
>>> -- Forwarded message -
>>> From: Enrico Bandiera 
>>> Date: mer 13 feb 2019 alle ore 09:18
>>> Subject: Re: [SR-Users] pv_buffer_size config value actually ignored?
>>> To: Daniel-Constantin Mierla 
>>>
>>>
>>> Hello Daniel, yes we do use that $avp for a log line which is actually a
>>> big json, the $avp is composed by multiple jansson_append calls and at the
>>> end an xlog() calls prints it
>>> Could it also be that I'm miscalculating because of the encoding? 4K
>>> utf8 characters could be more than 4K (but I don't think there are so many
>>> multibytes characters to let it reach the 8K limit)
>>>
>>> Il giorno mer 13 feb 2019 alle ore 09:15 Daniel-Constantin Mierla <
>>> mico...@gmail.com> ha scritto:
>>>
>>>> Hello,
>>>>
>>>> where do you use that avp, because for the avp value itself, that
>>>> buffer is not used -- avp values are stored in shared memory.
>>>>
>>>> Do you use that avp in xlog() or other functions parameters?
>>>>
>>>> Cheers,
>>>> Daniel
>>>> On 13.02.19 09:10, Enrico Bandiera wrote:
>>>>
>>>> Hi, I'm having some strange issues with a somewhat big $avp value, when
>>>> it reaches a size of about 4K I get this error:
>>>>
>>>> 29(47) ERROR:  [core/pvapi.c:1452]: pv_printf(): no more space
>>>> for spec value
>>>> 29(47) ERROR:  [core/pvapi.c:1461]: pv_printf(): buffer overflow
>>>> – increase the buffer size...
>>>>
>>>> In the docs I read that the default pv_buffer_size is 8K, I still tried
>>>> to enforce it to something bigger and checked the logs to be sure it was
>>>> set:
>>>>
>>>> 0(384) DEBUG:  [core/pvapi.c:2062]: pv_init_buffer(): PV print
>>>> buffer initialized to [40][16384]
>>>>
>>>> But still when reaching the 4K size inside the $avp that error comes
>>>> out, is there any limit I'm not aware of?
>>>>
>>>> Thanks,
>>>> Enrico.
>>>>
>>>> ___
>>>> Kamailio (SER) - Users Mailing 
>>>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>
>>>> --
>>>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
>>>> www.

Re: [SR-Users] Fwd: pv_buffer_size config value actually ignored?

2019-02-13 Thread Enrico Bandiera
Hi, could it be caused by this?

https://github.com/kamailio/kamailio/blob/master/src/modules/xlog/xlog.c#L65

I tried to increment it, recompiled kamailio and the error doesn't show up
anymore

Thanks,
Enrico



Il giorno mer 13 feb 2019 alle ore 17:29 Enrico Bandiera <
enrico.bandi...@cloud.timenet.it> ha scritto:

> Hello Daniel, here are the logs:
>
> 29(46) ERROR:  [core/pvapi.c:1457]: pv_printf(): no more space for
> spec value - printed:7 token:5131 buffer:4096
> 29(46) ERROR:  [core/pvapi.c:1467]: pv_printf(): buffer overflow --
> increase the buffer size...
> 29(46) ERROR:  [core/pvapi.c:1457]: pv_printf(): no more space for
> spec value - printed:7 token:5129 buffer:4096
> 29(46) ERROR:  [core/pvapi.c:1467]: pv_printf(): buffer overflow --
> increase the buffer size...
>
> Thanks,
> Enrico
>
>
> Il giorno mer 13 feb 2019 alle ore 09:45 Daniel-Constantin Mierla <
> mico...@gmail.com> ha scritto:
>
>> Hello,
>>
>> I pushed a patch to print more details about printed size, current token
>> size and overall output buffer size in those error log messages -- the
>> commit:
>>
>>   *
>> https://github.com/kamailio/kamailio/commit/44e48809a608d4de46d61198137cd669c6a4763f
>>
>> Can you try with this patch and send again here on mailing list the error
>> log messages?
>>
>> Cheers,
>> Daniel
>> On 13.02.19 09:20, Enrico Bandiera wrote:
>>
>>
>>
>> -- Forwarded message -
>> From: Enrico Bandiera 
>> Date: mer 13 feb 2019 alle ore 09:18
>> Subject: Re: [SR-Users] pv_buffer_size config value actually ignored?
>> To: Daniel-Constantin Mierla 
>>
>>
>> Hello Daniel, yes we do use that $avp for a log line which is actually a
>> big json, the $avp is composed by multiple jansson_append calls and at the
>> end an xlog() calls prints it
>> Could it also be that I'm miscalculating because of the encoding? 4K utf8
>> characters could be more than 4K (but I don't think there are so many
>> multibytes characters to let it reach the 8K limit)
>>
>> Il giorno mer 13 feb 2019 alle ore 09:15 Daniel-Constantin Mierla <
>> mico...@gmail.com> ha scritto:
>>
>>> Hello,
>>>
>>> where do you use that avp, because for the avp value itself, that buffer
>>> is not used -- avp values are stored in shared memory.
>>>
>>> Do you use that avp in xlog() or other functions parameters?
>>>
>>> Cheers,
>>> Daniel
>>> On 13.02.19 09:10, Enrico Bandiera wrote:
>>>
>>> Hi, I'm having some strange issues with a somewhat big $avp value, when
>>> it reaches a size of about 4K I get this error:
>>>
>>> 29(47) ERROR:  [core/pvapi.c:1452]: pv_printf(): no more space for
>>> spec value
>>> 29(47) ERROR:  [core/pvapi.c:1461]: pv_printf(): buffer overflow –
>>> increase the buffer size...
>>>
>>> In the docs I read that the default pv_buffer_size is 8K, I still tried
>>> to enforce it to something bigger and checked the logs to be sure it was
>>> set:
>>>
>>> 0(384) DEBUG:  [core/pvapi.c:2062]: pv_init_buffer(): PV print
>>> buffer initialized to [40][16384]
>>>
>>> But still when reaching the 4K size inside the $avp that error comes
>>> out, is there any limit I'm not aware of?
>>>
>>> Thanks,
>>> Enrico.
>>>
>>> ___
>>> Kamailio (SER) - Users Mailing 
>>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>> --
>>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
>>> www.linkedin.com/in/miconda
>>> Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
>>> Kamailio Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
>>> Washington, DC, USA -- www.asipto.com
>>>
>>>
>> ___
>> Kamailio (SER) - Users Mailing 
>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>> --
>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
>> www.linkedin.com/in/miconda
>> Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
>> Kamailio Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
>> Washington, DC, USA -- www.asipto.com
>>
>>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Fwd: pv_buffer_size config value actually ignored?

2019-02-13 Thread Enrico Bandiera
Hello Daniel, here are the logs:

29(46) ERROR:  [core/pvapi.c:1457]: pv_printf(): no more space for
spec value - printed:7 token:5131 buffer:4096
29(46) ERROR:  [core/pvapi.c:1467]: pv_printf(): buffer overflow --
increase the buffer size...
29(46) ERROR:  [core/pvapi.c:1457]: pv_printf(): no more space for
spec value - printed:7 token:5129 buffer:4096
29(46) ERROR:  [core/pvapi.c:1467]: pv_printf(): buffer overflow --
increase the buffer size...

Thanks,
Enrico


Il giorno mer 13 feb 2019 alle ore 09:45 Daniel-Constantin Mierla <
mico...@gmail.com> ha scritto:

> Hello,
>
> I pushed a patch to print more details about printed size, current token
> size and overall output buffer size in those error log messages -- the
> commit:
>
>   *
> https://github.com/kamailio/kamailio/commit/44e48809a608d4de46d61198137cd669c6a4763f
>
> Can you try with this patch and send again here on mailing list the error
> log messages?
>
> Cheers,
> Daniel
> On 13.02.19 09:20, Enrico Bandiera wrote:
>
>
>
> -- Forwarded message -
> From: Enrico Bandiera 
> Date: mer 13 feb 2019 alle ore 09:18
> Subject: Re: [SR-Users] pv_buffer_size config value actually ignored?
> To: Daniel-Constantin Mierla 
>
>
> Hello Daniel, yes we do use that $avp for a log line which is actually a
> big json, the $avp is composed by multiple jansson_append calls and at the
> end an xlog() calls prints it
> Could it also be that I'm miscalculating because of the encoding? 4K utf8
> characters could be more than 4K (but I don't think there are so many
> multibytes characters to let it reach the 8K limit)
>
> Il giorno mer 13 feb 2019 alle ore 09:15 Daniel-Constantin Mierla <
> mico...@gmail.com> ha scritto:
>
>> Hello,
>>
>> where do you use that avp, because for the avp value itself, that buffer
>> is not used -- avp values are stored in shared memory.
>>
>> Do you use that avp in xlog() or other functions parameters?
>>
>> Cheers,
>> Daniel
>> On 13.02.19 09:10, Enrico Bandiera wrote:
>>
>> Hi, I'm having some strange issues with a somewhat big $avp value, when
>> it reaches a size of about 4K I get this error:
>>
>> 29(47) ERROR:  [core/pvapi.c:1452]: pv_printf(): no more space for
>> spec value
>> 29(47) ERROR:  [core/pvapi.c:1461]: pv_printf(): buffer overflow –
>> increase the buffer size...
>>
>> In the docs I read that the default pv_buffer_size is 8K, I still tried
>> to enforce it to something bigger and checked the logs to be sure it was
>> set:
>>
>> 0(384) DEBUG:  [core/pvapi.c:2062]: pv_init_buffer(): PV print
>> buffer initialized to [40][16384]
>>
>> But still when reaching the 4K size inside the $avp that error comes out,
>> is there any limit I'm not aware of?
>>
>> Thanks,
>> Enrico.
>>
>> ___
>> Kamailio (SER) - Users Mailing 
>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>> --
>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
>> www.linkedin.com/in/miconda
>> Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
>> Kamailio Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
>> Washington, DC, USA -- www.asipto.com
>>
>>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
> Kamailio Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
> Washington, DC, USA -- www.asipto.com
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] Fwd: pv_buffer_size config value actually ignored?

2019-02-13 Thread Enrico Bandiera
-- Forwarded message -
From: Enrico Bandiera 
Date: mer 13 feb 2019 alle ore 09:18
Subject: Re: [SR-Users] pv_buffer_size config value actually ignored?
To: Daniel-Constantin Mierla 


Hello Daniel, yes we do use that $avp for a log line which is actually a
big json, the $avp is composed by multiple jansson_append calls and at the
end an xlog() calls prints it
Could it also be that I'm miscalculating because of the encoding? 4K utf8
characters could be more than 4K (but I don't think there are so many
multibytes characters to let it reach the 8K limit)

Il giorno mer 13 feb 2019 alle ore 09:15 Daniel-Constantin Mierla <
mico...@gmail.com> ha scritto:

> Hello,
>
> where do you use that avp, because for the avp value itself, that buffer
> is not used -- avp values are stored in shared memory.
>
> Do you use that avp in xlog() or other functions parameters?
>
> Cheers,
> Daniel
> On 13.02.19 09:10, Enrico Bandiera wrote:
>
> Hi, I'm having some strange issues with a somewhat big $avp value, when it
> reaches a size of about 4K I get this error:
>
> 29(47) ERROR:  [core/pvapi.c:1452]: pv_printf(): no more space for
> spec value
> 29(47) ERROR:  [core/pvapi.c:1461]: pv_printf(): buffer overflow –
> increase the buffer size...
>
> In the docs I read that the default pv_buffer_size is 8K, I still tried to
> enforce it to something bigger and checked the logs to be sure it was set:
>
> 0(384) DEBUG:  [core/pvapi.c:2062]: pv_init_buffer(): PV print
> buffer initialized to [40][16384]
>
> But still when reaching the 4K size inside the $avp that error comes out,
> is there any limit I'm not aware of?
>
> Thanks,
> Enrico.
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Kamailio World Conference - May 6-8, 2019 -- www.kamailioworld.com
> Kamailio Advanced Training - Mar 4-6, 2019 in Berlin; Mar 25-27, 2019, in 
> Washington, DC, USA -- www.asipto.com
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] pv_buffer_size config value actually ignored?

2019-02-13 Thread Enrico Bandiera
Hi, I'm having some strange issues with a somewhat big $avp value, when it
reaches a size of about 4K I get this error:

29(47) ERROR:  [core/pvapi.c:1452]: pv_printf(): no more space for
spec value
29(47) ERROR:  [core/pvapi.c:1461]: pv_printf(): buffer overflow –
increase the buffer size...

In the docs I read that the default pv_buffer_size is 8K, I still tried to
enforce it to something bigger and checked the logs to be sure it was set:

0(384) DEBUG:  [core/pvapi.c:2062]: pv_init_buffer(): PV print buffer
initialized to [40][16384]

But still when reaching the 4K size inside the $avp that error comes out,
is there any limit I'm not aware of?

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


Re: [SR-Users] kamailio 5.2.0 with empty table of rtpengine - kamailio doesn't start

2019-02-01 Thread Enrico Bandiera
Hello, going back to 5.2.0 is actually not possible anymore if you didn't
save locally the distro packages because right now on the repos only
Kamailio 5.2.1 is available

Il giorno gio 31 gen 2019 alle ore 13:13 * Paolo Visintin - evosip.cloud
 ha scritto:

> Hello,
>
> I noticed that , with kamailio ver. 5.2.1 starting with empty rtpengine
> table causes strange messages in kamailio and it doesn't start
>
>
> modparam("rtpengine", "db_url", "text:///tmp/kamailio/dbtext")
> cat /tmp/kamailio/dbtext/rtpengine id(int,auto) setid(int) url(string)
> weight(int) disabled(int) stamp(int)
>
>
>
>  0(2856) WARNING: tm [tm.c:760]: mod_init(): reparse_on_dns_failover is
> enabled on a multihomed host -- check the readme of tm module!
>  0(2856) WARNING: rtpengine [rtpengine_db.c:100]: rtpp_load_db(): No
> rtpproxy instances in database
>  0(2856) ERROR: rtpengine [rtpengine.c:2768]: select_rtpp_set(): no
> rtpp_set_list->rset_first
>  0(2856) NOTICE: rtpengine [rtpengine.c:1664]: mod_init(): Default rtpp
> set 0 NOT found
>  1(2857) NOTICE: usrloc [udomain.c:434]: preload_udomain(): filtered by
> server_id[0]
>  2(2858) ERROR: rtpengine [rtpengine.c:1722]: build_rtpp_socks(): no more
> pkg memory for rtpp_socks
>  2(2858) ERROR:  [core/sr_module.c:847]: init_mod_child(): error
> while initializing module rtpengine
> (/usr/lib/x86_64-linux-gnu/kamailio/modules/rtpengine.so) (idx: 2 rank: 2
> desc: [udp receiver child=1 sock=172.28.0.120:5060])
>  2(2858) ERROR:  [core/pt.c:342]: fork_process(): init_child failed
> for process 2, pid 2858, "udp receiver child=1 sock=172.28.0.120:5060"
>  2(2858) CRITICAL:  [main.c:1633]: main_loop(): Cannot fork
>  4(2860) ERROR: rtpengine [rtpengine.c:1722]: build_rtpp_socks(): no more
> pkg memory for rtpp_socks
>  4(2860) ERROR:  [core/sr_module.c:847]: init_mod_child(): error
> while initializing module rtpengine
> (/usr/lib/x86_64-linux-gnu/kamailio/modules/rtpengine.so) (idx: 4 rank: 4
> desc: [udp receiver child=3 sock=172.28.0.120:5060])
>  4(2860) ERROR:  [core/pt.c:342]: fork_process(): init_child failed
> for process 4, pid 2860, "udp receiver child=3 sock=172.28.0.120:5060"
>  4(2860) CRITICAL:  [main.c:1633]: main_loop(): Cannot fork
>
>
>
> any hint on what could be wrong ? (5.2.0 works perfectly)
> many thanks!
>
> Paolo
> ___
> 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] Dialplan Module limits

2018-11-30 Thread Enrico Bandiera
Hi guys, does anyone know which are the limits of the diaplan module? After
how many entries I will encounter serious performance issues?

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


[SR-Users] IRC Channel

2018-08-06 Thread Enrico Bandiera
Hi, currenty (the last few days) there has been a spam attack on freenode,
#Kamailio is currently full of spam messages, I was wondering if who has
operator rights could set the channel to +r (only registered users can send
messages) as suggested by freeenode admins

The channel usually has only few messages and with all this spam it becomes
impossible at all to use it.

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


Re: [SR-Users] KEMI: accessing "keyword" variables from core

2018-07-23 Thread Enrico Bandiera
Noticed there's KSR.is_myself

for some reason the search functionality on the KEMI documentation didn't
find it when searching for "myself"

Thanks

2018-07-23 10:53 GMT+02:00 Enrico Bandiera :

> Hi Daniel, thank you, any hint for the keyword "myself"?
>
> 2018-07-20 14:59 GMT+02:00 Daniel-Constantin Mierla :
>
>> Hello,
>>
>> all the keywords should have corresponding variables, in these cases:
>>
>>   - dst_port should be $Rp (received on port)
>>
>>   - src_port should be $sp
>>
>> You can look in the pseudo-variables cookbook on kamailio.org/wiki to
>> confirm.
>>
>> Cheers,
>> Daniel
>>
>> On 20.07.18 12:48, Enrico Bandiera wrote:
>>
>> Hi, anyone how to access keyword variables like dst_port or src_port from
>> kemi? (specifically python in our case).
>>
>> Thanks,
>> Enrico.
>>
>>
>> ___
>> Kamailio (SER) - Users Mailing 
>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> --
>> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
>> www.linkedin.com/in/miconda
>> Kamailio World Conference -- 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] KEMI: accessing "keyword" variables from core

2018-07-23 Thread Enrico Bandiera
Hi Daniel, thank you, any hint for the keyword "myself"?

2018-07-20 14:59 GMT+02:00 Daniel-Constantin Mierla :

> Hello,
>
> all the keywords should have corresponding variables, in these cases:
>
>   - dst_port should be $Rp (received on port)
>
>   - src_port should be $sp
>
> You can look in the pseudo-variables cookbook on kamailio.org/wiki to
> confirm.
>
> Cheers,
> Daniel
>
> On 20.07.18 12:48, Enrico Bandiera wrote:
>
> Hi, anyone how to access keyword variables like dst_port or src_port from
> kemi? (specifically python in our case).
>
> Thanks,
> Enrico.
>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- 
> www.linkedin.com/in/miconda
> Kamailio World Conference -- www.kamailioworld.com
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] KEMI: accessing "keyword" variables from core

2018-07-20 Thread Enrico Bandiera
Hi, anyone how to access keyword variables like dst_port or src_port from
kemi? (specifically python in our case).

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


Re: [SR-Users] sdpops / keep_codecs_by_name not modifying sdp unless i call msg_apply_changes

2018-07-06 Thread Enrico Bandiera
Hi Daniel, it's indeed a problem related to rtpengine.

Thank you.

2018-07-06 13:15 GMT+02:00 Daniel Grotti :

> Hi Enrico,
> Are you calling it in conjunction with rtpengine? maybe this can help you:
> https://lists.kamailio.org/pipermail/sr-users/2015-August/089434.html
>
>
> Daniel
>
>
> On 07/05/2018 02:02 PM, Enrico Bandiera wrote:
>
> Hi, I'm encountering an issue where calling keep_codecs_by_name does not
> modify the SDP on the INVITE unless I call the "evil function"
> msg_apply_changes
>
> Any help is welcome,
> Thanks,
> Enrico.
>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://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
>
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


[SR-Users] sdpops / keep_codecs_by_name not modifying sdp unless i call msg_apply_changes

2018-07-05 Thread Enrico Bandiera
Hi, I'm encountering an issue where calling keep_codecs_by_name does not
modify the SDP on the INVITE unless I call the "evil function"
msg_apply_changes

Any help is welcome,
Thanks,
Enrico.
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] TOPOS module errors

2018-05-30 Thread Enrico Bandiera
Hi Daniel, since it was just before the KWC I waited some time before
pinging you :)
Any news on this issue?

Thanks,
Enrico.

2018-05-03 15:42 GMT+02:00 Enrico Bandiera :

> Hi Daniel, tell me if you need more portions of the log:
>
>  0(111) DEBUG:  [core/socket_info.c:559]: grep_sock_info(): checking
> if host==us: 10==11 && [172.22.3.7] == [31.193.99.4]
>  0(111) DEBUG:  [core/socket_info.c:566]: grep_sock_info(): checking
> if port 5060 (advertise 0) matches port 5060
>  0(111) DEBUG:  [core/socket_info.c:559]: grep_sock_info(): checking
> if host==us: 10==10 && [172.22.3.7] == [172.22.3.7]
>  0(111) DEBUG:  [core/socket_info.c:566]: grep_sock_info(): checking
> if port 5060 (advertise 0) matches port 5060
>  0(111) DEBUG: tm [uac.c:426]: t_uac_prepare(): next_hop=<
> sip:notification_peer@127.0.0.1:5060>
>  0(111) DEBUG: tm [uac.c:152]: dlg2hash(): hashid 25495
>  0(111) DEBUG: topos [topos_mod.c:468]: tps_execute_event_route():
> executing event_route[topos:...] (3)
>  0(111) ERROR: 

Re: [SR-Users] TOPOS module errors

2018-05-03 Thread Enrico Bandiera
Hi Daniel, tell me if you need more portions of the log:

 0(111) DEBUG:  [core/socket_info.c:559]: grep_sock_info(): checking
if host==us: 10==11 && [172.22.3.7] == [31.193.99.4]
 0(111) DEBUG:  [core/socket_info.c:566]: grep_sock_info(): checking
if port 5060 (advertise 0) matches port 5060
 0(111) DEBUG:  [core/socket_info.c:559]: grep_sock_info(): checking
if host==us: 10==10 && [172.22.3.7] == [172.22.3.7]
 0(111) DEBUG:  [core/socket_info.c:566]: grep_sock_info(): checking
if port 5060 (advertise 0) matches port 5060
 0(111) DEBUG: tm [uac.c:426]: t_uac_prepare(): next_hop=<
sip:notification_peer@127.0.0.1:5060>
 0(111) DEBUG: tm [uac.c:152]: dlg2hash(): hashid 25495
 0(111) DEBUG: topos [topos_mod.c:468]: tps_execute_event_route():
executing event_route[topos:...] (3)
 0(111) ERROR: 

Re: [SR-Users] TOPOS module errors

2018-05-03 Thread Enrico Bandiera
kamailio -f $PATH_KAMAILIO_CFG -DD -E -e

Thanks,
Enrico.

2018-05-03 12:52 GMT+02:00 Daniel-Constantin Mierla <mico...@gmail.com>:

> Hello,
>
> how do you start kamailio, or better, said what are the command line
> parameters?
> Cheers,
> Daniel
>
>
> On 03.05.18 12:26, Enrico Bandiera wrote:
>
> Hi Daniel, is kamcmd ps ok for this?
>
>  0(116) ERROR: topos [tps_storage.c:480]: tps_db_insert_dialog(): No
> database handle - misconfiguration?
>  0(116) ERROR: topos [tps_storage.c:412]: tps_storage_record(): failed to
> store
>
> root@proxy-bbd996f48-mjzr4:/# kamcmd ps
> 116 main process - attendant
>
> Thanks,
> Enrico.
>
>
> 2018-05-03 11:48 GMT+02:00 Daniel-Constantin Mierla <mico...@gmail.com>:
>
>> Hello,
>>
>> can you get the output for
>>
>> kamctl ps
>>
>> and see the description for process with pid 94?
>>
>> I assume you run it in docker, given low pid value shown in the log
>> message...
>>
>> Cheers,
>> Daniel
>>
>> On 03.05.18 10:42, Enrico Bandiera wrote:
>>
>> Hi, I'm trying to use the TOPOS module to solve some MTU issues we have
>> (we have multiple kamailio servers in our architecture and route/via
>> headers are becoming a problem)
>>
>> The module seems to work but I'm getting these errors on the log:
>>
>>  0(94) ERROR: topos [tps_storage.c:480]: tps_db_insert_dialog(): No
>> database handle - misconfiguration?
>>  0(94) ERROR: topos [tps_storage.c:412]: tps_storage_record(): failed to
>> store
>>
>> I get these errors for some time after running kamailio and then they
>> stop appearing.
>>
>> Data is inserted on topos_d and topos_t on the db, so I'm not sure what
>> the error is referring to.
>>
>> Any idea?
>>
>> Thanks,
>> Enrico.
>>
>>
>> ___
>> Kamailio (SER) - Users Mailing 
>> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>
>>
>> --
>> Daniel-Constantin Mierlawww.twitter.com/miconda -- 
>> www.linkedin.com/in/miconda
>> Kamailio World Conference - May 14-16, 2018 - www.kamailioworld.com
>>
>>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> 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] TOPOS module errors

2018-05-03 Thread Enrico Bandiera
Hi Daniel, is kamcmd ps ok for this?

 0(116) ERROR: topos [tps_storage.c:480]: tps_db_insert_dialog(): No
database handle - misconfiguration?
 0(116) ERROR: topos [tps_storage.c:412]: tps_storage_record(): failed to
store

root@proxy-bbd996f48-mjzr4:/# kamcmd ps
116 main process - attendant

Thanks,
Enrico.


2018-05-03 11:48 GMT+02:00 Daniel-Constantin Mierla <mico...@gmail.com>:

> Hello,
>
> can you get the output for
>
> kamctl ps
>
> and see the description for process with pid 94?
>
> I assume you run it in docker, given low pid value shown in the log
> message...
>
> Cheers,
> Daniel
>
> On 03.05.18 10:42, Enrico Bandiera wrote:
>
> Hi, I'm trying to use the TOPOS module to solve some MTU issues we have
> (we have multiple kamailio servers in our architecture and route/via
> headers are becoming a problem)
>
> The module seems to work but I'm getting these errors on the log:
>
>  0(94) ERROR: topos [tps_storage.c:480]: tps_db_insert_dialog(): No
> database handle - misconfiguration?
>  0(94) ERROR: topos [tps_storage.c:412]: tps_storage_record(): failed to
> store
>
> I get these errors for some time after running kamailio and then they stop
> appearing.
>
> Data is inserted on topos_d and topos_t on the db, so I'm not sure what
> the error is referring to.
>
> Any idea?
>
> Thanks,
> Enrico.
>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> 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


[SR-Users] TOPOS module errors

2018-05-03 Thread Enrico Bandiera
Hi, I'm trying to use the TOPOS module to solve some MTU issues we have (we
have multiple kamailio servers in our architecture and route/via headers
are becoming a problem)

The module seems to work but I'm getting these errors on the log:

 0(94) ERROR: topos [tps_storage.c:480]: tps_db_insert_dialog(): No
database handle - misconfiguration?
 0(94) ERROR: topos [tps_storage.c:412]: tps_storage_record(): failed to
store

I get these errors for some time after running kamailio and then they stop
appearing.

Data is inserted on topos_d and topos_t on the db, so I'm not sure what the
error is referring to.

Any idea?

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


Re: [SR-Users] Missing exit function on KEMI?

2018-03-29 Thread Enrico Bandiera
Hi Daniel,

it seems that your suggestion is not working, we are not using python for
the whole script, we have some functions written in python to manipulate
jsons and to do API queries which we keep in python but the core of the
routing logic is still written in Kamailio scripting language.

We call the python functions with python_exec()

I tried to use both exit() and os.exit() but it looks like they are ignored
and the route execution continues, the only thing that seems to work is to
return 0 from the function

Can you tell me please if it is safe to use the return value to exit?

Thanks,
Enrico.


2018-03-28 16:35 GMT+02:00 Daniel-Constantin Mierla <mico...@gmail.com>:

> Hello,
>
> in Python you can call exit() or os.exit(), this throws an exception which
> is caught by Kamailio and interpreted as the usual exit from kamailio.cfg.
>
> Probably we should add the KSR.x.exit() there as well, it was not added
> because python exit gave what was needed in this case
>
> Cheers,
> Daniel
>
> On 27.03.18 16:49, Enrico Bandiera wrote:
>
> Hello, I'm trying to use the KSR.x.exit() function in a KEMI python script
> but at runtime i get this error:
>
> KSR.x.exit()
> AttributeError: 'module' object has no attribute 'exit'
>
> It seems that the exit function is missing even though it is documented.
>
> My kamailio version is: kamailio 5.2.0-dev4 (x86_64/linux)  (it's a
> nightly)
>
> Any idea on what I can do?
>
> Thanks,
> Enrico.
>
>
> ___
> Kamailio (SER) - Users Mailing 
> Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - April 16-18, 2018, Berlin - 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


[SR-Users] Missing exit function on KEMI?

2018-03-27 Thread Enrico Bandiera
Hello, I'm trying to use the KSR.x.exit() function in a KEMI python script
but at runtime i get this error:

KSR.x.exit()
AttributeError: 'module' object has no attribute 'exit'

It seems that the exit function is missing even though it is documented.

My kamailio version is: kamailio 5.2.0-dev4 (x86_64/linux)  (it's a nightly)

Any idea on what I can do?

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