Re: [SR-Users] loose_route() does not find socket by name

2021-02-12 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > > Also, there is no "=". So instead of ";sn=", the code should look for > > "sn". > > Indeed, I will push a fix for it. I also did one, but yours is cleaner than mine. Thanks. Tested and it works, no more warnings to syslog. Looks like no-one had ever

Re: [SR-Users] loose_route() does not find socket by name

2021-02-12 Thread Juha Heinanen
Juha Heinanen writes: > I think I found the bug: > > ./src/core/config.h:#define SOCKNAME_PARAM ";sn=" > > but in parse_params() result params are without ";". Also, there is no "=". So instead of &q

Re: [SR-Users] loose_route() does not find socket by name

2021-02-12 Thread Juha Heinanen
I think I found the bug: ./src/core/config.h:#define SOCKNAME_PARAM ";sn=" but in parse_params() result params are without ";". -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

Re: [SR-Users] loose_route() does not find socket by name

2021-02-12 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Do you have the rr modparam related socket name mode set? Yes, sorry, forgot to mention it: modparam("rr", "sockname_mode", 1) I have added some debug to loose.c and some converted DBGs to INFOs in rr_do_force_send_socket() function:

[SR-Users] loose_route() does not find socket by name

2021-02-12 Thread Juha Heinanen
I did more tests and found that loose_route() does not find socket by name given in ;sn param: Feb 12 10:40:59 lab /usr/bin/sip-proxy[16975]: WARNING: rr [loose.c:799]: rr_do_force_send_socket(): no socket found to match second RR

Re: [SR-Users] loose_route() fails on domain name

2021-02-11 Thread Juha Heinanen
Seems to be OK not to include ;sn param in IP address R-R URIs. At least I didn't get any errors or warning to syslog when I called loose_route() on in-dialog requests that had such Route headers. -- Juha ___ Kamailio (SER) - Users Mailing List

Re: [SR-Users] loose_route() fails on domain name

