Re: [SR-Users] tcp_accept_haproxy questions

2019-09-30 Thread Henning Westerholt
Hello Grant,

Activating it should not affect UDP transport – in fact these different 
protocols are done from individual Kamailio process (children).

About the WebSockets Question – it should work but I am not aware that this was 
tested so far. Give it a try and please report back to the list. 

Cheers,

Henning

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services

From: sr-users  On Behalf Of Grant 
Bagdasarian
Sent: Friday, September 27, 2019 11:44 PM
To: Kamailio (SER) - Users Mailing List 
Subject: [SR-Users] tcp_accept_haproxy questions

Hello,

The docs mention regular TCP connections not being accepted anymore once this 
is enabled. I assume UDP is unaffected and both proxyprotocol and udp may live 
side by side?

Also, does this play nicely with WebSockets? Taking into account the Websocket 
connection being setup through a proxy protocol supporting proxy.

Regards,

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


Re: [SR-Users] Call limit through shared database

2019-09-30 Thread Henning Westerholt
Hello Olli,

you can synchronize dialog profile information between Kamailio servers with 
the DMQ replication mechanism. You basically load and configure the DMQ module 
and activate it also in the dialog module.

Cheers,

Henning

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://skalatan.de/services

From: sr-users  On Behalf Of Olli Attila
Sent: Sunday, September 29, 2019 10:04 AM
To: Kamailio (SER) - Users Mailing List 
Subject: [SR-Users] Call limit through shared database

Hello,

I have 2 kam instances using one shared database and both kam servers running 
the same routing logic code. Kamailio servers are configured to use the same 
database as dialog backend.

I am limiting the concurrent dialogs in the following way but it seems that 
kamailio is using its own memory to read profile size rather than the db. 
Second kam is not aware of the dialog profiles that the first kam wrote to the 
shared db. Is there a way to get multiple kam instances to read profile size 
from the same database when calling the get_profile_size function?

modparam("dialog", "profiles_with_value", "concurrent_calls")
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "db_url", DBURL)
modparam("dialog", "db_mode", 1)


route[LIMIT_CALLS] {

if (!dlg_isflagset("1")) { # $td – gateways, $fu - user
if (get_profile_size("concurrent_calls", "$fu", "$avp(calls)")) {
if ($avp(calls) >= 3) {
xlog("L_INFO", "Concurrent calls $fu at limit");
send_reply("503", "Calls limit reached"); exit;
} else {
dlg_manage(); dlg_setflag("1");
set_dlg_profile("concurrent_calls", "$fu");
}
}
}
}

Cheers,
Olli

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


[SR-Users] BLF 'NOTIFY' not working

2019-09-30 Thread Petarr Jones
Hi

I am using Kamailio 5.2 with the following PRESENCE modules and parameters:

loadmodule "presence.so"
loadmodule "presence_xml.so"
loadmodule "presence_dialoginfo.so"
loadmodule "presence_reginfo.so"

modparam("presence", "db_url", DBURL)
modparam("presence_xml", "db_url", DBURL)
modparam("presence_xml", "force_active", 1)
modparam("presence_xml", "disable_bla", 0)
modparam("presence_xml", "integrated_xcap_server", 1)

I have a Yealink T28P phone which has two lines/extensions successfully 
registered with Kamailio 5.2. When I setup the BLF light to monitor one of the 
extensions, I get the correct SUBSCRIBE record but the NOTIFY record is sent 
over and over again until it fails.

---
NOTIFY sip:101@192.168.1.123:5062 SIP/2.0
Via: SIP/2.0/UDP 
45.45.45.45;branch=z9hG4bKd16c.03b5bc97.0
To: ;tag=1366853594
From: ;tag=a6a1c5f60faecf035a1ae5b6e96e979a-e6c3
CSeq: 2 NOTIFY
Call-ID: 594386350@192.168.1.123
Content-Length: 0
User-Agent: kamailio (5.2.4 (x86_64/linux))
Max-Forwards: 70
Event: dialog
Contact: 
---

When I register the phone with Freeswitch instead and run the same test, the 
NOTIFY works and I get a much longer NOTIFY message

