[OpenSIPS-Users] CPU 100% with TCP

2018-10-23 Thread Ben Newlin
Hi,

We have implemented TCP recently and are performing TCP<->UDP translation on 
one of our proxy types. This proxy only exists for that purpose; there are no 
DB queries, REST calls, or anything like that. It is designed to be very fast 
and high throughput.

Recently we have found that when the remote endpoint of a TCP connection is 
lost, i.e. the server goes down, while under moderate load OpenSIPS quickly 
reaches 100% CPU and becomes unresponsive. When this occurs, the “top” command 
shows that between 30-90% CPU is in System (kernel) space, and each OpenSIPS 
TCP process shows many times the normal CPU. We are running OpenSIPS 2.4.2 on 
Amazon Linux.

I obtained as much information as I could using ps, strace, and gdb here: 
https://pastebin.com/JP3DnCqs. We can reproduce the failure consistently by 
removing a server during call traffic.

A few things I noticed:

  *   The number of running threads reported by OpenSIPS doesn’t align with our 
configuration, copied here:

### Global Parameters #

children=32

#// Allow 503 to pass back to Control
disable_503_translation=yes

#// Even though we are not receiving HEP,
#// this listener is required by OpenSIPS
#// in order to use the proto_hep module. :/
listen=hep_tcp:10.32.40.245:9061 use_children 1

#// Configure the listeners
listen=udp:10.32.40.245:5060 as XXX.XXX.XXX.XXX
listen=tcp:10.32.40.245:5060 as XXX.XXX.XXX.XXX

#// Transaction Module
loadmodule "tm.so"
modparam("tm", "restart_fr_on_each_reply", 0)
modparam("tm", "timer_partitions", 8)
modparam("tm", "onreply_avp_mode", 1)
modparam("tm", "wt_timer", 10)


According to the documentation if “tcp_children” is not set then the value of 
“children” will be used [1], but we have set “children” to 32 and only have the 
default 8 TCP processes. Also we appear to only have 1 timer process, although 
we have set the number of timer partitions to 8.

  *   The server that is terminated was using TCP connections exclusively, but 
all of the CPU seems to be in the UDP threads. The one I looked at appeared to 
be handling a CANCEL to one of the calls that was active and was attempting to 
send it out via TCP. I’m not sure why it would be trying to relay the CANCEL as 
no 100 Trying had been received from the server. I have noticed that in 2.x 
OpenSIPS will now send CANCELs for transactions even when 100 Trying was not 
received. Is that intentional? RFC 3261 states that no CANCEL should be sent 
unless a provisional response has been received.

Any assistance with this would be appreciated.

[1] - http://www.opensips.org/Documentation/Script-CoreParameters-2-4#toc66


Ben Newlin
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Clusterer and Full Sharing USRLOC sync state/persistence

2018-10-23 Thread Jock McKechnie
Thank you Alexei and Liviu;

To close the loop, this must've been it. I was having issue with the
seed node sync'ing off the other nodes after it was cycled earlier,
but that must have been something else, because nominating a single
seed seems to have brought everything into a comfortably reliable
service.

Thank you again,

 - Jock
On Thu, Oct 18, 2018 at 4:04 AM Liviu Chircu  wrote:
>
> Hi all,
>
> Jock: just like Alexei said, I assume you don't have a "seed" node.
> Make sure one node of your opensips.clusterer table has "seed" in the
> "flags" column.  Regarding offline restart persistence: you may skip the
> "working_mode_preset" parameter and individually set "cluster_mode" [1]
> and "restart_persistency" [2] in order to achieve a restart-persistent
> cluster using an SQL DB, rather than point-to-point sync.
>
> Alexei: that is exactly how we meant it to be used.  With 0 nodes
> online, you have to bootstrap the cluster somehow -- this is the purpose
> of the "seed" node.
>
> Cheers,
>
> [1]:
> https://opensips.org/html/docs/modules/3.0.x/usrloc.html#param_cluster_mode
> [2]:
> https://opensips.org/html/docs/modules/3.0.x/usrloc.html#restart_persistency
>
> Liviu Chircu
> OpenSIPS Developer
> http://www.opensips-solutions.com
>
> On 18.10.2018 09:28, vasilevalex wrote:
> > Hi Jock.
> >
> > I also use full-sharing cluster with just two nodes. Everything in memory,
> > no DB.
> >
> > Do you have "seed" node? Because without it, as far as I tested, it is
> > impossible to get out from "not synced state". All nodes unsynced so no one
> > can be taken as trusted point.
> >
> > I made seed flag for one server. So the second server starts and trusts seed
> > node. If I restart seeding node, it starts clean (and this state is
> > considered trusted and synced for itself) then I have to run "opensipsctl
> > fifo ul_cluster_sync" on it to add all the data from cluster to it's clean
> > state. So it became synced and containing all data.
> >
> > May be this is not the best way, but I don't know, how also can be solved
> > this state.
> >
> >
> >
> > --
> > Sent from: 
> > http://opensips-open-sip-server.1449251.n2.nabble.com/OpenSIPS-Users-f1449235.html
> >
> > ___
> > Users mailing list
> > Users@lists.opensips.org
> > http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Load_balancer migrating from 2.1 to 2.4

