Re: [OpenSIPS-Devel] [opensips] Add listen interface (socket) checking to db based natping. (#127)

2014-11-04 Thread Bogdan Andrei IANCU
@wdoekes , what about a different approach on this matter - instead of keep filtering per IP each time we want to ping, what about using a server ID and each usrloc should be marked with such ID representing the server which did handle that register ? So, at the end, whatever number of

Re: [OpenSIPS-Devel] [opensips] Add listen interface (socket) checking to db based natping. (#127)

2014-11-04 Thread Walter Doekes
That would suit my needs indeed; and make more sense than the awkward query that we do now. Thinking out loud here: where do we get this ID from? Do we add a `server_id` integer parameter to `usrloc`? Or should we generate one automatically? If we use a parameter and default it to `1`, we get

Re: [OpenSIPS-Devel] [opensips] Add listen interface (socket) checking to db based natping. (#127)

2014-11-04 Thread Bogdan Andrei IANCU
@wdoekes , I'm seeing this from a larger perspective - we are working on the specs/description for a cluster module - to ensure registration and call exchange (in a transparent way) between several opensips instances. So, we will define a server ID for each opensips (an ID inside the cluster),

Re: [OpenSIPS-Devel] [opensips] Add listen interface (socket) checking to db based natping. (#127)

2014-05-22 Thread Walter Doekes
For the record. This should probably be improved to handle in-memory contacts as well, since this can now be binary-replicated (right?) 16:28 lirakis bogdan_vs, if there was a smart nat ping ... then i think you could do distributed usrloc out of the box with replication, path headers, and a

Re: [OpenSIPS-Devel] [opensips] Add listen interface (socket) checking to db based natping. (#127)

2014-05-01 Thread Walter Doekes
@@ -130,6 +131,18 @@ static int get_all_db_ucontacts(void *buf, int len, unsigned int flags, LM_DBG(buf: %p. flags: %d\n, buf, flags); + if (sockaddr_list_str.s) { + i = snprintf(query_socket, sizeof(query_socket), and socket in (%.*s), I can't find the spec

Re: [OpenSIPS-Devel] [opensips] Add listen interface (socket) checking to db based natping. (#127)

2014-04-30 Thread Răzvan Crainea
@@ -130,6 +131,18 @@ static int get_all_db_ucontacts(void *buf, int len, unsigned int flags, LM_DBG(buf: %p. flags: %d\n, buf, flags); + if (sockaddr_list_str.s) { + i = snprintf(query_socket, sizeof(query_socket), and socket in (%.*s), Is this IN operator