---
NOTIFY sip:100@192.168.1.123:5064 SIP/2.0
Via: SIP/2.0/UDP 66.66.66.66;rport;branch=z9hG4bK1mXej9r2605UB
Route: ;transport=udp
Max-Forwards: 70
From: ;tag=xUoVghM5syHc
To: "100" ;tag=1720892352
Call-ID: 2583553127@192.168.1.123
CSeq: 1178415701 NOTIFY
Contact: 
User-Agent: FreeSWITCH-mod_sofia/1.10.1-release-12-f9990221e6~64bit
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, 
REFER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: timer, path, replaces
Event: dialog
Allow-Events: talk, hold, conference, presence, as-feature-event, dialog, 
line-seize, call-info, sla, include-session-description, presence.winfo, 
message-summary, refer
Subscription-State: active;expires=1800
Content-Type: application/dialog-info+xml
Content-Length: 149

xml version="1.0"?>
dialog-info xmlns="urn:ietf:params:xml:ns:dialog-info" version="0" state="full" 
entity="sip:102@66.66.66.66">
dialog-info>
---

Should the message coming from Kamailio contain more data or is that not the 
issue. Should I be including other modules also?

All guidance would be appreciated.

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


Re: [SR-Users] Call limit through shared database

2019-09-30 Thread Daniel Tryba
On Sun, Sep 29, 2019 at 11:03:47AM +0300, Olli Attila wrote:
> modparam("dialog", "profiles_with_value", "concurrent_calls")
> modparam("dialog", "dlg_flag", 4)
> modparam("dialog", "db_url", DBURL)
> modparam("dialog", "db_mode", 1)
 
Have you tested with a lower value of
https://kamailio.org/docs/modules/5.1.x/modules/dialog.html#dialog.p.update_period
I have it set to 5, but for some reason I'm not using get_profile_size

For inbound:
$var(maxchannels) = 0;
sql_xquery("ca", "select count(id) as c from dialog where xdata like 
'%maxchannels%$rU%' and timeout>unix_timestamp()", "ra");
$var(maxchannels)=$xavp(ra=>c);
sql_result_free("ra");

For outbound:
sql_xquery("ca", "select count(id) as c from dialog where xdata like 
'%maxchannels%$au%' and timeout>unix_timestamp()", "ra");
$var(maxchannels)=$xavp(ra=>c);
sql_result_free("ra");

Pasting the code here I see this isn't that secure since a user foo also
gets the number of calls for foobar counted against him! Off to put a "
before/after the username.
 

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


[SR-Users] Branching 5.3

2019-09-30 Thread Daniel-Constantin Mierla
Hello,

if there are no strong opinions against, then it is time to branch 5.3
on git repository. I am considering to do it by the end of the day on
Wednesday, October 2, 2019.

After that, the master will be again open for new features, while 5.3
branch will continue to get the only fixes and improvements to
documentation and tools. 2-3 weeks later we should release v5.3.0, the
first stable version in 5.3.x series.

Cheers,
Daniel

-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training, Oct 21-23, 2019, Berlin, Germany -- 
https://asipto.com/u/kat


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


[SR-Users] Call limit through shared database

2019-09-30 Thread Olli Attila
Hello,

I have 2 kam instances using one shared database and both kam servers
running the same routing logic code. Kamailio servers are configured to use
the same database as dialog backend.

I am limiting the concurrent dialogs in the following way but it seems that
kamailio is using its own memory to read profile size rather than the db.
Second kam is not aware of the dialog profiles that the first kam wrote to
the shared db. Is there a way to get multiple kam instances to read profile
size from the same database when calling the get_profile_size function?

modparam("dialog", "profiles_with_value", "concurrent_calls")
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "db_url", DBURL)
modparam("dialog", "db_mode", 1)


route[LIMIT_CALLS] {

if (!dlg_isflagset("1")) { # $td – gateways, $fu - user
if (get_profile_size("concurrent_calls", "$fu", "$avp(calls)")) {
if ($avp(calls) >= 3) {
xlog("L_INFO", "Concurrent calls $fu at limit");
send_reply("503", "Calls limit reached"); exit;
} else {
dlg_manage(); dlg_setflag("1");
set_dlg_profile("concurrent_calls", "$fu");
}
}
}
}

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