2021-02-11 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Set names to the sockets > (https://www.kamailio.org/wiki/cookbooks/devel/core#listen): > > listen= . name "s1" > > And then add parameter "sn=s1" to the specific Record-Route header. If sockname_mode param has value 1: modparam("rr", "sockname_mode",

Re: [SR-Users] loose_route() fails on domain name

2021-02-11 Thread Juha Heinanen
Alex Balashov writes: > That is the main reason I had previously thought it wasn’t possible! Have you changed your mind? The document https://skalatan.de/de/blog/kamailio-sbc-teams tells Change in your configuration the existing record_route() function call to this one:

Re: [SR-Users] R-R to MS Teams Proxy

2021-02-11 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > The record_route_preset() is supposed to offer the flexibility of > setting the address part in RR headers via variables. I do not see how > the record_route() can be better variant, because it will end up in the > same kind functionality: for which to use the

Re: [SR-Users] R-R to MS Teams Proxy

2021-02-11 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > If not, then that has to be added because the purpose of > record_route_preset() is to be able to set rr header as one needs based > on variables that can be used in parameters. Note that the parameters > are only "host:port;transport=", without protocol, for

Re: [SR-Users] R-R to MS Teams Proxy

2021-02-11 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > The code of add_rr_param() used after the record-route header is added > indicates that the values should be added. I didn't have the time to > check what is with the cached params if add_rr_param() used beore the > record-route header is added. I will try to

Re: [SR-Users] No ACK from MS Teams

2021-02-11 Thread Juha Heinanen
Henning Westerholt writes: > not 100% sure what the other blog post is suggesting - but in my > setups there is no need for a special record_route(..) in reply > handling (like reply route). Its is not question about reply handling, but direction of INVITE. See my earlier message. -- Juha

Re: [SR-Users] R-R to MS Teams Proxy

2021-02-11 Thread Juha Heinanen
Carsten Bock writes: > I don't understand the trouble: > Wouldn't the following lead to the exact example: > > listen=tls:1.2.3.4:8007 advertise teams.tutpro.com:8007 > listen=tcp:1.2.3.4:5070 That would not work when K is a multi-tenant carrier Teams SBC proxy that requires tenant specific

Re: [SR-Users] No ACK from MS Teams

2021-02-11 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > What exactly do you need to do for R-R in replies? > > The R-R headers are mirrored in replies, so if you add R-R for requests > using the right order of parameters based on the direction, there is > nothing to be done for replies, or at least I haven't had to

Re: [SR-Users] R-R to MS Teams Proxy

2021-02-11 Thread Juha Heinanen
Sergey Safarov writes: > Maybe need to move into more global changes... > > How about DNS hostname usage for all headers? > "Via", "Record-Route" maybe "Contact" when Kamailio with extra modules > play media? > > how about global directive like > header_with_hostname=tue I'm not sure if that

Re: [SR-Users] No ACK from MS Teams

2021-02-11 Thread Juha Heinanen
Pepelux writes: > Try to put SBC-FQDN instead of SBC-IP-ADDR in the Record-Route: > > Record-Route: :5060;ftag=c3da9477e05d45fca31c24a155af3318;lr=on> Also, it better to follow OpenSIPS tips on the matter https://blog.opensips.org/2019/09/16/opensips-as-ms-teams-sbc/ since it also mentions

Re: [SR-Users] R-R to MS Teams Proxy

2021-02-11 Thread Juha Heinanen
to keep on using record_route() as before, but tell it to use a FQDN instead of IP address of the proxy in the first or second R-R header that it is adding. -- Juha - Daniel-Constantin Mierla writes: > > On 10.02.21 21:01

[SR-Users] R-R to MS Teams Proxy

2021-02-10 Thread Juha Heinanen
When request is sent from Kamailio to MS Teams SIP Proxy, the top R-R URI needs to contain FQDN of Kamailio SIP proxy instead of its IP address. Document https://skalatan.de/de/blog/kamailio-sbc-teams suggest to replace record_route(); call with

Re: [SR-Users] run_trans_callbacks_internal crash

2021-02-09 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Get also the output for gdb commands in frame 0: > > list > > p *cbp Here, but not much: Program terminated with signal SIGSEGV, Segmentation fault. #0  0x7f601d4b2f32 in run_trans_callbacks_internal (cb_lst=0x7f5ffb53e318, type=512,

[SR-Users] run_trans_callbacks_internal crash

2021-02-09 Thread Juha Heinanen
We got the crash below with 5.4.2. Before the crash there was db_mysql_async_exec_task(): failed to execute query related error messages in syslog. -- Juha Program terminated with signal SIGSEGV, Segmentation fault. #0  0x7f601d4b2f32 in run_trans_callbacks_internal

[SR-Users] about kamailio-sbc-teams tutorial

2021-02-01 Thread Juha Heinanen
I read kamailio-sbc-teams tutorial https://skalatan.de/blog/kamailio-sbc-teams and it does not mention, which CA root certificates need to be included tls config ca_list so that Kamalio is able to verify sipX.pstnhub.microsoft.com server certificates. -- Juha

Re: [SR-Users] kamailio.cfg fomatter

2020-12-10 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > You can add the new file there and eventually a few notes in the > README.md how to install it. Done, Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

Re: [SR-Users] kamailio.cfg fomatter

2020-12-10 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > this is syntax highlighting for kamailio.cfg, right? Yes, plus indentation, which it inherits from c-mode. > We can create a repo on kamailio github oraganization, like > emacs-kamailio-syntax, similar to what is now for vim: > >   *

[SR-Users] kamailio.cfg fomatter

2020-12-10 Thread Juha Heinanen
After noticing that emacs mode is missing, below is my first cut of kamailio-mode.el. -- Juha --- ;; kamailio mode for emacs (function list is not complete) ;; activate by starting your kamailio.cfg with this kind of line: ;;

[SR-Users] android client SIP TLS client autentication + kamailio

2020-12-02 Thread Juha Heinanen
beer Ll writes: > Has anybody use a android SIP client with TLS client authentication enabled > with kamailio? One possibility is baresip and baresip+ available from Play Store and F-Droid. -- Juha ___ Kamailio (SER) - Users Mailing List

Re: [SR-Users] kamailio.cfg fomatter

2020-11-24 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > So, to summarize, there should be syntax highlighting (maintained at > different levels) for the editors: > >   * vim (I guess also neovim) >   * vscode >   * atom >   * mcedit Long list, but unfortunately the oldest editor is missing: emacs. -- Juha

Re: [SR-Users] utility function to check if ip address is private?

2020-11-18 Thread Juha Heinanen
But these could be used: detailed_ip_type (ip, result) detailed_ipv4_type (ip, result) detailed_ipv6_type (ip, result) -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

Re: [SR-Users] utility function to check if ip address is private?

2020-11-18 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > this one: > https://www.kamailio.org/docs/modules/stable/modules/ipops.html#ipops.f.is_ip_rfc1918 If it is really is based on RFC1918, then I doubt that it would handle IPv6 private addresses, since when that RFC was written, IPv6 didn't exist. -- Juha

[SR-Users] utility function to check if ip address is private?

2020-11-18 Thread Juha Heinanen
I looked in the wiki for a utility function that would check if given ip address is private, but didn't find one. Does it exist? -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

Re: [SR-Users] send_reply() related feature request

2020-11-06 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > New function added, but no testing done -- if there are issues, open a > bug report. Works as expected, thanks, Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

Re: [SR-Users] send_reply() related feature request

2020-11-06 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > New function added, but no testing done -- if there are issues, open a > bug report. Thanks, will test later today, -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

Re: [SR-Users] BYE and TCP

2020-11-06 Thread Juha Heinanen
Kjeld Flarup writes: > My question is still, which port is the BYE from the server supposed to be > sent to? If client is behind NAT, the server must use the connection that the client opened to it to send the request to client. There is no way the server opens the connection and uses it. --

Re: [SR-Users] BYE and TCP

2020-11-06 Thread Juha Heinanen
Kjeld Flarup writes: > How is TCP SIP actually supposed to handle a BYE, when the client is > behind NAT. Client behind NAT is supposed to keep its TCP connection to SIP Proxy alive and use it for all requests of the call. If the connection breaks for some reason, the client sets up a new one

Re: [SR-Users] send_reply() related feature request

2020-11-04 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I wanted to say that the new function to be added should be a bit more > generic, not targeting only set_reply_close()+send_reply(), but have a > "mode" parameter to control what other operations should be done before > sending the reply out. That is how I

Re: [SR-Users] send_reply() related feature request

2020-11-03 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > set_reply_close() is very minimal wrapper action from the core setting > an internal flag. It can be merged with a reply function, but maybe it > should be a new function a little bit more generic, like > send_reply_mode(code, reason, mode) where mode is a

[SR-Users] send_reply() related feature request

2020-11-03 Thread Juha Heinanen
Many times (especially when there is a hacking attempt) I want to close TCP or TLS session after sending reply. So, for example, I write: set_reply_close(); send_reply("403", "Forbidden"); It would be more convenient if these two calls could be combined into one, for example:

Re: [SR-Users] about registrar save()/lookup()

2020-10-20 Thread Juha Heinanen
Added note about branch flags in registrar readme: https://github.com/kamailio/kamailio/commit/f2996bf733a0b5e00fe124440353b9a69a3532a2 -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

[SR-Users] about registrar save()/lookup()

2020-10-20 Thread Juha Heinanen
I didn't find any mention in registrar module README that save() function saves also branch flags and that lookup() retrieves them. Is that documented somewhere? -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

[SR-Users] TLS connection from Chrome to Kamailio fails

2020-10-17 Thread Juha Heinanen
What I wrote in below, is not correct. (1) Pointing Chrome to https://:5061 does result in successful handshake: Oct 17 17:53:06 lohi /usr/bin/sip-proxy[13274]: INFO: tls [tls_domain.c:751]: sr_ssl_ctx_info_callback(): SSL handshake started Oct 17 17:53:06 lohi /usr/bin/sip-proxy[13274]:

Re: [SR-Users] TLS connection from Chrome to Kamailio fails

2020-10-16 Thread Juha Heinanen
Jeff Bilyk writes: > https://lists.kamailio.org/pipermail/sr-users/2013-March/077235.html may > contain a helpful workaround, Jeff, Thanks for your reply. I do have tcp_accept_aliases=no and this problems appears before event_route [xhttp:request], that is, already during TLS handshake. --

Re: [SR-Users] TLS connection from Chrome to Kamailio fails

2020-10-16 Thread Juha Heinanen
Henning Westerholt writes: > Interesting. Does e.g. 5.4 still works for you? Might be then a > regression in trunk. Same problem with 5.4. -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

[SR-Users] TLS connection from Chrome to Kamailio fails

2020-10-16 Thread Juha Heinanen
Simple way to show this problem without any WebRTC SIP client is to point Chrome browser to K's TLS listening port: https://:5061 and look with wireshark or tshark how the handshake gets terminated by Chrome right after Server Hello. The same with Firefox works fine. -- Juha

Re: [SR-Users] about $sht(htable=>key) htable name

2020-10-13 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > In the code is possible to lookup the hash table at runtime, being also > done by some of the htable cfg functions. It will require some new code > to evaluate the name expression every time at at runtime, then parse and > lookup the hash table structure... A

[SR-Users] about $sht(htable=>key) htable name

2020-10-13 Thread Juha Heinanen
Is there some good reason why htable in $sht(htable=>key) cannot be a dynamic string containing pseudo variables? -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Re: [SR-Users] websocket transport protocol in Record-Route header

2020-09-29 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > If nobody else here can add more, this aspect can be clarified by asking > on sip-implementors mailing list or maybe ietf sipcore wg mailing > list. Perhaps Inaki or Jose as authors of the RFC could comment. I agree that secure transport is the only one that

Re: [SR-Users] websocket transport protocol in Record-Route header

2020-09-27 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > For SIP URI the parameter value is always ws: > >   * https://tools.ietf.org/html/rfc7118#section-5.2 Yes, according to that RFC, but does it make any sense, since how you tell based on usrloc received value if ws or wss was used for the registration? -- Juha

[SR-Users] websocket transport protocol in Record-Route header

2020-09-26 Thread Juha Heinanen
It may be related that also usrloc received uri has ;transport=ws: sip:192.168.43.83:51176;transport=ws instead of ;transport=wss. -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

[SR-Users] websocket transport protocol in Record-Route header

2020-09-26 Thread Juha Heinanen
No matter if UA uses ws or wss to connect to Kamailio, when K routes INVITE from this UA and record_route() is called, K always adds ;transport=ws parameter to Record-Route URI, for example, Record-Route: In this test, Kamailio is listening on that port like this: # SIP over WebSocket

Re: [SR-Users] Is there any way to remove stale registrations before expires time from usrloc ?

2020-09-11 Thread Juha Heinanen
sagar malam writes: > I have tried ul_rm_contact but it is not working : > curl POST --data > '{"jsonrpc":"2.0","method":"ul.rm_contact","params":{"0":"location","1":" > 30...@x.com >

[SR-Users] Is there any way to remove stale registrations before expires time from usrloc ?

2020-09-11 Thread Juha Heinanen
sagar malam writes: > I am using the usrloc module to store registrations. I could not find any > way to remove stale registrations before expires time. Most of the > registrations are mobile app so they wont run in background to save battery > of phone hence we end up having lots of

Re: [SR-Users] new compiler warning in 5.4 stable release

2020-08-30 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Should be fixed now. Yes, thanks, Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

[SR-Users] new compiler warning in 5.4 stable release

2020-08-30 Thread Juha Heinanen
tls_locking.c: In function 'tls_init_locks': tls_locking.c:191:1: warning: label 'error' defined but not used [-Wunused-label] error: ^ ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

Re: [SR-Users] dns_naptr_ignore_rfc default value

2020-08-10 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > The DNS NAPTR is also turned off by default, which should be on, based > on RFC, iirc, but that adds extra DNS query and slows down everything as > most of services I saw so far do no relay on NAPTR. It is OK to have NAPTR lookup off by default, but if it is

[SR-Users] dns_naptr_ignore_rfc default value

2020-08-10 Thread Juha Heinanen
What is the point of dns_naptr_ignore_rfc default value: dns_naptr_ignore_rfc If the DNS lookup should ignore the remote side's protocol preferences, as indicated by the Order field in the NAPTR records and mandated by RFC 2915. dns_naptr_ignore_rfc = yes | no (default yes) In my (and RFC

[SR-Users] new in upcoming Kamailio 5.4.0

2020-07-14 Thread Juha Heinanen
Henning Westerholt writes: > * 5 new modules have been added (pv_headers, kafka, secsipid, > * systemdops, dlgs) Could not find many of these on page: https://kamailio.org/docs/modules/devel/ -- Juha ___ Kamailio (SER) - Users Mailing List

Re: [SR-Users] 5.4 compiler warning

2020-07-14 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Should be fixed now. What OS/compiler you use that reports such warning? > My clang doesn't do it ... I'm using Debian 10 with C compiler gcc 8.3.0. -- Juha ___ Kamailio (SER) - Users Mailing List

[SR-Users] 5.4 compiler warning

2020-07-14 Thread Juha Heinanen
Got this when building 5.4; CC (gcc) [sip-proxy]core/dset.o core/dset.c: In function 'uri_trim_rcv_alias': core/dset.c:1042:6: warning: variable 'proto' set but not used [-Wunused-but-set-variable] int proto; ^ -- Juha ___

[SR-Users] Map Diversion to History-Info

2020-05-05 Thread Juha Heinanen
Duarte Rocha writes: > Does Kamailio have any method to transform an History-Info with redirecting > info into a Diversion or the other way around? I don't know of any builtin function for that, but you can handle it with normal config script statements. -- Juha

Re: [SR-Users] 488 Not Acceptable Here when remove codecs with rtcp-fb

2020-05-05 Thread Juha Heinanen
This 488 think reminds me that SIP over webrtc is broken. Webrtc UAS (at least JsSIP) cannot issue 488 before the UAS has started to ring. It is very frustrating for the callee to get such a spam ring. RFC3261 section "8.2 UAS Behavior" tells: Note that request processing is atomic. If a

Re: [SR-Users] 488 Not Acceptable Here when remove codecs with rtcp-fb

2020-05-05 Thread Juha Heinanen
José Lopes writes: > Hello Daniel, > > Thanks for your reply. > > On the next link, I put the original SDP from webrtc client and the SDP > after kamailio that exposes the issue. > I am using Kamailio version 5.3.3 with sdpops and rtpengine module. > > https://pastebin.com/bYr0AcVT Perhaps it

[SR-Users] H264 codec licence

2020-04-14 Thread Juha Heinanen
Prakash Ganesan writes: > We are planning to use kamilio/RTP engine for our WebRTC calls. I would > like to know how the H264 codec licences are handled as i know there is a > royalty fee associated with this video codec from the server perspective. > As of now there is plan to use H264 pass

Re: [SR-Users] setting $du in branch route has no effect in 5.3

2020-03-30 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > These commits were pushed to branch 5.3 already. Yes, I noticed, thanks, Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Re: [SR-Users] setting $du in branch route has no effect in 5.3

2020-03-30 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I pushed two commits on master and branch 5.3 to skip reusing tcp > connection id. See if it solves your case. I tried with master and now setting of $du in branch route worked OK. -- Juha ___ Kamailio (SER) - Users

Re: [SR-Users] setting $du in branch route has no effect in 5.3

2020-03-30 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > > Mar 29 10:19:28 char /usr/bin/sip-proxy[26162]: INFO: * du = > > sip:127.0.0.1:5090;transport=tcp > > Does this happen after a usrloc location lookup? Trying to figure out > what destination-related processing is done before to see what fields > were

Re: [SR-Users] setting $du in branch route has no effect in 5.3

2020-03-29 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Have you tested with tcp/tls or with udp? There was a group of commits > trying to propagate the tcp connection id as much as possible to speed > up connection search, maybe that needs to be reset -- I can look into > it, if you tested for tcp/tls. This is what

Re: [SR-Users] setting $du in branch route has no effect in 5.3

2020-03-29 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > The branch route is executed inside t_fwd.c (like 354 in master branch). > You can try to do a diff of tm module between the branches to see if you > can spot something related. I remember I grouped some variables in a > structure at some point, but it should

[SR-Users] setting $du in branch route has no effect in 5.3

2020-03-29 Thread Juha Heinanen
Juha Heinanen writes: > I noticed that in 5.3 and master setting $du in branch route has no > effect. It works fine in 5.2 using exactly the same config. This is pretty serious. If someone can point to possible source code files, where this bug might have been originated from, I can

[SR-Users] setting $du in branch route has no effect in 5.3

2020-03-29 Thread Juha Heinanen
I noticed that in 5.3 and master setting $du in branch route has no effect. It works fine in 5.2 using exactly the same config. -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

Re: [SR-Users] [ot] lightweight sip app for auto-answering with play file and echo mode

2020-03-27 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Would it be possible to combine like playing a file first, then do echo > mode? As you noticed, play and echo use different audio_source and thus I don't think it is possible to combine the two. -- Juha ___ Kamailio

Re: [SR-Users] [ot] lightweight sip app for auto-answering with play file and echo mode

2020-03-27 Thread Juha Heinanen
Regarding echo, one can use same kind of baresip accounts file as with play, such as ;auth_user=echo;auth_pass=xx;outbound="sip:192.168.43.82:5060;transport=tcp";ptime=20;audio_codecs=OPUS/48000/2,PCMU,PCMA;regint=600;pubint=0;regq=0.5;sipnat=outbound;answermode=auto The difference is that

Re: [SR-Users] [ot] lightweight sip app for auto-answering with play file and echo mode

2020-03-27 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > > Here is an example configuration of a SIP UA that plays a file when it > > receives a call: > > > > .baresip/config: > > ... > > audio_sourcegst,file:///tmp/file_to_play.wav > > ... > > module gst1.so gst1 module was recently

Re: [SR-Users] [ot] lightweight sip app for auto-answering with play file and echo mode

2020-03-26 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > >> wondering if anyone here is aware of a lightweight sip app that can > >> answer a call, play some file and/or do echo mode, mainly targeted at > >> using it for basic sip routing and call testing. > > baresip cli app can do all that. > > OK, thanks, I will

[SR-Users] [ot] lightweight sip app for auto-answering with play file and echo mode

2020-03-26 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > wondering if anyone here is aware of a lightweight sip app that can > answer a call, play some file and/or do echo mode, mainly targeted at > using it for basic sip routing and call testing. baresip cli app can do all that. -- Juha

[SR-Users] about kamailio.cfg NAT test

2020-03-24 Thread Juha Heinanen
In kamailio/etc/kamailio.cfg NAT test is based on nat_uac_test("19"). 19 includes test 16: 16 - Test if the source port is different from the port in the “Via” header. If the “Via” header contains no port, it uses the default SIP port 5060 Based on a couple of tests using baresip, looks

Re: [SR-Users] unknown error messages

2020-03-20 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > do you have an external application that keeps persistent connection for > rpc/jsonrpc commands? That was it. -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

[SR-Users] unknown error messages

2020-03-13 Thread Juha Heinanen
It turned out that the unknown error messages were produced by process 32058 that was not in ctl ps list at all. So it must have survived alive from a previous restart of K. Question: how it is possible that a tcp worker that does not belong to the current running K instance gets to service a

Re: [SR-Users] out of shm without any visible reason

2020-03-12 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Try to install debugging symbols for libmariadb and maybe there will be > more hints in the backtace of what it does internally, which can improve > troubleshooting by searching on the web for similar cases. I did that already earlier when I reported about

Re: [SR-Users] unknown error messages

2020-03-12 Thread Juha Heinanen
Henning Westerholt writes: > If you only saw it once it is probably not worth to dig that deep into > it, might be also caused from some external factors. It has appeared several times and may be related to json request. Perhaps tcp connection is broken before K has delivered the result. --

[SR-Users] unknown error messages

2020-03-12 Thread Juha Heinanen
Any idea where this kind of error message could come from: Mar 12 07:16:17 rox2 /usr/bin/sip-proxy[32058]: CRITICAL: [core/pass_fd.c:277]: receive_fd(): EOF on 61 Mar 12 07:16:17 rox2 /usr/bin/sip-proxy[32058]: ERROR: [core/io_wait.h:607]: io_watch_del(): trying to delete already erased

Re: [SR-Users] out of shm without any visible reason

2020-03-12 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > > DB access works fine from K worker processes during the time when > > insert is stuck in timer process. > > Are new records inserted in acc table? I think there are some > tools/commands for mysql to inspect the state a database table, check > acc table and

Re: [SR-Users] out of shm without any visible reason

2020-03-11 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > If it happens periodically, maybe you can track why: try to identify > apps accessing the database for back up, cdr generation, etc ... as well > as infrastructure maintenance operations (vm backup snapshot). DB access works fine from K worker processes during

Re: [SR-Users] out of shm without any visible reason

2020-03-11 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > It seems to be the case of a retransmission timeout: > > #17 0x7f7dc04d4aca in acc_onreply (t=0x7f7d9e3b0650, req=0x7f7d9e357650, > reply=0x, code=408) at acc_logic.c:604 > > Code is 408 and the reply is faked value. This case is happening

Re: [SR-Users] out of shm without any visible reason

2020-03-10 Thread Juha Heinanen
Regarding db_mysql timeout_interval, it has its default value 2, which means 6 seconds. The insert was hanging in the timer process much longer and no error messages related to abort appear in syslog. How is that possible? -- Juha ___ Kamailio (SER)

Re: [SR-Users] out of shm without any visible reason

2020-03-10 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > There is no async-insert done by acc with db_cluster, it is always > standard (sync) insert. You would have to track why the mysql server (or > the client library) is blocking from time to time, I don't think it is > something that kamailio can do. OK, thanks

Re: [SR-Users] out of shm without any visible reason

2020-03-10 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > The process is stuck in mysql client library. > > The async insert is not implemented in the db_cluster module, so at this > moment, if you want it, you have to use acc directly with db_mysql > module. Then how is it possible that most of the time accounting

Re: [SR-Users] out of shm without any visible reason

2020-03-09 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > If you can reproduce it, watch what the timer processes do during that > time frame. Get the list of processes with 'kamctl ps', then when the > issue is exposed, grab the backtraces of all processes with: > > kamctl trap > > A file is created with the

Re: [SR-Users] out of shm without any visible reason

2020-03-05 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > It is ok, just add the documentation for the new function as well. Done, Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Re: [SR-Users] out of shm without any visible reason

2020-03-05 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > The function can be added, should be easy to extract the code from the > rpc command function. How about the tm.c patch below? Or should the function be placed in some other tm/.c file and if so, which one? -- Juha --- ***

Re: [SR-Users] out of shm without any visible reason

2020-03-04 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > There was an unsafe list iteration - can you try with: > >   - > https://github.com/kamailio/kamailio/commit/325a45e846faae3e5dfa333727d5fab294e44dac > > If all ok, you can backport. Thanks for the patch. The crash has only happened once, so it is not easy

Re: [SR-Users] out of shm without any visible reason

2020-03-04 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > If you can reproduce it, watch what the timer processes do during that > time frame. Get the list of processes with 'kamctl ps', then when the > issue is exposed, grab the backtraces of all processes with: > > kamctl trap > > A file is created with the

Re: [SR-Users] out of shm without any visible reason

2020-03-03 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > The rpc command tm.clean is like a last resort option when dealing with > an unexpected situation that messed up the timer process, otherwise the > transactions should be cleaned as they are expired or terminated because > of final response sent upstream, with a

Re: [SR-Users] out of shm without any visible reason

2020-03-02 Thread Juha Heinanen
Here is some more details about the shm usage. Usage was steady at about 10 MB until time 17:05. Then it usage started to steadily grow during 15 min period and 17:21 hit 80 MB at which point tm.clean was executed. After that usage dropped straight back to 10 MB level. How is that possible,

Re: [SR-Users] out of shm without any visible reason

2020-03-02 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > The $stat(name) can be used for any internal statistic. I think it takes > only the name of statistic, not the group, so something like > $stat(free_size). Thanks, free_size and the others in core.shmmem { total: 67108864 free: 58274976

Re: [SR-Users] out of shm without any visible reason

2020-03-02 Thread Juha Heinanen
What kind of delay there is on cleaning of an expired transaction? I'm asking, since tm.clean released lots of shm. -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

Re: [SR-Users] out of shm without any visible reason

2020-03-01 Thread Juha Heinanen
John Petrini writes: > The times we've seen this is when transactions are waiting on something so > they pile up consuming shared memory. Do you have any database lookups or > calls out to external services or scripts? John, Thanks for your reply. Yes, there are MySQL operations both during

[SR-Users] out of shm without any visible reason

2020-02-28 Thread Juha Heinanen
K reported during about 90 sec period that it is out of shared memory: Feb 28 09:47:28 rox1 /usr/bin/sip-proxy[19725]: ERROR: tm [t_hooks.c:136]: insert_tmcb(): out of shm. mem Feb 28 09:47:28 rox1 /usr/bin/sip-proxy[19725]: ERROR: acc [acc_logic.c:394]: acc_onreq(): cannot register additional

Re: [SR-Users] Understanding set_rtp_engine with two sets

2020-02-25 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Hello, > > I didn't know about limitation, so far I needed only set_rtpengine_set() > with one parameter. Now I am wondering why won't work for > rtpengine_manage() because internally it calls the > rtpengine_offer()/_answer(). I have never used

Re: [SR-Users] how to detect "failure to add branches"?

2019-12-19 Thread Juha Heinanen
So, what is the conclusion on this? It is not good if information about failed branch route gets lost. Would it be possible to return some internal error reply and make t_relay() always succeed? -- Juha ___ Kamailio (SER) - Users Mailing List

Re: [SR-Users] how to detect "failure to add branches"?

2019-12-16 Thread Juha Heinanen
;Sent from mobile, with due apologies for brevity and errors. > >> On Dec 16, 2019, at 3:00 AM, Juha Heinanen wrote: >> >> Daniel-Constantin Mierla writes: >> >>> t_relay() should return negative (false) in such case, but I am not >sure >>> it ret

Re: [SR-Users] how to detect "failure to add branches"?

2019-12-16 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > t_relay() should return negative (false) in such case, but I am not sure > it returns a specific value for it -- this can be a variant to add if > needed. Yes, t_relay() returns false, but the branch flags I set in the branch route are lost and I don't know

<    1   2   3   4   >