2018-10-23 Thread Bogdan-Andrei Iancu

Hi Alain,

What are the resources you require via the lb_start() - the second 
parameter ?


Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/23/2018 06:28 PM, Alain Bieuzent wrote:


Hi all,

I’m trying to migrate from 2.1.5 to 2.4.2, i modify my script to use 
the new lb_start() function, but now i received a lot of CRITICAL and 
WARNING message in my logs.


Oct 23 14:29:13 ded-lb-out-slave opensips[3592]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request 
resource in dst


Oct 23 14:29:13 ded-lb-out-slave opensips[3592]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping 
destination 168  - unable to calculate free 
resources


Oct 23 14:29:13 ded-lb-out-slave opensips[3592]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request 
resource in dst


Oct 23 14:29:13 ded-lb-out-slave opensips[3592]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping 
destination 169  - unable to calculate free 
resources


in the past I had already tried to migrate from 2.1.5 to 2.3 with the 
same error message.


I do not use the module to limit the number of calls (the resources 
are set to 1), I’m using it only to load balance traffic between 
these 3 trunks. If a call is dropped, I don’t use lb_next to retry to 
another.


id,group_id,dst_uri,resources,probe_mode,description

172,1,sip:X.Y.Z.107:5060,WTF=1,2,"WTF Trunk 1"

173,1,sip:X.Y.Z.108:5060,WTF=1,2,"WTF Trunk 2"

174,1,sip:W.Y.Z.109:5060,WTF=1,2,"WTF Trunk 3"

Any idea to why i received this error message (which does not seem to 
have any impact on the calls)


Thanks

Alain



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Load_balancer migrating from 2.1 to 2.4

2018-10-23 Thread Alain Bieuzent
Hi all,

 

I’m trying to migrate from 2.1.5 to 2.4.2, i modify my script to use the new 
lb_start() function, but now i received a lot of CRITICAL and WARNING message 
in my logs.

 

Oct 23 14:29:13 ded-lb-out-slave opensips[3592]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Oct 23 14:29:13 ded-lb-out-slave opensips[3592]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 168 
 - unable to calculate free resources

Oct 23 14:29:13 ded-lb-out-slave opensips[3592]: 
CRITICAL:load_balancer:get_dst_load: bug - cannot find request resource in dst

Oct 23 14:29:13 ded-lb-out-slave opensips[3592]: 
WARNING:load_balancer:lb_route: initial call of LB - skipping destination 169 
 - unable to calculate free resources

 

in the past I had already tried to migrate from 2.1.5 to 2.3 with the same 
error message.

 

I do not use the module to limit the number of calls (the resources are set to 
1), I’m using it only to load balance traffic between these 3 trunks. If a 
call is dropped, I don’t use lb_next to retry to another.

 

id,group_id,dst_uri,resources,probe_mode,description

172,1,sip:X.Y.Z.107:5060,WTF=1,2,"WTF Trunk 1"

173,1,sip:X.Y.Z.108:5060,WTF=1,2,"WTF Trunk 2"

174,1,sip:W.Y.Z.109:5060,WTF=1,2,"WTF Trunk 3"

 

Any idea to why i received this error message (which does not seem to have any 
impact on the calls)

 

Thanks 

 

Alain

 

 

 

 

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Presence issue

2018-10-23 Thread Bogdan-Andrei Iancu

Hi Dan,

Ok, installing Blink and trying to see if I get the error.

