Re: [SR-Users] too long mysql table key

2017-04-15 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > > Looks like default charset is something (e.g. utf8), where one char takes > > more than 1 byte and 767 limit is exceeded. > > > > Any suggestions on how to solve this? > > > I haven't trying for UNIQUE, but it may be the same as for usual INDEX > where one can

Re: [SR-Users] too long mysql table key

2017-04-15 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > As I said, I haven't added this table, nor use it, my guess was that > this constraint is to avoid having same (did,name,value) more than > once. I have used domain_attrs to store properties that are common to all users of the domain, e.g., which lcr index (=

Re: [SR-Users] too long mysql table key

2017-04-15 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I haven't used this table myself, it's coming from SER branch, but I > guess the unique constraint is for being sure there are no duplicated > values for the same did/name tuple, but more records with same did and > name. lookup_domain() adds attributes

[SR-Users] too long mysql table key

2017-04-14 Thread Juha Heinanen
Juha Heinanen writes: > domain-create.sql contains this: > > CREATE TABLE `domain_attrs` ( > `id` INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL, > `did` VARCHAR(64) NOT NULL, > `name` VARCHAR(32) NOT NULL, > `type` INT UNSIGNED NOT NULL, > `valu

[SR-Users] too long mysql table key

2017-04-14 Thread Juha Heinanen
I tried to install kamailio mysql db on Debian Stretch. Create of domain_attrs table failed with this kind of error message: ERROR 1071 (42000) at line 26: Specified key was too long; max key length is 767 bytes domain-create.sql contains this: CREATE TABLE `domain_attrs` ( `id` INT(10)

[SR-Users] about rtpengine-[offer-answer] via-branch flag

2017-07-18 Thread Juha Heinanen
rtpengine-offer function documentation tells this about via-branch flag: via-branch=... - Include the “branch” value of one of the “Via” headers in the request to the RTP proxy. Possible values are: “1” - use the first “Via” header; “2” - use the second “Via” header; “auto” - use the first

[SR-Users] dns failover and branches

2017-07-18 Thread Juha Heinanen
If Request-URI hostpart is a domain name with more than one SRV record, it appears that each SRV destination creates its own Kamailio branch. If branch route is set before t_relay(), it is executed only on the first SRV destination. If the first SRV destination fails, Kamailio tries automatically

[SR-Users] dns failover and branches

2017-07-19 Thread Juha Heinanen
Juha Heinanen writes: > If Request-URI hostpart is a domain name with more than one SRV record, > it appears that each SRV destination creates its own Kamailio branch. > If branch route is set before t_relay(), it is executed only on the > first SRV destination. If the first SRV

Re: [SR-Users] dns failover and branches

2017-07-19 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Is the branch parameter in the top Via of the second INVITE sent out > different than for the first INVITE (last digit incremented by 1 or > so)? Thanks for your reply. Yes it is: In the first INVITE: Via: SIP/2.0/UDP

Re: [SR-Users] dns failover and branches

2017-07-19 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Sounded rather simple, so I did a quick search in the code and just > pushed a patch for it -- very small, but hopefully it fixes this. If all > tests are fine for you, then you can backport as needed to stable branches. Thanks, will test and backport. -- Juha

[SR-Users] dns failover and branches

2017-07-19 Thread Juha Heinanen
I did more some more tests. The branch route was properly executed before INVITE to the first SRV destination was sent. The branch route set some headers, branch flags, etc. After the first SRV destination failed, INVITE was sent to the second SRV destination and the branch route was not

Re: [SR-Users] dns failover and branches

2017-07-19 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > OK, so it is creating a new branch structure. That could explain why the > branch flags from previous INVITE are not there. If it is only the > branch flags missing (and the headers changes are already propagated), I > expect to be an easy patch. I will look

[SR-Users] why is tcp_no_connect disabled by default

2017-07-27 Thread Juha Heinanen
Vik Killa writes: > I'm trying to understand the scenario when `tcp_no_connect` should ever be > set to `no`. > Kamailio comes with `tcp_no_connect=no` by default which means it will try > (and seemingly always fail) to create an outbound tcp connection when a > UAC's tcp connection is lost. This

Re: [SR-Users] why is tcp_no_connect disabled by default

2017-07-27 Thread Juha Heinanen
It is responsibility of SIP User Agent to keep connection open to its SIP Proxy (see outbound rfc). It thus does not make sense for SIP Proxy to try to open TCP or TLS connection to SIP UA. I use set_forward_no_connect(); call for that purpose. -- Juha

Re: [SR-Users] placing LCR Parameters in kamailio.cfg

2017-07-26 Thread Juha Heinanen
Logeshwaran G writes: > Getting Error while executing kamailio, > > 0(16640) ERROR: lcr [lcr_mod.c:479]: mod_init(): AVP gw_uri_avp has not > been defined Read lcr/README carefully before trying to use the module. -- Juha --- 3.28. gw_uri_avp (AVP

Re: [SR-Users] dns failover and branches

2017-07-19 Thread Juha Heinanen
Daniel, After your patch, branch flags are now preserved to the second SRV destination. 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] dns failover and branches

2017-07-19 Thread Juha Heinanen
Joel Serrano writes: > Just curious, in what version of Kamailio would this patch be implemented? > is the backport to previous versions automatic or do we have to manually > apply and build? I think backports are usually done on per need basis. So if you need this patch in some version earlier

Re: [SR-Users] Conference Factory URI

2017-05-10 Thread Juha Heinanen
Nguyen Tran Nhan writes: > Thanks for your reply. For example there are 10 number in SEMS. Now, number > 01 want to create conference by sending INVITE to URI. What URI value > should use? Any value as long as your SIP proxy routes the call to a SEMS conference application, for example, by

[SR-Users] Conference Factory URI

2017-05-10 Thread Juha Heinanen
Nguyen Tran Nhan writes: > I want to create conference without interact with IVR, so, trying to use > Conference Factory URI. https://tools.ietf.org/html/rfc4579#section-3.2 > > I am looking for documentation but it seems very poor documentation. Could > you please help to give more document or

[SR-Users] TLS to TCP

2017-05-12 Thread Juha Heinanen
David Villasmil writes: > I have a kamailio 4.2.8 receiving on tls and i'm trying to forward on tcp, > but AFTER the call is established, kamailio hangs the call with "SIPS > required"... Are you sure that it is K that hangs the established call? -- Juha

[SR-Users] relationship between debian kamailio.service and kamailio.init

2017-06-02 Thread Juha Heinanen
Could someone who knows about systemd tell, what is the relationship between deb/stretch kamailio.service and kamailio.init files? kamailio.service contains kamailio binary argument values and command to start kamailio, but kamailio.init does much more. Why do both exist? -- Juha

[SR-Users] best practice to re-install rtpengine after jessie to stretch upgrade?

2017-06-15 Thread Juha Heinanen
I made a test upgrade from Debian Jessie to Stretch while rtpengine 5.1.1 was running on Jessie. What is the best practice to get xt_RTPENGINE module installed in the new Stretch linux kernel, since it does not happen automatically. Should I reinstall rtpengine* packages or is there some better

Re: [SR-Users] LCR - too few dots/colons

2017-06-11 Thread Juha Heinanen
Annus Fictus writes: > on ip_addr field the value is a normal IPv4 address like 1.2.3.4 > > The gw_uri_avp befor call next_gws is: > > '1|sip:|0|||253719602||5060||;transport=udp|0' That looks fine and these are just debug messages: > DEBUG: lcr [../../core/resolve.h:258]: str2ip(): str2ip:

[SR-Users] LCR - too few dots/colons

2017-06-11 Thread Juha Heinanen
Annus Fictus writes: > any explication about these messages? > > DEBUG: lcr [../../core/resolve.h:258]: str2ip(): str2ip: ERROR: too few > dots in [253719602] > DEBUG: lcr [../../core/resolve.h:355]: str2ip6(): str2ip6: ERROR: too > few colons in [253719602] when do they appear? during lcr

[SR-Users] Encryption of voice stream

2017-09-21 Thread Juha Heinanen
Vasan VS writes: > Kindly let us know if we can have a mechanism to have the voice stream in > using the SIP server completely encrypted as well as prove that it is > encrypted using any speific mechanism. Better to use ZRTP for end-to-end encryption. -- Juha

[SR-Users] SQL for ordered LCR rules

2017-09-06 Thread Juha Heinanen
Patrick Wakano writes: > I am trying to ease the management of LCR routing rules, since once we > begin to have multiple prefixes, multiple GWs and so on, the visualization > and management of the rules priorities becomes exponentially hard to > do. I have written a simple web based interface

Re: [SR-Users] sql_do_query_async(): the db driver module doesn't support async query

2017-08-29 Thread Juha Heinanen
Daniel Tryba writes: > Are you really using mysql directly? For example the cluster driver > doesn't support async, regardless of the backend driver support. I re-checked, and, yes, I was using cluster driver. -- Juha ___ Kamailio (SER) - Users

Re: [SR-Users] Simultaneous calls in kamailio

2017-08-30 Thread Juha Heinanen
You can use, for example, sipp tool to generate simultaneous calls. -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

Re: [SR-Users] sql_do_query_async(): the db driver module doesn't support async query

2017-08-30 Thread Juha Heinanen
Daniel Tryba writes: > Our solution was to switch to the mysql driver in kamailio and use the > galera loadbalancer > (http://galeracluster.com/documentation-webpages/glb.html) to implement > loadbalancing/failover to our mariadb galera master/master cluster. Thanks for the tip, -- Juha

[SR-Users] Doubt in Lcr_table

2017-09-06 Thread Juha Heinanen
Logeshwaran G writes: > May I know the Difference between the "prefix" column in Lcr_gw table and > lcr_rule table. From README: Name of the column holding prefix of Request-URI user part and prefix of gateway. I'll add names of tables to the above. -- Juha

Re: [SR-Users] lcr gws

2017-08-25 Thread Juha Heinanen
Logeshwaran G writes: > But the issue is not fixed for the below one: > > [root@zeodialer ~]# kamcmd lcr.dump_rules > { > lcr_id: 1 > rule_id: 1 > prefix: 91 > from_uri: > request_uri: > stopper: 1 > } > { > gw_index: 1 > priority: 1 > weight: 1 > } > { >

[SR-Users] last pkg.stats entry

2017-09-01 Thread Juha Heinanen
When I make pkg.stats query (latest master), I get a weird last entry. What is it? -- Juha ... { entry: 28 pid: 14675 rank: -4 used: 9450336 free: 2354944 real_used: 10227968 total_size: 12582912 total_frags: 310 } { entry:

Re: [SR-Users] last pkg.stats entry

2017-09-01 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Should be fixed now in master -- secondary timer was counted twice, > resulting in an extra entry in process table that was not filled > (overall harmless, just empty content) -- I will backport in 5.0 as > well. Thanks for the fix. Tested and extra entry is

Re: [SR-Users] sql_do_query_async(): the db driver module doesn't support async query

2017-08-31 Thread Juha Heinanen
Daniel Tryba writes: > Our solution was to switch to the mysql driver in kamailio and use the > galera loadbalancer > (http://galeracluster.com/documentation-webpages/glb.html) to implement > loadbalancing/failover to our mariadb galera master/master cluster. In this solution, also loadbalancer

Re: [SR-Users] sql_do_query_async(): the db driver module doesn't support async query

2017-08-31 Thread Juha Heinanen
Juha Heinanen writes: > > Our solution was to switch to the mysql driver in kamailio and use the > > galera loadbalancer > > (http://galeracluster.com/documentation-webpages/glb.html) to implement > > loadbalancing/failover to our mariadb galera master/master cluster. >

Re: [SR-Users] lcr_id vs lcr_count

2017-11-29 Thread Juha Heinanen
Patrick Wakano writes: > I aggre with the lcr_count purpose and its usage for in-memory data. > However the problem I mentioned is that I cannot have an lcr_id of 1000 > eventough I have only one entry because my lcr_count is 50... > It is not about having a huge amount of lcr_ids but being able

Re: [SR-Users] sanity passes invalid uri

2017-10-30 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I don't remember any change recently to sanity, so probably it was > developed like this for long time. Yes, it is not a new bug. When I have extra time, I'll take a look at the code. -- Juha ___ Kamailio (SER) -

Re: [SR-Users] Transport question

2018-05-16 Thread Juha Heinanen
Wilkins, Steve writes: > Yes, I do. It seems so strange that nothing I try will enable it to > go out over TCP. There is very little configuration to force it out > TCP. I have tried a few thing that Alex has suggested but nothing > sends it over TCP. Show what you get about Listening to

Re: [SR-Users] Transport question

2018-05-15 Thread Juha Heinanen
Wilkins, Steve writes: > I tried your suggestion and everything is still going over UDP. I > verified with tcpdump/wireshark and all SIP traffic is UDP. Check your send socket, i.e., that it listens on TCP. -- Juha ___ Kamailio (SER) - Users Mailing

[SR-Users] t_load_contacts() and t_next_contacts() guts

2018-05-16 Thread Juha Heinanen
KamDev Essa writes: > >From where does t_load_contacts() load contacts and how does it order > then in case of a serial fork flow, as readme tells, from destination set and it orders them based on q and +sip.instance values. destination set can gets its values, e.g., as result of lookup() call.

Re: [SR-Users] t_load_contacts() and t_next_contacts() guts

2018-05-16 Thread Juha Heinanen
KamDev Essa writes: >- How do I mark the entries in the location table as permanent. you can use a flag for it or use long expires time. >- How do I group the entries in the location table as belonging to >- one hunt group ike the 4 extensions I mentioned uris of the extensions are

Re: [SR-Users] t_load_contacts() and t_next_contacts() guts

2018-05-16 Thread Juha Heinanen
KamDev Essa writes: > But lookup looks at urloc (location) table but that is dynamic. How > do I say these extensions need to be in this hunt group. What > static table do I place that info in.  Sorry, I don't understand. -- Juha ___

Re: [SR-Users] Randomizing t_load_contacts() with same q value?

2018-06-08 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > > Without taking the q value into account I could do something with the > > defined contacts_avp before calling t_next_contacts(). But I have no > > idea how to randomize and serialize the branches with the same q value > > after calling t_next_contacts(). Any

[SR-Users] sanity passes invalid uri

2017-10-27 Thread Juha Heinanen
I noticed that K 5.0 sanity() test passes uri that contains ` (back quote) character. Config: modparam("sanity", "default_checks", 1024) /* URI checks */ modparam("sanity", "uri_checks", 3) /* RURI, From */ xlog("L_INFO", "Checking $ru\n"); if (!sanity_check()) xlog("L_INFO",

Re: [SR-Users] Distributed Presence between Multiple Kamailios

2018-02-01 Thread Juha Heinanen
Charles Chance writes: > > Presence module has a new integration with DMQ in master branch which does > > exactly what you’re looking for. It’s enabled by setting modparam > > “enable_dmq” and the rest takes care of itself: > > > >

Re: [SR-Users] How are SIP messages divided amongst TCP workers?

2018-02-23 Thread Juha Heinanen
This issue may be related to the question: https://github.com/kamailio/kamailio/issues/1107 -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

[SR-Users] sipwise/sems for video

2018-08-08 Thread Juha Heinanen
Amar Tinawi writes: > my question is does sems support Video ? or is there any tuning for sems to > allow Video media streams ? SEMS does not support video. -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

Re: [SR-Users] sipwise/sems for video

2018-08-08 Thread Juha Heinanen
Amar Tinawi writes: > As signaling and media ? Media for sure. Haven't tried signaling only. -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

[SR-Users] how to enable tcp_write_buf?

2018-08-15 Thread Juha Heinanen
I tried to issue mtree.list command using xmlrpc query that would result in large response, and got error Aug 15 18:12:07 char /usr/bin/sip-proxy[10348]: ERROR: [core/tcp_main.c:618]: _wbufq_add(): (221375 bytes): write queue full or timeout (0, total 0, last write 55534052 s ago) Aug 15

Re: [SR-Users] how to enable tcp_write_buf?

2018-08-15 Thread Juha Heinanen
Dmitri Savolainen writes: > This issue is discussed here > https://github.com/kamailio/kamailio/pull/1376 There Daniel asks about increasing tcp_conn_wq_max and tcp_wq_max, which gets back to my original question: what is tcp_write_buf and how to enable it? -- Juha

Re: [SR-Users] how to enable tcp_write_buf?

2018-08-15 Thread Juha Heinanen
Dmitri Savolainen writes: > This issue is discussed here > https://github.com/kamailio/kamailio/pull/1376 Thanks for the pointer. > As temporary solution i use jsonrpcs fifo for big results. I tried that too (over http) and it worked. -- Juha ___

Re: [SR-Users] how to enable tcp_write_buf?

2018-08-16 Thread Juha Heinanen
Henning Westerholt writes: > The correct spelling should be tcp_buf_write (new name tcp_async). You can > find this in the core docs. Thanks. tcp_async is enabled by default. I then went and set tcp_conn_wq_max=256000 After that, I was able to fetch 1000 mtree records by issuing mtree.list

Re: [SR-Users] how to enable tcp_write_buf?

2018-08-16 Thread Juha Heinanen
Dmitri Savolainen writes: > So i am afraid change default value (32k) so vast according to possible > side effects for SIP tcp connections I agree. That is why my plan is to switch from xlmrpc transport to http, which seems to work without any need to increase tcp_conn_wq_max. -- Juha

Re: [SR-Users] JSONRPC-S and async RPC commands

2018-08-17 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > the module has support for async commands sent over HTTP, but not over > other transport layers, iirc. Good, I'll give it a try. -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

[SR-Users] JSONRPC-S and async RPC commands

2018-08-17 Thread Juha Heinanen
JSONRPC-S module README has: 2. Limitations This module does not implement asynchronous RPC commands. It is unlikely that asynchronous RPC commands will be executed from an JSON-RPC over HTTP client. Does this mean that, for example, tm.t_uac_wait command cannot be executed using

Re: [SR-Users] JSONRPC-S and async RPC commands

2018-08-17 Thread Juha Heinanen
I cave tm.t_uac_wait over JSONRPC-S a try and got a crash: (gdb) where #0 0x7ff1ec5e6cf9 in jsonrpc_send (ctx=0x7ff1e27066c8) at jsonrpcs_mod.c:390 #1 0x7ff1ec5ee5ac in jsonrpc_delayed_ctx_close (dctx=0x7ff1e2706660) at jsonrpcs_mod.c:1037 #2 0x7ff1f1deb375 in rpc_uac_callback

Re: [SR-Users] JSONRPC-S and async RPC commands

2018-08-17 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Get couple of more details from gdb: Below, Juha (gdb) frame 0 #0 0x7ff1ec5e6cf9 in jsonrpc_send (ctx=0x7ff1e27066c8) at jsonrpcs_mod.c:390 390 in jsonrpcs_mod.c (gdb) list 385 in jsonrpcs_mod.c (gdb) info locals nj = 0x0 i = -630111740 rbuf = {s

[SR-Users] Enabling tcp_write_buf

2018-08-21 Thread Juha Heinanen
Gholamreza Sabery writes: > In the documentation of "tcp_wq_max" option it is written that : > > > It has no effect if *tcp_write_buf *is not enabled. > > > > The interesting fact is that, there is not description of what it is and > > how one can enable it. There is even a question about it in

[SR-Users] Parmas in lcr_gw

2018-08-28 Thread Juha Heinanen
Ashutosh chaubey writes: > How to give username and password for the gateway in params column in > lcr_gw? It is up to you. params column value of a gw just specifies the params that are added to Request-URI when INVITE request is sent to the gw. -- Juha

Re: [SR-Users] JSONRPC-S and async RPC commands

2018-08-18 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I just pushed a commit in master branch, hopefully is fixing the issue > -- let me know the results and if ok, it will be backported. Daniel, Thanks for the commit. My tm.t_uac_wait test (using master) now worked fine without issues. -- Juha

Re: [SR-Users] event_route [tcp:closed] not executed

2018-09-04 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > The event_route was defined for the specific case where its name can be > anything and it is a matter of modules to execute some as they need. > > The interpreter which is defined in core has no clue about what names > can be there. The modules cannot complain

Re: [SR-Users] event_route [tcp:closed] not executed

2018-09-04 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Can you test with latest master and debug=3, then send all debug > messages from tcp connect to disconnect? Below is the debug. First REGISTER comes at 13:13:26 and un-REGISTER at 13:13:29 followed by tcp connection close. -- Juha Sep 4 13:13:26 char

Re: [SR-Users] event_route [tcp:closed] not executed

2018-09-04 Thread Juha Heinanen
I had not loaded tcpops module. Should work after that. How about checking that all event routes in config have corresponding modules loaded? -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

Re: [SR-Users] event_route [tcp:closed] not executed

2018-09-04 Thread Juha Heinanen
I loaded tcpops module but still nothing to syslog from: event_route [tcp:close] Debug (below) now shows this: Sep 4 14:07:52 char /usr/bin/sip-proxy[6487]: DEBUG: tcpops [tcpops.c:233]: tcpops_handle_tcp_closed(): received TCP closed event Sep 4 14:07:52 char /usr/bin/sip-proxy[6487]:

Re: [SR-Users] event_route [tcp:closed] not executed

2018-09-04 Thread Juha Heinanen
Juha Heinanen writes: > I loaded tcpops module but still nothing to syslog from: > > event_route [tcp:close] I had typo in above: should be closed instead of close. This again shows that it would be nice if it would be checked that each event_route has a home.

[SR-Users] please downgrade warning message

2018-02-27 Thread Juha Heinanen
I noticed this when I start a correctly configured kamailio: Feb 27 21:55:45 rautu /usr/bin/sip-proxy[29529]: WARNING: registrar [registrar.c:369]: mod_init(): empty reg_xavp_cfg or sock_flag not set -> resetting Neither of those two are mandatory. I'm not using registered() function. Please

[SR-Users] is t_flush_flags() really needed?

2018-03-26 Thread Juha Heinanen
Juha Heinanen writes: > While testing xflags, i noticed that a regular flag that I set AFTER > calling t_newtrans() stays set in onreply_route even when I do not > call t_flush_flags(). I made the same test with xflags and they do require t_flush_xflags() call if an xflag is set after t

Re: [SR-Users] [sr-dev] is t_flush_flags() really needed?

2018-03-28 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Afaik, flags after t_newtran() were supposed not to be moved to > transaction if t_flush_flags(), that being the purpose of the later > function. Are you doing any other tm operations between creating the new > transaction and relaying the request or end of

[SR-Users] is t_flush_flags() really needed?

2018-03-25 Thread Juha Heinanen
While testing xflags, i noticed that a regular flag that I set AFTER calling t_newtrans() stays set in onreply_route even when I do not call t_flush_flags(). In a route block: if (!t_newtran()) { ERROR(Failed to create new transaction for $rm <$ru>); exit;

Re: [SR-Users] force_send_socket

2018-10-08 Thread Juha Heinanen
> Le 08/10/2018 à 02:27, Alex Balashov a écrit : > > Hi, > > > > 1. force_send_socket() is essentially deprecated in favour of mutating > > $fs: > > > > $fs = 'udp:67.215.186.219:5060'; According to wiki, $fs cannot deprecate force_send_socket. In force_send_socket, proto can be left out:

Re: [SR-Users] force_send_socket

2018-10-08 Thread Juha Heinanen
Alex Balashov writes: > In the core, there are lots of functions such as strip(), prefix(), > rewritehostport(), and, in my view, force_send_socket(). These functions > don't take PV arguments, and are superceded by the more flexible direct > manipulation of the RURI, the destination set, and

Re: [SR-Users] Single session start

2018-11-12 Thread Juha Heinanen
Daniel Tryba writes: > On Mon, Nov 12, 2018 at 09:59:10AM +0100, Jos?? Antonio Guti??rrez Delgado > wrote: > > Hi, I would like to know if it is possible to make the last register of a > > user the active register and if possible the only one. > > I'm with an Android application and sometimes I

[SR-Users] clang compiler warnings

2018-10-02 Thread Juha Heinanen
I just made a test and, for sure, clang warns about unused variables: $ clang -Wunused-variable -I/usr/include/re -I/usr/include/baresip -lbaresip -lrem -lre baresip.c baresip.c:48:6: warning: unused variable 'unused' [-Wunused-variable] int unused; ^ 1 warning generated.

Re: [SR-Users] clang compiler warnings

2018-10-02 Thread Juha Heinanen
Floimair Florian writes: > I think your mail was intended for the baresip mailing list. > There is no baresip.c in Kamailio I just wanted to check if it is really so that clang doesn't generate unused compiler warnings. Any C source is OK for that test and I just happened to have baresip.c

Re: [SR-Users] event_route [tcp:closed] not executed

2018-09-04 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Can you list the tcp connections via rpc and see if the one you expect > to be closed is still listed there? core.tcp_list after quiting baresip shows that the tcp connection has been removed, i.e., is not anymore in the list -- Juha

[SR-Users] event_route [tcp:closed] not executed

2018-09-04 Thread Juha Heinanen
Based on comment: https://github.com/kamailio/kamailio/issues/171#issuecomment-418175840 I gave event_route [tcp:closed] a try: event_route [tcp:closed] { # Handle TCP connection close xlog("L_INFO", "$proto connection closed ($conid)\n"); } Nothing comes to syslog when I quit my

Re: [SR-Users] kamailio does not responde if an rtpengine is unreachable

2018-12-24 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > what happens when you send a sip message and have debug=3? Do you see > any logs printed? Nothing comes to syslog when register request arrives. Also kamailio does not respond to ctl command. Below is sample on what comes to syslog after start. -- Juha

Re: [SR-Users] kamailio does not responde if an rtpengine is unreachable

2018-12-26 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I pushed a quick fix for the case when db support is not enabled, > because these locks are useless in that case, so all children will do > the rtpengine init at the same time, without waiting for the others: Still took in rtpengine db mode about 2 minutes

Re: [SR-Users] kamailio does not responde if an rtpengine is unreachable

2018-12-26 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Maybe you would also want to tune the timeout with the modparam: > > modparam("rtpengine", "rtpengine_disable_tout", 5) > > So detection of unavailable rtpproxy is fast, otherwise it is 60 sec by > default, so you may still experience some slow start per child

Re: [SR-Users] kamailio does not responde if an rtpengine is unreachable

2018-12-26 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > You can make a fix yourself if you want and have the time. It is not a > module I coded, nor the one that added db support for it, so I am also > coding by learning what was done there. Understand. Perhaps the solution for now is to disable db mode in the

Re: [SR-Users] kamailio does not responde if an rtpengine is unreachable

2018-12-26 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I was able to figure out what could be the cause with: > > modparam("rtpengine", "rtpengine_sock", "udp:127.0.0.1:2223 > udp:192.168.64.4:2224") In my test, I use rtpengine in db mode, i.e., db_url param is set. Would your patch also fix the delay in that

Re: [SR-Users] kamailio does not responde if an rtpengine is unreachable

2018-12-26 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I tried quickly with a rtpengine that was not running, and kamailio > started fine and then was responding fast for sip requests. > > To clarify: you actually have more rtpengine configured (at least two) > in a set and one is not available, right? Yes, I have

[SR-Users] kamailio does not responde if an rtpengine is unreachable

2018-12-23 Thread Juha Heinanen
I noticed that if one rtpengine in a set is unreachable, kamailio 5.2 does start, but does not process any SIP requests. Is this intentional? -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

Re: [SR-Users] kamailio does not responde if an rtpengine is unreachable

2018-12-24 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Can you see how many kamailio processes are running (w.g., with ps)? Are > there expected number of there? Same number of processes when I start K with proper rtpengine set and with one that has an rtpengine that does not respond. > If yes, take the PID of few

Re: [SR-Users] kamailio does not responde if an rtpengine is unreachable

2018-12-24 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > It waits for packets from the network. Did you send registration via > UDP? No, via tcp and there was also tcp listener processes. -- Juha ___ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org

Re: [SR-Users] kamailio does not responde if an rtpengine is unreachable

2018-12-24 Thread Juha Heinanen
* Paolo Visintin - evosip.cloud writes: > we solved starting with no rtpengine this produces at startup: > WARNING: rtpengine [rtpengine_db.c:100]: rtpp_load_db(): No rtpproxy > instances in database > and then, after rtpengine instances are up and correctly running we send an >

Re: [SR-Users] kamailio does not responde if an rtpengine is unreachable

2018-12-24 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Can you see the packet being sent over the network (with ngrep, tcpdump, > ...)? Yes, UDP register is sent, but kamailio does not respond to it. Then I did this. 1) Started K where rtpengine udp:192.26.134.10:6050 is enabled but is not running. 2) Gave

Re: [SR-Users] kamailio does not responde if an rtpengine is unreachable

2018-12-25 Thread Juha Heinanen
David Villasmil writes: > You could also ask politely, as this IS open source, after all. I didn't notice any impoliteness in my message. I just mentioned that a proper fix is needed. -- Juha ___ Kamailio (SER) - Users Mailing List

Re: [SR-Users] kamailio does not responde if an rtpengine is unreachable

2018-12-28 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I just pushed a series of commits trying to rework how loading (and > reloading) of rtpegines list is done, to avoid that sync'ed probing, > which can take long if any of the rtpengines is down. Daniel, Thanks for the commit. Now K starts responding

Re: [SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Juha Heinanen
Juha Heinanen writes: > I'll backport to 5.1. cherry-pick didn't work: $ git cherry-pick -x f088d2afe4153b9e440a4293211c78f5a25af691 error: could not apply f088d2afe... core: if nosip msg hooks skip handling the packet, stop sip routing processing hint: after resolving the conflicts, m

Re: [SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I guess you have some modules that registered to process non-sip > traffic, such as xhttp, xmlrpc, ... the parse_msg() throws error and in > such case the processing is delegated to non-sip message handling, if > all skipped, then ended up on trying going

Re: [SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > I will check the cherry pick conflict and do the backport manually if > needed once. Going to be a bit later today. I did it. There was only one small conflict. -- Juha ___ Kamailio (SER) - Users Mailing List

Re: [SR-Users] Record-Route Parameters

2018-09-17 Thread Juha Heinanen
Duarte Rocha writes: > When Kamailio receives the INVITE, it relays it with two Record-Route like > this : > > Record-Route:sip:IP1;ftag=;vst=xxx;vsf=xxx > Record-Route:sip:IP2;ftag=;vst=xxx;vsf=xxx > What i want is : > >

[SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Juha Heinanen
In order to be able to fail2ban an attacker that sends tons of SIP requests with malformed request lines, it would need to be possible to generate an appropriate syslog message from config file. I didn't find any sanity module param value that would turn on checking of request line syntax. Any

[SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Juha Heinanen
Juha Heinanen writes: > I didn't find any sanity module param value that would turn on checking > of request line syntax. Any other ideas? I added log message at the beginning of main route block: route { # main route block (initial tasks) xinfo("Here\n"); It was

[SR-Users] MWI notification through pua.publish

2018-09-17 Thread Juha Heinanen
willy writes: > Have anyone tried to use pua.publish to send MWI notification? Can it > work at all? > > I'm sending request through jsonrpc server, but it is not dispatched by > handle_publish. It works fine here. Last week I noticed an issue with pua.publish over jsonrpc and it was fixed.

Re: [SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > try with event_route[core:receive-parse-error] { ... } > > The variables related to sip message content (headers, body, ...) likely > not working there (should return null), but source IP/port should be good. Thanks for the pointer. I defined:

Re: [SR-Users] Record-Route Parameters

2018-09-17 Thread Juha Heinanen
Duarte Rocha writes: > Can you show me where? I've tried add_rr_param() but it still adds every > parameter to the two record-routes. I didn't quite understand your question. Perhaps you need to add the r-r headers using append_hf() function that allows you to customize them. -- Juha

Re: [SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Can you send all log messages with debug=3? Below. > Btw, the source ip variable is $si. Oh yes, I had just copied the statement from other part of config, where $si has been assigned to $var(src_ip). -- Juha Sep 17 16:56:07 char /usr/bin/sip-proxy[24183]:

Re: [SR-Users] how to catch attacker using bad request line?

2018-09-17 Thread Juha Heinanen
Daniel-Constantin Mierla writes: > Can you send all log messages with debug=3? I also started k with debug=3 to check that the event route is ok: Sep 17 17:00:40 char sip-proxy: DEBUG: [core/events.c:53]: sr_core_ert_init(): event_route[core:receive-parse-error] is defined -- Juha

  1   2   >