Thanks for the input.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/19/2018 08:39 PM, Dan Pascu wrote:

On 17 Oct 2018, at 23:33, Bogdan-Andrei Iancu wrote:


Hi Dan,

What I failed so far was to reproduced it in a controlled environment. Do you 
have a setup, special cfg + SIP UAC , instructions to reproduce this issue ?

I use Blink as the client. I see this every time the proxy receives a PUBLISH 
request:

Oct 19 19:29:55 node15 ./opensips[23510]: [CONFIG] PUBLISH for presence 
sip:d...@test.sip2sip.info origin 86.120.12.1
64:41062 from sip:d...@test.sip2sip.info to sip:d...@test.sip2sip.info 
(243988a9-511e-4108-8950-5ab6edf82c3c)
Oct 19 19:29:55 node15 ./opensips[23510]: 
CRITICAL:db_mysql:wrapper_single_mysql_real_query: driver error (1062): Du
plicate entry 'dan-test.sip2sip.info-presence-a.1539700118.23510.517.1' for key 
'presentity_idx'
Oct 19 19:29:55 node15 ./opensips[23510]: ERROR:core:db_do_update: error while 
submitting query
Oct 19 19:29:55 node15 ./opensips[23510]: ERROR:presence:update_presentity: 
updating published info in database
Oct 19 19:29:55 node15 ./opensips[23510]: ERROR:presence:handle_publish: when 
updating presentity

or this:

Oct 19 19:29:55 node15 ./opensips[23508]: [CONFIG] PUBLISH for presence 
sip:d...@test.sip2sip.info origin 86.120.12.1
64:39673 from sip:d...@test.sip2sip.info to sip:d...@test.sip2sip.info 
(cc4704d0-a5e7-4c78-89ae-4c31b6cb6246)
Oct 19 19:29:55 node15 ./opensips[23508]: INFO:presence:update_presentity: *** 
found in db but not in htable [a.1539
700118.23508.2291.0]

Below is the relevant part of my configuration (I included all the presence 
related modules I load and their configuration as they may be relevant):

# The address on which OpenSIPS will listen
define(`SERVER_IP', esyscmd(`echo -n $(hostname -i)'))
define(`SERVER_UDP_PORT', `5060')
define(`SERVER_TCP_PORT', `5060')
define(`SERVER_TLS_PORT', `5061')

# The server contact address
define(`SERVER_ADDRESS', `ifelse(SERVER_UDP_PORT, `5060', `SERVER_IP', 
`SERVER_IP:SERVER_UDP_PORT')')
# Contact used by the presence server
define(`PRESENCE_SERVER_ADDRESS', `sip:presence@SERVER_ADDRESS')
# Contact used by the resource list server
define(`RLS_SERVER_ADDRESS', `sip:rls@SERVER_ADDRESS')


loadmodule "presence.so"
loadmodule "xcap.so"
loadmodule "presence_xml.so"
loadmodule "presence_mwi.so"
loadmodule "pua.so"
loadmodule "pua_mi.so"
loadmodule "rls.so"
loadmodule "presence_xcapdiff.so"


modparam("presence", "db_url", "MySQL_URI")
modparam("presence", "server_address", "PRESENCE_SERVER_ADDRESS")
modparam("presence", "fallback2db", 1)
modparam("presence", "clean_period", 30)
modparam("presence", "notify_offline_body", 0)

modparam("presence_xml", "pres_rules_auid", "org.openmobilealliance.pres-rules")
modparam("presence_xml", "force_active", 0)
modparam("presence_xml", "pidf_manipulation", 1)
modparam("presence_xml", "generate_offline_body", 0)

modparam("pua", "db_url", "MySQL_URI")

modparam("xcap", "db_url", "MySQL_URI")
modparam("xcap", "integrated_xcap_server", 1)

modparam("rls", "server_address", "RLS_SERVER_ADDRESS")
modparam("rls", "to_presence_code", 5)
modparam("rls", "waitn_time", 10)

route {
 if ($rm == "PUBLISH") {
 if (is_from_local()) {
 if (!proxy_authorize("", "SUBSCRIBER_TABLE")) {
 proxy_challenge("", "0");
 return;
 } else if ($au != $fU) {
 sl_send_reply("403", "Username!=From not allowed ($au!=$fU)");
 return;
 }

 if ($rd == "") {
 $rd = $fd;
 }

 if (avp_check("$hdr(Event)", "fm/presence*/i") && ($au != $rU || 
$ar != $rd)) {
 sl_send_reply("403", "Publishing $hdr(Event) events for others is 
forbidden");
 return;
 }

 # Hide auth credentials to downstream routers
 consume_credentials();
 } else {
 sl_send_reply("403", "PUBLISH forbidden for outside domains");
 return;
 }

 if (t_newtran()) {
 handle_publish();
 } else {
 sl_reply_error();
 }
 exit;
 }
}


--
Dan







___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Callpickup using EBR

2018-10-23 Thread Bogdan-Andrei Iancu

Hi Srigo,

I checked the output, but I see no messages/logs from the event_routing 
module. Maybe I got it wrong :( ?


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/22/2018 03:31 PM, Srigo Kanapathipillai wrote:

Hi Bogdan,

Any updates regarding this issue?

Thanks
Srigo Kana
On 8 Oct 2018, at 16:58, KSrigo > wrote:


Hi Bogdan,

- Yes calls to fs and Bob, fs and Charlie are 2 differents calls
(different from-tag/call-id).
- Yes EBR is done on each fs leg.

Yes for some reason when David takes the call, Opensips send an
Invite to David and Cancel one of fs leg (which is the normal
behavior) but then it send again an invite to David and Cancel it.
here is debug log: https://pastebin.com/48xqKi3Y


Thanks in advance
Srigo


On Oct 5, 2018, at 6:08 PM, Bogdan-Andrei Iancu <
bog...@opensips.org > wrote:

Hi Srigo,

So, the calls between FS and Bob/Charlie are 2 different SIP
calls, right ? and you do EBR on each of them (on the OpenSIPS
with usrloc, rigth ?

As I understand from your description, the faulty step is the
last one when David takes a CANCEL too, right ? Do you have pcaps
+ debug logs for this scenario ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/05/2018 12:40 PM, KSrigo wrote:

Hi,

I'm currently trying to add call pickup feature using
event_routing module. It seems to work fine when I have only ONE
inbound call to a given call group but when I have two calls to
the same call group at the same, It's not working properly

Here is my scenario:

--> Opensips1 (usr_loc) --> Bob
Alice --> Opensips1 --> Freeswitch (fork)
--> Opensips1 (usr_loc) --> Charlie

David tries to pickup the phone ringing on Bob and Call (which
is the same call because it's a fork but different A leg call_id)
Bob, Charlie and David are in the same pickup group.

When Bob and Charlies ring, David dials *0 to pick the call:
* Opensips immediately send an Invite to David for one of the
incoming call (randomly choosen). Let's say for Bob
* Opensips send a Cancel to Bob
* Opensips send again the previous Invite to David (for the same
A leg)
* Opensips send a Cancel to David


Here is my opensips code:

dp_translate("DP_FEATURE", "$rU/$rU", "$var(attrs)");
#Is it a callpickup?
if($var(attrs) =~ "call_pickup" && $avp(caller_pickup_grp)
!= "") {
t_newtran(); # 100 Trying is fired here
send_reply("480","Gone");

#extension can belong to multiple group so let's raise
an event for each group
$var(p) = 0;
$var(caller_pickup_grp_len) = 0;
$var(caller_pickup_grp_len) =
$(avp(caller_pickup_grp){csv.count});
while ($var(p) < $var(caller_pickup_grp_len)) {
$avp(attr-name) = "group";
$avp(attr-val) =
$(avp(caller_pickup_grp){csv.value,$var(p)});
xlog("L_NOTICE","$rm $ci hunting2: Caller pickup
group [$avp(attr-val)] for [$fu]");
$avp(attr-name) = "picker";
$avp(attr-val) = $fu;
raise_event("E_CALL_PICKUP", $avp(attr-name),
$avp(attr-val));
$var(p) = $var(p) + 1;
}
exit;
}


if (isbflagset(USRLOC_FOUND) && $avp(callee_pickup_grp) != ""){
t_newtran();
$var(p) = 0;
$var(callee_pickup_grp_len) = 0;
$var(callee_pickup_grp_len) =
$(avp(callee_pickup_grp){csv.count});
while ($var(p) < $var(callee_pickup_grp_len)) {
#$avp(filter) = "group=1";
$var(group)=$(avp(callee_pickup_grp){csv.value,$var(p)});

$avp(filter) = "group="+$var(group);
xlog("L_NOTICE","$rm $ci relay: Callee pickup group
[$var(group)]. Raise event");
notify_on_event("E_CALL_PICKUP","$avp(filter)","handle_pickup",
"20");
$var(p) = $var(p) + 1;
}
}

if (!t_relay()) {
xlog("L_WARN","$rm $ci relay: 500 Internal Server Error
(t_relay failure)");
t_reply("500","Internal Server Error");
$avp(reason) = "SIP;cause=500;text=INTERNAL SERVER ERROR";
route(REASON);
}
exit;


Any idea, what I missed here?

Thanks in advance for your help
Srigo




___
Users mailing list
Users@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users






Re: [OpenSIPS-Users] accounting flags

2018-10-23 Thread Bogdan-Andrei Iancu

Hi Dan,

A wild guess - were you using the same flag for both missed and failed 
calls ?


Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/16/2018 05:20 PM, Dan Pascu wrote:

On 16 Oct 2018, at 16:55, Bogdan-Andrei Iancu wrote:


BTW, the missed and failed concepts were also in 1.11, with the same behavior 
as in 2.4

It seems I missed the failed flag when I skimmed the 1.11 docs to see the 
difference.

However I checked my old configurations and the behavior is not the same 
between 1.11 and 2.4. In 1.11 I used to set the accounting flag, the failed 
flag and the missed flag at the same time, but I would only get 1 negative 
reply being logged if the call failed. In 2.4 I get it twice (once from missed 
and once from failed) unless is a call with an intermediary failure (like 1 
branch says 486 busy and the other says 200 ok) in which case I get it once 
(from missed) and  also get the 200 ok.

BTW, some failure codes are skipped even when missed is defined, like for 
example 482 loop detected. are they handled differently?


http://www.opensips.org/html/docs/modules/1.11.x/acc.html#idp5565104

http://www.opensips.org/html/docs/modules/1.11.x/acc.html#idp5590880

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/16/2018 04:30 PM, Bogdan-Andrei Iancu wrote:

http://www.opensips.org/Documentation/Tutorials-Advanced-Accounting

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/16/2018 03:01 PM, Dan Pascu wrote:

What is the difference between the missed and failed flags for do_accounting? They 
seem to overlap entirely for me (if I use both missed and failed flags I get any 
code >= 300 reported twice).

In version 1.11 there was only the missed flag that reported all response codes 
>= 300, but now we have 2 and the documentation is not clear on their 
difference.

--
Dan





___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Dan







___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] how can we replace kamailio hash-table in opensips ?

2018-10-23 Thread Bogdan-Andrei Iancu
Actually a most appropriate replacement (DB independent) is the cacheDB 
support with the localcache backend:


loadmodule "cachedb_local.so"
modparam("cachedb_local", "cache_collections", 
"my_collection=8;your_collection=16")

modparam("cachedb_local", "cachedb_url", "local:my_hash:///my_collection")

And use any of the cache_xxx related functions ( 
http://www.opensips.org/Documentation/Script-CoreFunctions-2-4#toc4 ) as:


cache_xx("local:my_hash", .. );

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/23/2018 03:29 PM, Nick Altmann wrote:
It's https://opensips.org/html/docs/modules/2.4.x/sql_cacher.html in 
opensips.


Hello opensips users,

I want to migrate to opensips from kamailio. In kamailio, i am
using htable module, so how can we replace it in opensips ??

Thanks
*Diptesh Patel*
Jr. Software Developer
Ecosmob Technologies Ltd
Ahmedabad
Mo:*+919898962659*
___
Users mailing list
Users@lists.opensips.org 
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Clusterer and failover

2018-10-23 Thread Răzvan Crainea

Hi, Igor!

You are right, the transactions are only persistent on a single server - 
if that server dies, you will loose the transaction. So you cannot 
ensure transaction failover.
However, you can still use the clusterer module to do dialog failover, 
since dialog is replicated across all nodes in the cluster. Hence if one 
goes down, you will have the data on all other nodes, and if a 
sequential message reaches any of those servers, they will be able to 
route it properly to the endpoint.

Hope this helps.

Best regards,
Răzvan

On 10/16/18 5:32 PM, Igor Olhovskiy wrote:

Hi!

Wanted to clarify one topic from clusterer module
According to article 
https://blog.opensips.org/2018/03/21/full-anycast-support-in-opensips-2-4/

I’ve got, that transactions are really persist only on one server.
So, if packet for some reason comes to other server, lookup on other 
nodes would be preformed.
But if node, that holds info especially for current transaction(or 
dialog)  will die in a middle of process?

Question is, can I use clusterer module for failover as well?

(Best scenario also would not involve any SQL database for persistent 
storage, maybe only redis)


Thanks!

Regards, Igor

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users



--
Răzvan Crainea
OpenSIPS Core Developer
  http://www.opensips-solutions.com

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Handling decline in branches

2018-10-23 Thread Bogdan-Andrei Iancu

Hello Wilhelm,

The normal behavior is to have the remaining branches still on ringing 
(after one branch gets a decline) - what is the reply code used by the 
branch to decline ? is it a 6XX reply by chance ?


Best regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
  http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/19/2018 04:39 PM, Wilhelm Lundgren wrote:

Hi,

Im running opensips:
version: opensips 2.2.1 (x86_64/linux)
flags: STATS: On, DISABLE_NAGLE, USE_MCAST, SHM_MMAP, PKG_MALLOC, 
F_MALLOC, FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, 
MAX_URI_SIZE 1024, BUF_SIZE 65535

poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
git revision: 68ace2e
main.c compiled on 17:27:11 Nov  8 2017 with gcc 4.7

and i have some issues. When calling a number, i am branching to a set 
of predefined numbers so the invite gets sent to them all. When 
someone picks up, the call is connected and the branches that did not 
pick upp will get the cancel message and stop ringing, and this works 
just fine. However, this also applies to a deny, a hangup. So if 
anyone of the predefined numbers just press hangup directly, a decline 
is sent and then this call will stop for all numbers. I would like to 
be able to have one user send decline and keep it ringing on the other 
users.


Ex:
Number A calls number B, which is also branched to number C. Number C 
just hangs up directly. Now i want the call to continue for number B, 
until it hangs up or answers, and nothing should be sent to number A 
until B has responded. And after that number A should get notified of 
the action.


Any ideas?

Thanks
Wilhelm


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] how can we replace kamailio hash-table in opensips ?

2018-10-23 Thread Nick Altmann
It's https://opensips.org/html/docs/modules/2.4.x/sql_cacher.html in
opensips.

Hello opensips users,
>
> I want to migrate to opensips from kamailio. In kamailio, i am using
> htable module, so how can we replace it in opensips ??
>
> Thanks
>
> *Diptesh Patel*
> Jr. Software Developer
> Ecosmob Technologies Ltd
> Ahmedabad
> Mo:*+919898962659*
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] how can we replace kamailio hash-table in opensips ?

2018-10-23 Thread Dipteshkumar Patel
Hello opensips users,

I want to migrate to opensips from kamailio. In kamailio, i am using htable
module, so how can we replace it in opensips ??

Thanks

*Diptesh Patel*
Jr. Software Developer
Ecosmob Technologies Ltd
Ahmedabad
Mo:*+919898962659*
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Location table update instead of insert

2018-10-23 Thread Schneur Rosenberg
Hi, the last few days my location table displays only a fraction of
the registered users, I did some digging and I enabled query logging
on MySQL and I can see that OpenSIPS is doing updates instead of
inserts, and being that a update on a WHERE that does not

My system is a cluster of 2 OpenSIPS servers version 2.4.1 running
"full-sharing" "cluster_mode", "restart_persistency" is set to
"load-from-sql", "sql_write_mode" is set to "write-back" and
"skip_replicated_db_ops" is set to "1" as of now its a active/passive
setup, when a server comes up it loads what its got in DB and then
after approx 3 minutes after all users have registered to the other
server the server will be syced.

I tried bringing down one server at a time and the problem persists, I
suspect that when it comes up and it gets synced over binary it
assumes those users are in the DB and when the server becomes ACTIVE
it runs a update instead of a insert, I assume that if I would bring
down the entire cluster and delete the rows in the location table and
bring it back up it will operate properly but I would really love to
avoid that, is there another way?

being that "contact_id"  is a PRIMARY KEY, is there a reason OpenSIPS
is not using  a INSERT with "ON DUPLICATE KEY"? or perhaps OpenSIPS
can run a INSERT if no rows were updated? and how can I avoid this in
the future?

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users