Re: [SR-Users] Cockroachdb and kamailio 5.4

2021-03-01 Thread Daniel-Constantin Mierla
ockroachDB specific migration files.  For the
>  km_res.c change, this is where things are probably not ideal.  I’m
> hoping that Henning and/or Daniel can respond.  Essentially,
> CockroachDB stores all character/string datatypes the same way, and
> then presents this as a TEXTOID datatype.  I think the problem with
> moving this to the DB1_STRING type is that we *could* have memory
> overruns?  That’s just my guess.  Maybe it’s completely safe?
>
>  
>
> Thanks!
>
>  
>
> ~Noah
>
>
>
> On Feb 26, 2021, at 5:15 AM, Jonathan Hunter
> mailto:hunter...@hotmail.com>> wrote:
>
>  
>
> Hi Noah,
>
>  
>
> Hope you are well? 
>
>  
>
> Realistically do you think you will be able to spend some time on
> this or do you think I need to look at other options in the short
> term?
>
>  
>
> I guess the primary requirements for me are being able to use
> these modules which require database interaction (mainly
> Permissions,userloc,dispatcher).
>
>  
>
> I have started to work through it but I am pondering if in the
> short term I need to focus on a support database and look to
> migrate when available.
>
>  
>
> Thanks!
>
>  
>
> Jon
>
>  
>
>  
>
>  
>
> Sent from Mail
> 
> <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986=04%7C01%7C%7C50369d445ce04ed280d608d8da614417%7C84df9e7fe9f640afb435%7C1%7C0%7C637499458574121672%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=7KtoBKFV2TYoeRZzQegxwRd%2Fevy4eKoJ4OESn8HevU4%3D=0>
>  for
> Windows 10
>
>  
>
> *From: *Jonathan Hunter <mailto:hunter...@hotmail.com>
> *Sent: *22 February 2021 11:20
> *To: *Henning Westerholt <mailto:h...@skalatan.de>; Noah Mehl
> <mailto:noahm...@gmail.com>
> *Cc: *Kamailio (SER) - Users Mailing List
> <mailto:sr-users@lists.kamailio.org>
> *Subject: *Re: [SR-Users] Cockroachdb and kamailio 5.4
>
>  
>
> Hi Noah and Henning,
>
>  
>
> Thank you for your responses, I am currently digesting them!
>
>  
>
> If I can be of any help testing/working on this please let me know
> as Im very keen to implement it so will review and also happy to
> take direction as I will be testing this week on it.
>
>  
>
> Thanks again
>
>  
>
> Jon
>
>  
>
> Sent from Mail
> 
> <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986=04%7C01%7C%7C50369d445ce04ed280d608d8da614417%7C84df9e7fe9f640afb435%7C1%7C0%7C637499458574121672%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=7KtoBKFV2TYoeRZzQegxwRd%2Fevy4eKoJ4OESn8HevU4%3D=0>
>  for
> Windows 10
>
>  
>
> *From: *Henning Westerholt <mailto:h...@skalatan.de>
> *Sent: *22 February 2021 07:44
> *To: *Noah Mehl <mailto:noahm...@gmail.com>; Jonathan Hunter
> <mailto:hunter...@hotmail.com>
> *Cc: *Kamailio (SER) - Users Mailing List
> <mailto:sr-users@lists.kamailio.org>
> *Subject: *RE: Cockroachdb and kamailio 5.4
>
>  
>
> Hi Noah,
>
>  
>
> sure – let me give you some pointers. So basically, the SQL files
> are generated from the XSL infrastructure in the quoted directory.
> This file e.g. is for postgres:
>
> 
> https://github.com/kamailio/kamailio/blob/5.4/doc/stylesheets/dbschema/xsl/postgres.xsl
> 
> <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamailio%2Fblob%2F5.4%2Fdoc%2Fstylesheets%2Fdbschema%2Fxsl%2Fpostgres.xsl=04%7C01%7C%7C50369d445ce04ed280d608d8da614417%7C84df9e7fe9f640afb435%7C1%7C0%7C637499458574131660%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=y2muH6O94jI47TjjIFm9M6pzRchGO6oiq1YBo%2BD8pv8%3D=0>
>
>  
>
> You basically need to copy it to a new file and adapt the types in
> it to the cockroachdb types. If you execute “make dbschema” in the
> kamailio source tree, it will generate all the SQL files. Then you
> could generate the appropriate SQL files also for your database
> and it will stay in sync after future changes. There might be also
> a small extension necessary in the Makefile, but we can have a
> look to this later on.
>
>  
>
> About the questi

Re: [SR-Users] Cockroachdb and kamailio 5.4

2021-03-01 Thread Jonathan Hunter
gxwRd%2Fevy4eKoJ4OESn8HevU4%3D=0>
 for Windows 10

From: Jonathan Hunter<mailto:hunter...@hotmail.com>
Sent: 22 February 2021 11:20
To: Henning Westerholt<mailto:h...@skalatan.de>; Noah 
Mehl<mailto:noahm...@gmail.com>
Cc: Kamailio (SER) - Users Mailing List<mailto:sr-users@lists.kamailio.org>
Subject: Re: [SR-Users] Cockroachdb and kamailio 5.4

Hi Noah and Henning,

Thank you for your responses, I am currently digesting them!

If I can be of any help testing/working on this please let me know as Im very 
keen to implement it so will review and also happy to take direction as I will 
be testing this week on it.

Thanks again

Jon

Sent from 
Mail<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986=04%7C01%7C%7C50369d445ce04ed280d608d8da614417%7C84df9e7fe9f640afb435%7C1%7C0%7C637499458574121672%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=7KtoBKFV2TYoeRZzQegxwRd%2Fevy4eKoJ4OESn8HevU4%3D=0>
 for Windows 10

From: Henning Westerholt<mailto:h...@skalatan.de>
Sent: 22 February 2021 07:44
To: Noah Mehl<mailto:noahm...@gmail.com>; Jonathan 
Hunter<mailto:hunter...@hotmail.com>
Cc: Kamailio (SER) - Users Mailing List<mailto:sr-users@lists.kamailio.org>
Subject: RE: Cockroachdb and kamailio 5.4

Hi Noah,

sure – let me give you some pointers. So basically, the SQL files are generated 
from the XSL infrastructure in the quoted directory. This file e.g. is for 
postgres:
https://github.com/kamailio/kamailio/blob/5.4/doc/stylesheets/dbschema/xsl/postgres.xsl<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamailio%2Fblob%2F5.4%2Fdoc%2Fstylesheets%2Fdbschema%2Fxsl%2Fpostgres.xsl=04%7C01%7C%7C50369d445ce04ed280d608d8da614417%7C84df9e7fe9f640afb435%7C1%7C0%7C637499458574131660%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=y2muH6O94jI47TjjIFm9M6pzRchGO6oiq1YBo%2BD8pv8%3D=0>

You basically need to copy it to a new file and adapt the types in it to the 
cockroachdb types. If you execute “make dbschema” in the kamailio source tree, 
it will generate all the SQL files. Then you could generate the appropriate SQL 
files also for your database and it will stay in sync after future changes. 
There might be also a small extension necessary in the Makefile, but we can 
have a look to this later on.

About the questions why the SQL files are then also checked in after creation – 
because otherwise everybody needs to install the xstl dependencies just for 
installing Kamailio.

About the rand()/random() topic – I did not find anything in the LCR module as 
well. It might be obsolete. I would consider dropping this, maybe after asking 
on the sr-dev list for this again.

Cheers,

Henning

--
Henning Westerholt – 
https://skalatan.de/blog/<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fskalatan.de%2Fblog%2F=04%7C01%7C%7C50369d445ce04ed280d608d8da614417%7C84df9e7fe9f640afb435%7C1%7C0%7C637499458574131660%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=ukJaXXYyg8bKjIdbAkbVGb60iI5HwlSfa7X7Nx7pvYI%3D=0>
Kamailio services – 
https://gilawa.com<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgilawa.com%2F=04%7C01%7C%7C50369d445ce04ed280d608d8da614417%7C84df9e7fe9f640afb435%7C1%7C0%7C637499458574141653%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=vfm8oizLUW7eFUVDSMiq8jrQP2kOI9hDroRbWgiPazI%3D=0>

From: Noah Mehl mailto:noahm...@gmail.com>>
Sent: Sunday, February 21, 2021 8:47 PM
To: Jonathan Hunter mailto:hunter...@hotmail.com>>
Cc: Henning Westerholt mailto:h...@skalatan.de>>; Kamailio 
(SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: Re: Cockroachdb and kamailio 5.4

Jon,

I’m not sure what would get my branch accepted.  Henning mentioned on 9/16/2020 
that the .sql files are generated from XML/XLST scripts, I have found: 
https://github.com/kamailio/kamailio/tree/5.4/doc/stylesheets/dbschema<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamailio%2Ftree%2F5.4%2Fdoc%2Fstylesheets%2Fdbschema=04%7C01%7C%7C50369d445ce04ed280d608d8da614417%7C84df9e7fe9f640afb435%7C1%7C0%7C637499458574151647%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=H%2Fq%2BAZuqIhA1KjV0EjurWTjkgmOKboZ25Q0sUhf9XAU%3D=0>
 which was updated just 3 days ago.  However, I don’t understand how this is 
used to generate the .sql files for Postgres. I’m also confused as to why the 
.sql files are checked into the repository if they’re generated?  Henning, can 
you point me in the right direction?

That being said, this is what’s changed in the 
branch&

Re: [SR-Users] Cockroachdb and kamailio 5.4

2021-02-26 Thread Noah Mehl
Jon,

Realistically, this is alpha functionality, at best.  If you, and/or your 
organization, do not have the expertise, resources, and/or risk tolerance for 
this, I couldn’t in good faith recommend that you do it.

There are many other clustering technologies for MySQL and PostgreSQL that are 
mature, and *should* be compatible with the existing implementation.  Perhaps 
someone on the list can let us know if they’re using one of the following:

- MySQL Galera
- PostgreSQL replication (either using Pacemaker/Corosync or Zookeeper to 
provide automated failover and/or Master/Master)
- Vitess: https://github.com/vitessio/vitess 
<https://github.com/vitessio/vitess>
- Some other solution not listed here?

That being said, I’ve spend as much time on this as I can.  I solved the 
permissions module issue in this way:

diff --git a/utils/kamctl/postgres/permissions-create.sql 
b/utils/kamctl/postgres/permissions-create.sql
index f397ca22f4..66de10ddcb 100644
--- a/utils/kamctl/postgres/permissions-create.sql
+++ b/utils/kamctl/postgres/permissions-create.sql
@@ -20,10 +20,10 @@ CREATE SEQUENCE address_id_seq;
 
 CREATE TABLE address (
 id integer PRIMARY KEY NOT NULL DEFAULT nextval('address_id_seq'),
-grp INTEGER DEFAULT 1 NOT NULL,
+grp INT4 DEFAULT 1 NOT NULL,
 ip_addr VARCHAR(50) NOT NULL,
-mask INTEGER DEFAULT 32 NOT NULL,
-port SMALLINT DEFAULT 0 NOT NULL,
+mask INT4 DEFAULT 32 NOT NULL,
+port INT2 DEFAULT 0 NOT NULL,
 tag VARCHAR(64)
 );

diff --git a/src/modules/db_postgres/km_res.c b/src/modules/db_postgres/km_res.c
index 13ac138c1a..f4813cafcc 100644
--- a/src/modules/db_postgres/km_res.c
+++ b/src/modules/db_postgres/km_res.c
@@ -151,11 +151,11 @@ int db_postgres_get_columns(const db1_con_t *_h, 
db1_res_t *_r)
case VARCHAROID:
case NAMEOID:
case BPCHAROID:
+   case TEXTOID:
LM_DBG("use DB1_STRING result type\n");
RES_TYPES(_r)[col] = DB1_STRING;
break;
 
-   case TEXTOID:
case BYTEAOID:
LM_DBG("use DB1_BLOB result type\n");
RES_TYPES(_r)[col] = DB1_BLOB;
 
For the schema update, it becomes CockroachDB specific, hence the need to start 
creating CockroachDB specific migration files.  For the  km_res.c change, this 
is where things are probably not ideal.  I’m hoping that Henning and/or Daniel 
can respond.  Essentially, CockroachDB stores all character/string datatypes 
the same way, and then presents this as a TEXTOID datatype.  I think the 
problem with moving this to the DB1_STRING type is that we *could* have memory 
overruns?  That’s just my guess.  Maybe it’s completely safe?

Thanks!

~Noah

> On Feb 26, 2021, at 5:15 AM, Jonathan Hunter  wrote:
> 
> Hi Noah,
>  
> Hope you are well? 
>  
> Realistically do you think you will be able to spend some time on this or do 
> you think I need to look at other options in the short term?
>  
> I guess the primary requirements for me are being able to use these modules 
> which require database interaction (mainly Permissions,userloc,dispatcher).
>  
> I have started to work through it but I am pondering if in the short term I 
> need to focus on a support database and look to migrate when available.
>  
> Thanks!
>  
> Jon
>  
>  
>  
> Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
>  
> From: Jonathan Hunter <mailto:hunter...@hotmail.com>
> Sent: 22 February 2021 11:20
> To: Henning Westerholt <mailto:h...@skalatan.de>; Noah Mehl 
> <mailto:noahm...@gmail.com>
> Cc: Kamailio (SER) - Users Mailing List <mailto:sr-users@lists.kamailio.org>
> Subject: Re: [SR-Users] Cockroachdb and kamailio 5.4
>  
> Hi Noah and Henning,
>  
> Thank you for your responses, I am currently digesting them!
>  
> If I can be of any help testing/working on this please let me know as Im very 
> keen to implement it so will review and also happy to take direction as I 
> will be testing this week on it.
>  
> Thanks again
>  
> Jon
>  
> Sent from Mail 
> <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986=04%7C01%7C%7Cfd34312b504a4723068008d8d723ebe4%7C84df9e7fe9f640afb435%7C1%7C0%7C637495896580748983%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=wfJ2SNI115vi8gpeFb1bs%2BYTLSGCc6BMCZjG9AzMXNk%3D=0>
>  for Windows 10
>  
> From: Henning Westerholt <mailto:h...@skalatan.de>
> Sent: 22 February 2021 07:44
> To: Noah Mehl <mailto:noahm...@gmail.com>; Jonathan Hunter 
> &

Re: [SR-Users] Cockroachdb and kamailio 5.4

2021-02-26 Thread Jonathan Hunter
Hi Noah,

Hope you are well?

Realistically do you think you will be able to spend some time on this or do 
you think I need to look at other options in the short term?

I guess the primary requirements for me are being able to use these modules 
which require database interaction (mainly Permissions,userloc,dispatcher).

I have started to work through it but I am pondering if in the short term I 
need to focus on a support database and look to migrate when available.

Thanks!

Jon



Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

From: Jonathan Hunter<mailto:hunter...@hotmail.com>
Sent: 22 February 2021 11:20
To: Henning Westerholt<mailto:h...@skalatan.de>; Noah 
Mehl<mailto:noahm...@gmail.com>
Cc: Kamailio (SER) - Users Mailing List<mailto:sr-users@lists.kamailio.org>
Subject: Re: [SR-Users] Cockroachdb and kamailio 5.4

Hi Noah and Henning,

Thank you for your responses, I am currently digesting them!

If I can be of any help testing/working on this please let me know as Im very 
keen to implement it so will review and also happy to take direction as I will 
be testing this week on it.

Thanks again

Jon

Sent from 
Mail<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986=04%7C01%7C%7Cfd34312b504a4723068008d8d723ebe4%7C84df9e7fe9f640afb435%7C1%7C0%7C637495896580748983%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=wfJ2SNI115vi8gpeFb1bs%2BYTLSGCc6BMCZjG9AzMXNk%3D=0>
 for Windows 10

From: Henning Westerholt<mailto:h...@skalatan.de>
Sent: 22 February 2021 07:44
To: Noah Mehl<mailto:noahm...@gmail.com>; Jonathan 
Hunter<mailto:hunter...@hotmail.com>
Cc: Kamailio (SER) - Users Mailing List<mailto:sr-users@lists.kamailio.org>
Subject: RE: Cockroachdb and kamailio 5.4

Hi Noah,

sure – let me give you some pointers. So basically, the SQL files are generated 
from the XSL infrastructure in the quoted directory. This file e.g. is for 
postgres:
https://github.com/kamailio/kamailio/blob/5.4/doc/stylesheets/dbschema/xsl/postgres.xsl<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamailio%2Fblob%2F5.4%2Fdoc%2Fstylesheets%2Fdbschema%2Fxsl%2Fpostgres.xsl=04%7C01%7C%7Cfd34312b504a4723068008d8d723ebe4%7C84df9e7fe9f640afb435%7C1%7C0%7C637495896580748983%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=133XFlkVh6RSwjeJJR9rNgxJda%2BHp6kwwCiqjxEBrCc%3D=0>

You basically need to copy it to a new file and adapt the types in it to the 
cockroachdb types. If you execute “make dbschema” in the kamailio source tree, 
it will generate all the SQL files. Then you could generate the appropriate SQL 
files also for your database and it will stay in sync after future changes. 
There might be also a small extension necessary in the Makefile, but we can 
have a look to this later on.

About the questions why the SQL files are then also checked in after creation – 
because otherwise everybody needs to install the xstl dependencies just for 
installing Kamailio.

About the rand()/random() topic – I did not find anything in the LCR module as 
well. It might be obsolete. I would consider dropping this, maybe after asking 
on the sr-dev list for this again.

Cheers,

Henning

--
Henning Westerholt – 
https://skalatan.de/blog/<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fskalatan.de%2Fblog%2F=04%7C01%7C%7Cfd34312b504a4723068008d8d723ebe4%7C84df9e7fe9f640afb435%7C1%7C0%7C637495896580758973%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=WyJLH7SRrx2P0DQ8qBV6qof%2FByJvrQ%2B1q%2FKCqlkANXc%3D=0>
Kamailio services – 
https://gilawa.com<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgilawa.com%2F=04%7C01%7C%7Cfd34312b504a4723068008d8d723ebe4%7C84df9e7fe9f640afb435%7C1%7C0%7C637495896580768968%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=ecql4Cf5n%2B%2Fw6sVxJHMphXwNT82g3NwXzH8D%2FNvbSBk%3D=0>

From: Noah Mehl 
Sent: Sunday, February 21, 2021 8:47 PM
To: Jonathan Hunter 
Cc: Henning Westerholt ; Kamailio (SER) - Users Mailing List 

Subject: Re: Cockroachdb and kamailio 5.4

Jon,

I’m not sure what would get my branch accepted.  Henning mentioned on 9/16/2020 
that the .sql files are generated from XML/XLST scripts, I have found: 
https://github.com/kamailio/kamailio/tree/5.4/doc/stylesheets/dbschema<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fkamailio%2Fkamailio%2Ftree%2F5.4%2Fdoc%2Fstylesheets%2Fdbschema=04%7C01%7C%7Cfd34312b504a4723068008d8d723ebe4%7C84df9e7fe9f640afb435%7C1%7C0%7C637495896580768968%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C100

Re: [SR-Users] Cockroachdb and kamailio 5.4

2021-02-22 Thread Jonathan Hunter
to note:

- concat() is native to CockroachDB, so the CREATE FUNCTION is only necessary 
for Postgres
- rand() is the native function name in MySQL, but random() is the function 
name in Postgres and CockroachDB.  This is where I’m most concerned because the 
file says it’s used in the lcr module, but I cannot find where it is used.  
Does anyone know how to ascertain this?  Anyways, they’re the same function, so 
it’s a little silly to require a CREATE FUNCTION duplicating the exact 
functionality of an existing native function.

The rest of the changes have to do with modifying the create statements to not 
use SERIAL, but use the more verbose SEQUENCE + nextval().  It’s identical in 
practice, so there’s 0 risk there.

I think overall risk is low for the branch, as the branch only changes the 
utility that creates the DBs.  As for production use, it’s worked great for us, 
there have been no issues.

~Noah

On Feb 18, 2021, at 2:45 PM, Jonathan Hunter 
mailto:hunter...@hotmail.com>> wrote:

Hi Noah,

Hope you are well?

I work as a consultant for a company in the UK, and I am building a new hosted 
telephony platform for them in docker initially, and as we are deploying across 
multiple servers they want to use cockroachdb to allow easy management of a 
cluster environment.

I could see from your posts you got it working using your own branch, and I 
wondered what changes you made to make things work correctly and what would be 
needed to get the kamailio dev’s to accept it into the main stream of code? 
(Happy to help here where I can).

Unless you will maintain your branch forever  Or are the changes small so its 
not too much of a concern? I just want to assess the risk really, and like you 
I think mainly we will just be using userloc and dispatcher for DB interaction 
so its positive to hear they work fine.  We would also be using rtpengine, 
routing data will be done via API so that should be fine. FYI Id like to run 
kamailio 5.4 initially.

I see your comments about table creation (in previous posts), that is the 
initial problem I am seeing when trying to use postgres based commands direct 
from a pgdump to create the kamailio database structure, does your branch 
contain all the creation scripts for the db/tables that I can use for testing?

Thanks again in advance  for the response!

Jon

Sent from 
Mail<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986=04%7C01%7C%7C766ebba71e894eb9d01708d8d705af48%7C84df9e7fe9f640afb435%7C1%7C0%7C637495766710524147%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=jUVozETy0CpZrFolqPEhaJ4alEt50Ced3wHIYm9mGoI%3D=0>
 for Windows 10

From: Henning Westerholt<mailto:h...@skalatan.de>
Sent: 17 February 2021 16:18
To: Kamailio (SER) - Users Mailing List<mailto:sr-users@lists.kamailio.org>
Cc: Jonathan Hunter<mailto:hunter...@hotmail.com>; Noah 
Mehl<mailto:noahm...@gmail.com>
Subject: RE: Cockroachdb and kamailio 5.4

Hi Jonathan,

no – I do not think that there has been more work done so far, apart from the 
discussion that you referenced below.
If you are also interested in getting this forward, why not reaching out to the 
other guy starting this discussion earlier? Just to see if you can maybe join 
forces to get something of this work into a pull request for review and later a 
possible merge into our code base.

Cheers,

Henning

--
Henning Westerholt – 
https://skalatan.de/blog/<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fskalatan.de%2Fblog%2F=04%7C01%7C%7C766ebba71e894eb9d01708d8d705af48%7C84df9e7fe9f640afb435%7C1%7C0%7C637495766710534138%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=oxpEdYT4PskIv5sNhy1Wg3UnVbdNV3EGxrzOKy1f4fU%3D=0>
Kamailio services – 
https://gilawa.com<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgilawa.com%2F=04%7C01%7C%7C766ebba71e894eb9d01708d8d705af48%7C84df9e7fe9f640afb435%7C1%7C0%7C637495766710534138%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=mjuZldeItNM7%2FpPdGd%2BYeEpu36lGWr3iQgkjmM7C2F0%3D=0>

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Jonathan Hunter
Sent: Wednesday, February 17, 2021 1:59 PM
To: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: [SR-Users] Cockroachdb and kamailio 5.4

Hi Guys,

Hope all are well?

We are looking to implement kamailio with cockroachdb due to the advantages it 
gives us in terms of postgres management and clustering.

I can see from a previous string 
http://sip-router.1086192.n5.nabble.com/CockroachDB-and-Kamailio-td189233.html<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsip-router.1086192.n5.nabble.com%2FCockroachDB-and-Kamailio-td189233.h

Re: [SR-Users] Cockroachdb and kamailio 5.4

2021-02-21 Thread Henning Westerholt
- Users Mailing List<mailto:sr-users@lists.kamailio.org>
Cc: Jonathan Hunter<mailto:hunter...@hotmail.com>; Noah 
Mehl<mailto:noahm...@gmail.com>
Subject: RE: Cockroachdb and kamailio 5.4

Hi Jonathan,

no – I do not think that there has been more work done so far, apart from the 
discussion that you referenced below.
If you are also interested in getting this forward, why not reaching out to the 
other guy starting this discussion earlier? Just to see if you can maybe join 
forces to get something of this work into a pull request for review and later a 
possible merge into our code base.

Cheers,

Henning

--
Henning Westerholt – 
https://skalatan.de/blog/<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fskalatan.de%2Fblog%2F=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307382972%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=WVL5vzihg1kUYxeDwnDwHPksVaf0EaM6ANXuBBBthZE%3D=0>
Kamailio services – 
https://gilawa.com<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgilawa.com%2F=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307392967%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=Zkxs8506K%2FpvHX%2FPcHEj3fyYBei%2BnpuzPmpHdtkFfn4%3D=0>

From: sr-users 
mailto:sr-users-boun...@lists.kamailio.org>>
 On Behalf Of Jonathan Hunter
Sent: Wednesday, February 17, 2021 1:59 PM
To: Kamailio (SER) - Users Mailing List 
mailto:sr-users@lists.kamailio.org>>
Subject: [SR-Users] Cockroachdb and kamailio 5.4

Hi Guys,

Hope all are well?

We are looking to implement kamailio with cockroachdb due to the advantages it 
gives us in terms of postgres management and clustering.

I can see from a previous string 
http://sip-router.1086192.n5.nabble.com/CockroachDB-and-Kamailio-td189233.html<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsip-router.1086192.n5.nabble.com%2FCockroachDB-and-Kamailio-td189233.html=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307392967%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=8E15g5pgP%2BpY%2BgEz%2FtP%2BaLcv6r4s60hCwk5MV0yGn4I%3D=0>
 that someone has attempted this and even created their own branch.

Has any further work been done on this, and if so has anyone got any 
advice/tips relating to it? As I am nervous about potentially using a branch 
and not a general release of kamailio moving forwards.

I appreciate you cant support all database types but I would just be interested 
to hear people’s thoughts on the topic.

Many thanks!

Jon

Sent from 
Mail<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307402965%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=tCO%2FU3IF9d01%2Fwc7APzZZvr2kcFiqIsZox3p%2BjwegyM%3D=0>
 for Windows 10

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


Re: [SR-Users] Cockroachdb and kamailio 5.4

2021-02-21 Thread Noah Mehl
l.com>; Noah Mehl 
>> <mailto:noahm...@gmail.com>
>> Subject: RE: Cockroachdb and kamailio 5.4
>>  
>> Hi Jonathan,
>>  
>> no – I do not think that there has been more work done so far, apart from 
>> the discussion that you referenced below.
>> If you are also interested in getting this forward, why not reaching out to 
>> the other guy starting this discussion earlier? Just to see if you can maybe 
>> join forces to get something of this work into a pull request for review and 
>> later a possible merge into our code base.
>>  
>> Cheers,
>>  
>> Henning
>>  
>> -- 
>> Henning Westerholt – https://skalatan.de/blog/ 
>> <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fskalatan.de%2Fblog%2F=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307382972%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=WVL5vzihg1kUYxeDwnDwHPksVaf0EaM6ANXuBBBthZE%3D=0>
>> Kamailio services – https://gilawa.com 
>> <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgilawa.com%2F=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307392967%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=Zkxs8506K%2FpvHX%2FPcHEj3fyYBei%2BnpuzPmpHdtkFfn4%3D=0>
>>  
>> From: sr-users > <mailto:sr-users-boun...@lists.kamailio.org>> On Behalf Of Jonathan Hunter
>> Sent: Wednesday, February 17, 2021 1:59 PM
>> To: Kamailio (SER) - Users Mailing List > <mailto:sr-users@lists.kamailio.org>>
>> Subject: [SR-Users] Cockroachdb and kamailio 5.4
>>  
>> Hi Guys,
>>  
>> Hope all are well?
>>  
>> We are looking to implement kamailio with cockroachdb due to the advantages 
>> it gives us in terms of postgres management and clustering.
>>  
>> I can see from a previous string 
>> http://sip-router.1086192.n5.nabble.com/CockroachDB-and-Kamailio-td189233.html
>>  
>> <https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsip-router.1086192.n5.nabble.com%2FCockroachDB-and-Kamailio-td189233.html=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307392967%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=8E15g5pgP%2BpY%2BgEz%2FtP%2BaLcv6r4s60hCwk5MV0yGn4I%3D=0>
>>  that someone has attempted this and even created their own branch.
>>  
>> Has any further work been done on this, and if so has anyone got any 
>> advice/tips relating to it? As I am nervous about potentially using a branch 
>> and not a general release of kamailio moving forwards.
>>  
>> I appreciate you cant support all database types but I would just be 
>> interested to hear people’s thoughts on the topic.
>>  
>> Many thanks!
>>  
>> Jon
>>  
>> Sent from Mail 
>> <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307402965%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=tCO%2FU3IF9d01%2Fwc7APzZZvr2kcFiqIsZox3p%2BjwegyM%3D=0>
>>  for Windows 10
> 

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


Re: [SR-Users] Cockroachdb and kamailio 5.4

2021-02-21 Thread Noah Mehl
>
> Kamailio services – https://gilawa.com 
> <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgilawa.com%2F=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307392967%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=Zkxs8506K%2FpvHX%2FPcHEj3fyYBei%2BnpuzPmpHdtkFfn4%3D=0>
>  
> From: sr-users  On Behalf Of Jonathan 
> Hunter
> Sent: Wednesday, February 17, 2021 1:59 PM
> To: Kamailio (SER) - Users Mailing List 
> Subject: [SR-Users] Cockroachdb and kamailio 5.4
>  
> Hi Guys,
>  
> Hope all are well?
>  
> We are looking to implement kamailio with cockroachdb due to the advantages 
> it gives us in terms of postgres management and clustering.
>  
> I can see from a previous string 
> http://sip-router.1086192.n5.nabble.com/CockroachDB-and-Kamailio-td189233.html
>  
> <https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsip-router.1086192.n5.nabble.com%2FCockroachDB-and-Kamailio-td189233.html=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307392967%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=8E15g5pgP%2BpY%2BgEz%2FtP%2BaLcv6r4s60hCwk5MV0yGn4I%3D=0>
>  that someone has attempted this and even created their own branch.
>  
> Has any further work been done on this, and if so has anyone got any 
> advice/tips relating to it? As I am nervous about potentially using a branch 
> and not a general release of kamailio moving forwards.
>  
> I appreciate you cant support all database types but I would just be 
> interested to hear people’s thoughts on the topic.
>  
> Many thanks!
>  
> Jon
>  
> Sent from Mail 
> <https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307402965%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=tCO%2FU3IF9d01%2Fwc7APzZZvr2kcFiqIsZox3p%2BjwegyM%3D=0>
>  for Windows 10

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


Re: [SR-Users] Cockroachdb and kamailio 5.4

2021-02-18 Thread Jonathan Hunter
Hi Noah,

Hope you are well?

I work as a consultant for a company in the UK, and I am building a new hosted 
telephony platform for them in docker initially, and as we are deploying across 
multiple servers they want to use cockroachdb to allow easy management of a 
cluster environment.

I could see from your posts you got it working using your own branch, and I 
wondered what changes you made to make things work correctly and what would be 
needed to get the kamailio dev’s to accept it into the main stream of code? 
(Happy to help here where I can).

Unless you will maintain your branch forever  Or are the changes small so its 
not too much of a concern? I just want to assess the risk really, and like you 
I think mainly we will just be using userloc and dispatcher for DB interaction 
so its positive to hear they work fine.  We would also be using rtpengine, 
routing data will be done via API so that should be fine. FYI Id like to run 
kamailio 5.4 initially.

I see your comments about table creation (in previous posts), that is the 
initial problem I am seeing when trying to use postgres based commands direct 
from a pgdump to create the kamailio database structure, does your branch 
contain all the creation scripts for the db/tables that I can use for testing?

Thanks again in advance  for the response!

Jon

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

From: Henning Westerholt<mailto:h...@skalatan.de>
Sent: 17 February 2021 16:18
To: Kamailio (SER) - Users Mailing List<mailto:sr-users@lists.kamailio.org>
Cc: Jonathan Hunter<mailto:hunter...@hotmail.com>; Noah 
Mehl<mailto:noahm...@gmail.com>
Subject: RE: Cockroachdb and kamailio 5.4

Hi Jonathan,

no – I do not think that there has been more work done so far, apart from the 
discussion that you referenced below.
If you are also interested in getting this forward, why not reaching out to the 
other guy starting this discussion earlier? Just to see if you can maybe join 
forces to get something of this work into a pull request for review and later a 
possible merge into our code base.

Cheers,

Henning

--
Henning Westerholt – 
https://skalatan.de/blog/<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fskalatan.de%2Fblog%2F=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307382972%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=WVL5vzihg1kUYxeDwnDwHPksVaf0EaM6ANXuBBBthZE%3D=0>
Kamailio services – 
https://gilawa.com<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgilawa.com%2F=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307392967%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=Zkxs8506K%2FpvHX%2FPcHEj3fyYBei%2BnpuzPmpHdtkFfn4%3D=0>

From: sr-users  On Behalf Of Jonathan 
Hunter
Sent: Wednesday, February 17, 2021 1:59 PM
To: Kamailio (SER) - Users Mailing List 
Subject: [SR-Users] Cockroachdb and kamailio 5.4

Hi Guys,

Hope all are well?

We are looking to implement kamailio with cockroachdb due to the advantages it 
gives us in terms of postgres management and clustering.

I can see from a previous string 
http://sip-router.1086192.n5.nabble.com/CockroachDB-and-Kamailio-td189233.html<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsip-router.1086192.n5.nabble.com%2FCockroachDB-and-Kamailio-td189233.html=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307392967%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=8E15g5pgP%2BpY%2BgEz%2FtP%2BaLcv6r4s60hCwk5MV0yGn4I%3D=0>
 that someone has attempted this and even created their own branch.

Has any further work been done on this, and if so has anyone got any 
advice/tips relating to it? As I am nervous about potentially using a branch 
and not a general release of kamailio moving forwards.

I appreciate you cant support all database types but I would just be interested 
to hear people’s thoughts on the topic.

Many thanks!

Jon

Sent from 
Mail<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307402965%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=tCO%2FU3IF9d01%2Fwc7APzZZvr2kcFiqIsZox3p%2BjwegyM%3D=0>
 for Windows 10


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


Re: [SR-Users] Cockroachdb and kamailio 5.4

2021-02-17 Thread Jonathan Hunter
Hi Henning,

Thank you for the response, yes certainly interested in moving this forwards 
for sure.

Noah,  I will email you direct if you don’t mind later today?

Thanks again!

Jon

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

From: Henning Westerholt<mailto:h...@skalatan.de>
Sent: 17 February 2021 16:18
To: Kamailio (SER) - Users Mailing List<mailto:sr-users@lists.kamailio.org>
Cc: Jonathan Hunter<mailto:hunter...@hotmail.com>; Noah 
Mehl<mailto:noahm...@gmail.com>
Subject: RE: Cockroachdb and kamailio 5.4

Hi Jonathan,

no – I do not think that there has been more work done so far, apart from the 
discussion that you referenced below.
If you are also interested in getting this forward, why not reaching out to the 
other guy starting this discussion earlier? Just to see if you can maybe join 
forces to get something of this work into a pull request for review and later a 
possible merge into our code base.

Cheers,

Henning

--
Henning Westerholt – 
https://skalatan.de/blog/<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fskalatan.de%2Fblog%2F=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307382972%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=WVL5vzihg1kUYxeDwnDwHPksVaf0EaM6ANXuBBBthZE%3D=0>
Kamailio services – 
https://gilawa.com<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgilawa.com%2F=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307392967%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=Zkxs8506K%2FpvHX%2FPcHEj3fyYBei%2BnpuzPmpHdtkFfn4%3D=0>

From: sr-users  On Behalf Of Jonathan 
Hunter
Sent: Wednesday, February 17, 2021 1:59 PM
To: Kamailio (SER) - Users Mailing List 
Subject: [SR-Users] Cockroachdb and kamailio 5.4

Hi Guys,

Hope all are well?

We are looking to implement kamailio with cockroachdb due to the advantages it 
gives us in terms of postgres management and clustering.

I can see from a previous string 
http://sip-router.1086192.n5.nabble.com/CockroachDB-and-Kamailio-td189233.html<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fsip-router.1086192.n5.nabble.com%2FCockroachDB-and-Kamailio-td189233.html=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307392967%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=8E15g5pgP%2BpY%2BgEz%2FtP%2BaLcv6r4s60hCwk5MV0yGn4I%3D=0>
 that someone has attempted this and even created their own branch.

Has any further work been done on this, and if so has anyone got any 
advice/tips relating to it? As I am nervous about potentially using a branch 
and not a general release of kamailio moving forwards.

I appreciate you cant support all database types but I would just be interested 
to hear people’s thoughts on the topic.

Many thanks!

Jon

Sent from 
Mail<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgo.microsoft.com%2Ffwlink%2F%3FLinkId%3D550986=04%7C01%7C%7C548d23e7d9544667296a08d8d35fb5d3%7C84df9e7fe9f640afb435%7C1%7C0%7C637491755307402965%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000=tCO%2FU3IF9d01%2Fwc7APzZZvr2kcFiqIsZox3p%2BjwegyM%3D=0>
 for Windows 10


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


Re: [SR-Users] Cockroachdb and kamailio 5.4

2021-02-17 Thread Henning Westerholt
Hi Jonathan,

no - I do not think that there has been more work done so far, apart from the 
discussion that you referenced below.
If you are also interested in getting this forward, why not reaching out to the 
other guy starting this discussion earlier? Just to see if you can maybe join 
forces to get something of this work into a pull request for review and later a 
possible merge into our code base.

Cheers,

Henning

--
Henning Westerholt - https://skalatan.de/blog/
Kamailio services - https://gilawa.com<https://gilawa.com/>

From: sr-users  On Behalf Of Jonathan 
Hunter
Sent: Wednesday, February 17, 2021 1:59 PM
To: Kamailio (SER) - Users Mailing List 
Subject: [SR-Users] Cockroachdb and kamailio 5.4

Hi Guys,

Hope all are well?

We are looking to implement kamailio with cockroachdb due to the advantages it 
gives us in terms of postgres management and clustering.

I can see from a previous string 
http://sip-router.1086192.n5.nabble.com/CockroachDB-and-Kamailio-td189233.html 
that someone has attempted this and even created their own branch.

Has any further work been done on this, and if so has anyone got any 
advice/tips relating to it? As I am nervous about potentially using a branch 
and not a general release of kamailio moving forwards.

I appreciate you cant support all database types but I would just be interested 
to hear people's thoughts on the topic.

Many thanks!

Jon

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

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


[SR-Users] Cockroachdb and kamailio 5.4

2021-02-17 Thread Jonathan Hunter
Hi Guys,

Hope all are well?

We are looking to implement kamailio with cockroachdb due to the advantages it 
gives us in terms of postgres management and clustering.

I can see from a previous string 
http://sip-router.1086192.n5.nabble.com/CockroachDB-and-Kamailio-td189233.html 
that someone has attempted this and even created their own branch.

Has any further work been done on this, and if so has anyone got any 
advice/tips relating to it? As I am nervous about potentially using a branch 
and not a general release of kamailio moving forwards.

I appreciate you cant support all database types but I would just be interested 
to hear people’s thoughts on the topic.

Many thanks!

Jon

Sent from Mail for Windows 10

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


Re: [SR-Users] CockroachDB and Kamailio

2020-08-26 Thread Noah Mehl
hub.com/kamailio/kamcli <https://github.com/kamailio/kamcli>
>>>> kamcli aims to be a more modern alternative to kamctl/kamdbctl (e.g., 
>>>> better input validation, flexibility in output formatting, internal 
>>>> interactive shell with auto-completion, ...), eventually replacing them in 
>>>> the future. So far I was focusing on MySQL, being the database type I use. 
>>>> Most of the commands should just work for Postgres, because db operations 
>>>> are done using SqlAlchemy package, but a few commands (from the kamcli db 
>>>> ... subcommand) use the cli tool of the database system. At the end these 
>>>> can be skipped, iirc, also for kamctl, some of the corresponding 
>>>> subcommands are only for mysql (like kamctl db connect), but testing and 
>>>> seeing if it works or not with Postgres or CockroachDB would be 
>>>> appreciated.
>>>> 
>>>> Cheers,
>>>> Daniel
>>>> 
>>>> On 20.08.20 22:42, Noah Mehl wrote:
>>>>> Henning,
>>>>> 
>>>>> So, for the default config, it only has the option for: WITH_MYSQL.  I 
>>>>> was wondering if a WITH_PGSQL would be accepted.
>>>>> 
>>>>> As for the kamdbctl scripts, there are a few things I’ve noticed:
>>>>> 
>>>>> I would prefer UUID vs SERIAL.  This actually is a little more annoying 
>>>>> when dealing with the SEQUENCE entity in Postgres.  The only change 
>>>>> required, is to load the pgcrypto extension and switch to uuid instead of 
>>>>> SERIAL.  I have a tracking branch here:
>>>>> 
>>>>> https://github.com/reperio/kamailio/tree/postgres_uuid 
>>>>> <https://github.com/reperio/kamailio/tree/postgres_uuid>
>>>>> 
>>>>> The other reason is that for cockroachdb, using gen_random_uuid() is 
>>>>> documented to be more efficient 
>>>>> <https://www.cockroachlabs.com/docs/stable/create-sequence.html> (in 
>>>>> addition to being a preference).
>>>>> 
>>>>> As for cockroachdb, I have a tracking branch (based on the uuid branch) 
>>>>> that seems to be working well:
>>>>> 
>>>>> https://github.com/reperio/kamailio/tree/cockroach 
>>>>> <https://github.com/reperio/kamailio/tree/cockroach>
>>>>> 
>>>>> So far, the only issue in the creation/managment of the schema is: CREATE 
>>>>> FUNCTION.  But it looks like maybe concat() and random() are already 
>>>>> supported by cockroackdb: 
>>>>> https://www.cockroachlabs.com/docs/stable/functions-and-operators.html 
>>>>> <https://www.cockroachlabs.com/docs/stable/functions-and-operators.html>. 
>>>>>  I will have to dig deeper into the lcr module to see where/if this is an 
>>>>> issue.
>>>>> 
>>>>> Thanks!
>>>>> 
>>>>> ~Noah
>>>>> 
>>>>>> On Aug 20, 2020, at 2:23 PM, Henning Westerholt >>>>> <mailto:h...@skalatan.de>> wrote:
>>>>>> 
>>>>>> Hi Noah,
>>>>>> 
>>>>>> if you find something that does not work with the default PostgreSQL 
>>>>>> schema from kamdbctl, create an issue. It some cases it is just a matter 
>>>>>> of formatting and it can work for PostgreSQL and CockroachDB. This is 
>>>>>> probably the easier path, from an maintenance point of view.
>>>>>> 
>>>>>> What do you mean by default configuration?
>>>>>> 
>>>>>> Cheers,
>>>>>> 
>>>>>> Henning
>>>>>> 
>>>>>> -- 
>>>>>> Henning Westerholt - https://skalatan.de/blog/ 
>>>>>> <https://skalatan.de/blog/>
>>>>>> Kamailio services - https://gilawa.com <https://gilawa.com/> 
>>>>>> 
>>>>>> -Original Message-
>>>>>> From: Noah Mehl mailto:noahm...@gmail.com>> 
>>>>>> Sent: Thursday, August 20, 2020 6:35 PM
>>>>>> To: Henning Westerholt mailto:h...@skalatan.de>>
>>>>>> Cc: Kamailio (SER) - Users Mailing List >>>>> <mailto:sr-users@lists.kamailio.org>>
>>>>>> Subject: Re: [SR-Users] CockroachDB and Kamailio
>>>>>> 
>>

Re: [SR-Users] CockroachDB and Kamailio

2020-08-25 Thread Daniel-Constantin Mierla
he other reason is that for cockroachdb, using gen_random_uuid()
>>>> is documented to be more efficient
>>>> <https://www.cockroachlabs.com/docs/stable/create-sequence.html> (in
>>>> addition to being a preference).
>>>>
>>>> As for cockroachdb, I have a tracking branch (based on the uuid
>>>> branch) that seems to be working well:
>>>>
>>>> https://github.com/reperio/kamailio/tree/cockroach
>>>>
>>>> So far, the only issue in the creation/managment of the schema
>>>> is: CREATE FUNCTION.  But it looks like maybe concat() and random()
>>>> are already supported by
>>>> cockroackdb: 
>>>> https://www.cockroachlabs.com/docs/stable/functions-and-operators.html.
>>>>  I will have to dig deeper into the lcr module to see where/if this
>>>> is an issue.
>>>>
>>>> Thanks!
>>>>
>>>> ~Noah
>>>>
>>>>> On Aug 20, 2020, at 2:23 PM, Henning Westerholt >>>> <mailto:h...@skalatan.de>> wrote:
>>>>>
>>>>> Hi Noah,
>>>>>
>>>>> if you find something that does not work with the default
>>>>> PostgreSQL schema from kamdbctl, create an issue. It some cases it
>>>>> is just a matter of formatting and it can work for PostgreSQL and
>>>>> CockroachDB. This is probably the easier path, from an maintenance
>>>>> point of view.
>>>>>
>>>>> What do you mean by default configuration?
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Henning
>>>>>
>>>>> -- 
>>>>> Henning Westerholt - https://skalatan.de/blog/
>>>>> Kamailio services - https://gilawa.com <https://gilawa.com/>
>>>>>
>>>>> -Original Message-
>>>>> From: Noah Mehl mailto:noahm...@gmail.com>>
>>>>> Sent: Thursday, August 20, 2020 6:35 PM
>>>>> To: Henning Westerholt mailto:h...@skalatan.de>>
>>>>> Cc: Kamailio (SER) - Users Mailing List
>>>>> mailto:sr-users@lists.kamailio.org>>
>>>>> Subject: Re: [SR-Users] CockroachDB and Kamailio
>>>>>
>>>>> Henning,
>>>>>
>>>>> Thanks for the reply!  I am testing away.  I will update with my
>>>>> findings.
>>>>>
>>>>> That being said, some things might be slightly different.  Should
>>>>> I add a cockroachdb option to the kamdbctl and default configs as
>>>>> a PR?
>>>>>
>>>>> ~Noah
>>>>>
>>>>>> On Aug 20, 2020, at 2:35 AM, Henning Westerholt >>>>> <mailto:h...@skalatan.de>> wrote:
>>>>>>
>>>>>> Dear Noah,
>>>>>>
>>>>>> it was probably not discussed on the public list, at least I
>>>>>> don't remember it. Cockroachdb claims to be compatible with
>>>>>> PostgreSQL, so it should work with this DB Kamailio module.
>>>>>>
>>>>>> If you encounter issues, report on this list, or open a bug
>>>>>> report if its something related to problems in the Kamailio
>>>>>> db_postgres module.
>>>>>>
>>>>>> Cheers,
>>>>>>
>>>>>> Henning
>>>>>>
>>>>>> --
>>>>>> Henning Westerholt - https://skalatan.de/blog/ Kamailio services -
>>>>>> https://gilawa.com <https://gilawa.com/>
>>>>>>
>>>>>> -Original Message-
>>>>>> From: sr-users  On Behalf Of
>>>>>> Noah
>>>>>> Mehl
>>>>>> Sent: Wednesday, August 19, 2020 10:13 PM
>>>>>> To: sr-users@lists.kamailio.org
>>>>>> Subject: [SR-Users] CockroachDB and Kamailio
>>>>>>
>>>>>> Has anyone been down this path before?  We are trying to test
>>>>>> this out and the results are pretty promising so far.
>>>>>>
>>>>>> I realize the lack of Stored Procedures and Triggers make this
>>>>>> untenable for many Postgres based implementations.
>>>>>>
>>>>>> Thanks!
>>>>>>
>>>>>> ~Noah
>>>>>> ___
>>>>>> Kamailio (SER) - Users Mailing List
>>>>>> sr-users@lists.kamailio.org
>>>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>>>
>>>>
>>>>
>>>> ___
>>>> Kamailio (SER) - Users Mailing List
>>>> sr-users@lists.kamailio.org
>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>> -- 
>>> Daniel-Constantin Mierla -- www.asipto.com
>>> www.twitter.com/miconda -- www.linkedin.com/in/miconda
>>> Funding: https://www.paypal.me/dcmierla
>>
>
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Funding: https://www.paypal.me/dcmierla

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


Re: [SR-Users] CockroachDB and Kamailio

2020-08-21 Thread Noah Mehl
>> <https://github.com/reperio/kamailio/tree/cockroach>
>>> 
>>> So far, the only issue in the creation/managment of the schema is: CREATE 
>>> FUNCTION.  But it looks like maybe concat() and random() are already 
>>> supported by cockroackdb: 
>>> https://www.cockroachlabs.com/docs/stable/functions-and-operators.html 
>>> <https://www.cockroachlabs.com/docs/stable/functions-and-operators.html>.  
>>> I will have to dig deeper into the lcr module to see where/if this is an 
>>> issue.
>>> 
>>> Thanks!
>>> 
>>> ~Noah
>>> 
>>>> On Aug 20, 2020, at 2:23 PM, Henning Westerholt >>> <mailto:h...@skalatan.de>> wrote:
>>>> 
>>>> Hi Noah,
>>>> 
>>>> if you find something that does not work with the default PostgreSQL 
>>>> schema from kamdbctl, create an issue. It some cases it is just a matter 
>>>> of formatting and it can work for PostgreSQL and CockroachDB. This is 
>>>> probably the easier path, from an maintenance point of view.
>>>> 
>>>> What do you mean by default configuration?
>>>> 
>>>> Cheers,
>>>> 
>>>> Henning
>>>> 
>>>> -- 
>>>> Henning Westerholt - https://skalatan.de/blog/ <https://skalatan.de/blog/>
>>>> Kamailio services - https://gilawa.com <https://gilawa.com/> 
>>>> 
>>>> -Original Message-
>>>> From: Noah Mehl mailto:noahm...@gmail.com>> 
>>>> Sent: Thursday, August 20, 2020 6:35 PM
>>>> To: Henning Westerholt mailto:h...@skalatan.de>>
>>>> Cc: Kamailio (SER) - Users Mailing List >>> <mailto:sr-users@lists.kamailio.org>>
>>>> Subject: Re: [SR-Users] CockroachDB and Kamailio
>>>> 
>>>> Henning,
>>>> 
>>>> Thanks for the reply!  I am testing away.  I will update with my findings.
>>>> 
>>>> That being said, some things might be slightly different.  Should I add a 
>>>> cockroachdb option to the kamdbctl and default configs as a PR?
>>>> 
>>>> ~Noah
>>>> 
>>>>> On Aug 20, 2020, at 2:35 AM, Henning Westerholt >>>> <mailto:h...@skalatan.de>> wrote:
>>>>> 
>>>>> Dear Noah,
>>>>> 
>>>>> it was probably not discussed on the public list, at least I don't 
>>>>> remember it. Cockroachdb claims to be compatible with PostgreSQL, so it 
>>>>> should work with this DB Kamailio module.
>>>>> 
>>>>> If you encounter issues, report on this list, or open a bug report if its 
>>>>> something related to problems in the Kamailio db_postgres module.
>>>>> 
>>>>> Cheers,
>>>>> 
>>>>> Henning
>>>>> 
>>>>> --
>>>>> Henning Westerholt - https://skalatan.de/blog/ 
>>>>> <https://skalatan.de/blog/> Kamailio services - 
>>>>> https://gilawa.com <https://gilawa.com/>
>>>>> 
>>>>> -Original Message-
>>>>> From: sr-users  
>>>>> <mailto:sr-users-boun...@lists.kamailio.org> On Behalf Of Noah 
>>>>> Mehl
>>>>> Sent: Wednesday, August 19, 2020 10:13 PM
>>>>> To: sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>
>>>>> Subject: [SR-Users] CockroachDB and Kamailio
>>>>> 
>>>>> Has anyone been down this path before?  We are trying to test this out 
>>>>> and the results are pretty promising so far.
>>>>> 
>>>>> I realize the lack of Stored Procedures and Triggers make this untenable 
>>>>> for many Postgres based implementations.
>>>>> 
>>>>> Thanks!
>>>>> 
>>>>> ~Noah
>>>>> ___
>>>>> Kamailio (SER) - Users Mailing List
>>>>> sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>
>>>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users 
>>>>> <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
>>>> 
>>> 
>>> 
>>> 
>>> ___
>>> Kamailio (SER) - Users Mailing List
>>> sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org>
>>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users 
>>> <https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users>
>> -- 
>> Daniel-Constantin Mierla -- www.asipto.com <http://www.asipto.com/>
>> www.twitter.com/miconda <http://www.twitter.com/miconda> -- 
>> www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
>> Funding: https://www.paypal.me/dcmierla <https://www.paypal.me/dcmierla>

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


Re: [SR-Users] CockroachDB and Kamailio

2020-08-21 Thread Noah Mehl
Daniel,

Thanks for the thoughtful reply.  I can, at the very least, try and work on the 
stock pgsql scripts to work OOTB with CockroachDB (minus the create functions).

The only table we really care about UUID right now is subscriber, and we can 
just track that ourselves.

I will give kamcli a try, and hopefully will be able to help in the future.

Thanks!

~Noah

> On Aug 21, 2020, at 4:34 AM, Daniel-Constantin Mierla  
> wrote:
> 
> Hello,
> 
> the default kamailio.cfg is aiming to offer a starting point for building 
> more complex configuration/SIP routing policies, not to offer all the options 
> we support in Kamailio. MySQL is provided there to show how to connect to 
> database, being chosen because it was the first database connect module that 
> was developed and it is kept because it is still very popular. You are more 
> than welcome to add a sample config of using postgress, which can be placed 
> somewhere in the misc/examples/. Making the default config too complex may 
> result in "scaring" the people trying to use Kamailio for first time.
> 
> Using string UUID instead of the auto-increment integer id it will break at 
> least lcr and msilo, iirc. Most of the modules do not use id column, but some 
> do it. Siremis, the web management interface is also using the id field, but 
> it doesn't support Postgres at this moment.
> 
> If you have some Python knowledge (and spare time), maybe you can help adding 
> support for it in kamcli:
> 
>   * https://github.com/kamailio/kamcli <https://github.com/kamailio/kamcli>
> kamcli aims to be a more modern alternative to kamctl/kamdbctl (e.g., better 
> input validation, flexibility in output formatting, internal interactive 
> shell with auto-completion, ...), eventually replacing them in the future. So 
> far I was focusing on MySQL, being the database type I use. Most of the 
> commands should just work for Postgres, because db operations are done using 
> SqlAlchemy package, but a few commands (from the kamcli db ... subcommand) 
> use the cli tool of the database system. At the end these can be skipped, 
> iirc, also for kamctl, some of the corresponding subcommands are only for 
> mysql (like kamctl db connect), but testing and seeing if it works or not 
> with Postgres or CockroachDB would be appreciated.
> 
> Cheers,
> Daniel
> 
> On 20.08.20 22:42, Noah Mehl wrote:
>> Henning,
>> 
>> So, for the default config, it only has the option for: WITH_MYSQL.  I was 
>> wondering if a WITH_PGSQL would be accepted.
>> 
>> As for the kamdbctl scripts, there are a few things I’ve noticed:
>> 
>> I would prefer UUID vs SERIAL.  This actually is a little more annoying when 
>> dealing with the SEQUENCE entity in Postgres.  The only change required, is 
>> to load the pgcrypto extension and switch to uuid instead of SERIAL.  I have 
>> a tracking branch here:
>> 
>> https://github.com/reperio/kamailio/tree/postgres_uuid 
>> <https://github.com/reperio/kamailio/tree/postgres_uuid>
>> 
>> The other reason is that for cockroachdb, using gen_random_uuid() is 
>> documented to be more efficient 
>> <https://www.cockroachlabs.com/docs/stable/create-sequence.html> (in 
>> addition to being a preference).
>> 
>> As for cockroachdb, I have a tracking branch (based on the uuid branch) that 
>> seems to be working well:
>> 
>> https://github.com/reperio/kamailio/tree/cockroach 
>> <https://github.com/reperio/kamailio/tree/cockroach>
>> 
>> So far, the only issue in the creation/managment of the schema is: CREATE 
>> FUNCTION.  But it looks like maybe concat() and random() are already 
>> supported by cockroackdb: 
>> https://www.cockroachlabs.com/docs/stable/functions-and-operators.html 
>> <https://www.cockroachlabs.com/docs/stable/functions-and-operators.html>.  I 
>> will have to dig deeper into the lcr module to see where/if this is an issue.
>> 
>> Thanks!
>> 
>> ~Noah
>> 
>>> On Aug 20, 2020, at 2:23 PM, Henning Westerholt >> <mailto:h...@skalatan.de>> wrote:
>>> 
>>> Hi Noah,
>>> 
>>> if you find something that does not work with the default PostgreSQL schema 
>>> from kamdbctl, create an issue. It some cases it is just a matter of 
>>> formatting and it can work for PostgreSQL and CockroachDB. This is probably 
>>> the easier path, from an maintenance point of view.
>>> 
>>> What do you mean by default configuration?
>>> 
>>> Cheers,
>>> 
>>> Henning
>>> 
>>> -- 
>>> Henning Westerholt - https://skalatan.de/blog/ <https

Re: [SR-Users] CockroachDB and Kamailio

2020-08-21 Thread Daniel-Constantin Mierla
Hello,

the default kamailio.cfg is aiming to offer a starting point for
building more complex configuration/SIP routing policies, not to offer
all the options we support in Kamailio. MySQL is provided there to show
how to connect to database, being chosen because it was the first
database connect module that was developed and it is kept because it is
still very popular. You are more than welcome to add a sample config of
using postgress, which can be placed somewhere in the misc/examples/.
Making the default config too complex may result in "scaring" the people
trying to use Kamailio for first time.

Using string UUID instead of the auto-increment integer id it will break
at least lcr and msilo, iirc. Most of the modules do not use id column,
but some do it. Siremis, the web management interface is also using the
id field, but it doesn't support Postgres at this moment.

If you have some Python knowledge (and spare time), maybe you can help
adding support for it in kamcli:

  * https://github.com/kamailio/kamcli

kamcli aims to be a more modern alternative to kamctl/kamdbctl (e.g.,
better input validation, flexibility in output formatting, internal
interactive shell with auto-completion, ...), eventually replacing them
in the future. So far I was focusing on MySQL, being the database type I
use. Most of the commands should just work for Postgres, because db
operations are done using SqlAlchemy package, but a few commands (from
the kamcli db ... subcommand) use the cli tool of the database system.
At the end these can be skipped, iirc, also for kamctl, some of the
corresponding subcommands are only for mysql (like kamctl db connect),
but testing and seeing if it works or not with Postgres or CockroachDB
would be appreciated.

Cheers,
Daniel

On 20.08.20 22:42, Noah Mehl wrote:
> Henning,
>
> So, for the default config, it only has the option for: WITH_MYSQL.  I
> was wondering if a WITH_PGSQL would be accepted.
>
> As for the kamdbctl scripts, there are a few things I’ve noticed:
>
> I would prefer UUID vs SERIAL.  This actually is a little more
> annoying when dealing with the SEQUENCE entity in Postgres.  The only
> change required, is to load the pgcrypto extension and switch to uuid
> instead of SERIAL.  I have a tracking branch here:
>
> https://github.com/reperio/kamailio/tree/postgres_uuid
>
> The other reason is that for cockroachdb, using gen_random_uuid() is
> documented to be more efficient
> <https://www.cockroachlabs.com/docs/stable/create-sequence.html> (in
> addition to being a preference).
>
> As for cockroachdb, I have a tracking branch (based on the uuid
> branch) that seems to be working well:
>
> https://github.com/reperio/kamailio/tree/cockroach
>
> So far, the only issue in the creation/managment of the schema
> is: CREATE FUNCTION.  But it looks like maybe concat() and random()
> are already supported by
> cockroackdb: 
> https://www.cockroachlabs.com/docs/stable/functions-and-operators.html.
>  I will have to dig deeper into the lcr module to see where/if this is
> an issue.
>
> Thanks!
>
> ~Noah
>
>> On Aug 20, 2020, at 2:23 PM, Henning Westerholt > <mailto:h...@skalatan.de>> wrote:
>>
>> Hi Noah,
>>
>> if you find something that does not work with the default PostgreSQL
>> schema from kamdbctl, create an issue. It some cases it is just a
>> matter of formatting and it can work for PostgreSQL and CockroachDB.
>> This is probably the easier path, from an maintenance point of view.
>>
>> What do you mean by default configuration?
>>
>> Cheers,
>>
>> Henning
>>
>> -- 
>> Henning Westerholt - https://skalatan.de/blog/
>> Kamailio services - https://gilawa.com
>>
>> -Original Message-----
>> From: Noah Mehl mailto:noahm...@gmail.com>>
>> Sent: Thursday, August 20, 2020 6:35 PM
>> To: Henning Westerholt mailto:h...@skalatan.de>>
>> Cc: Kamailio (SER) - Users Mailing List > <mailto:sr-users@lists.kamailio.org>>
>> Subject: Re: [SR-Users] CockroachDB and Kamailio
>>
>> Henning,
>>
>> Thanks for the reply!  I am testing away.  I will update with my
>> findings.
>>
>> That being said, some things might be slightly different.  Should I
>> add a cockroachdb option to the kamdbctl and default configs as a PR?
>>
>> ~Noah
>>
>>> On Aug 20, 2020, at 2:35 AM, Henning Westerholt >> <mailto:h...@skalatan.de>> wrote:
>>>
>>> Dear Noah,
>>>
>>> it was probably not discussed on the public list, at least I don't
>>> remember it. Cockroachdb claims to be compatible with PostgreSQL, so
>>> it should work with this DB Kamailio module.
>>>
>>

Re: [SR-Users] CockroachDB and Kamailio

2020-08-20 Thread Noah Mehl
Henning,

So, for the default config, it only has the option for: WITH_MYSQL.  I was 
wondering if a WITH_PGSQL would be accepted.

As for the kamdbctl scripts, there are a few things I’ve noticed:

I would prefer UUID vs SERIAL.  This actually is a little more annoying when 
dealing with the SEQUENCE entity in Postgres.  The only change required, is to 
load the pgcrypto extension and switch to uuid instead of SERIAL.  I have a 
tracking branch here:

https://github.com/reperio/kamailio/tree/postgres_uuid 
<https://github.com/reperio/kamailio/tree/postgres_uuid>

The other reason is that for cockroachdb, using gen_random_uuid() is documented 
to be more efficient 
<https://www.cockroachlabs.com/docs/stable/create-sequence.html> (in addition 
to being a preference).

As for cockroachdb, I have a tracking branch (based on the uuid branch) that 
seems to be working well:

https://github.com/reperio/kamailio/tree/cockroach 
<https://github.com/reperio/kamailio/tree/cockroach>

So far, the only issue in the creation/managment of the schema is: CREATE 
FUNCTION.  But it looks like maybe concat() and random() are already supported 
by cockroackdb: 
https://www.cockroachlabs.com/docs/stable/functions-and-operators.html 
<https://www.cockroachlabs.com/docs/stable/functions-and-operators.html>.  I 
will have to dig deeper into the lcr module to see where/if this is an issue.

Thanks!

~Noah

> On Aug 20, 2020, at 2:23 PM, Henning Westerholt  wrote:
> 
> Hi Noah,
> 
> if you find something that does not work with the default PostgreSQL schema 
> from kamdbctl, create an issue. It some cases it is just a matter of 
> formatting and it can work for PostgreSQL and CockroachDB. This is probably 
> the easier path, from an maintenance point of view.
> 
> What do you mean by default configuration?
> 
> Cheers,
> 
> Henning
> 
> -- 
> Henning Westerholt - https://skalatan.de/blog/
> Kamailio services - https://gilawa.com 
> 
> -Original Message-
> From: Noah Mehl  
> Sent: Thursday, August 20, 2020 6:35 PM
> To: Henning Westerholt 
> Cc: Kamailio (SER) - Users Mailing List 
> Subject: Re: [SR-Users] CockroachDB and Kamailio
> 
> Henning,
> 
> Thanks for the reply!  I am testing away.  I will update with my findings.
> 
> That being said, some things might be slightly different.  Should I add a 
> cockroachdb option to the kamdbctl and default configs as a PR?
> 
> ~Noah
> 
>> On Aug 20, 2020, at 2:35 AM, Henning Westerholt  wrote:
>> 
>> Dear Noah,
>> 
>> it was probably not discussed on the public list, at least I don't remember 
>> it. Cockroachdb claims to be compatible with PostgreSQL, so it should work 
>> with this DB Kamailio module.
>> 
>> If you encounter issues, report on this list, or open a bug report if its 
>> something related to problems in the Kamailio db_postgres module.
>> 
>> Cheers,
>> 
>> Henning
>> 
>> --
>> Henning Westerholt - https://skalatan.de/blog/ Kamailio services - 
>> https://gilawa.com
>> 
>> -Original Message-
>> From: sr-users  On Behalf Of Noah 
>> Mehl
>> Sent: Wednesday, August 19, 2020 10:13 PM
>> To: sr-users@lists.kamailio.org
>> Subject: [SR-Users] CockroachDB and Kamailio
>> 
>> Has anyone been down this path before?  We are trying to test this out and 
>> the results are pretty promising so far.
>> 
>> I realize the lack of Stored Procedures and Triggers make this untenable for 
>> many Postgres based implementations.
>> 
>> Thanks!
>> 
>> ~Noah
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> 

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


Re: [SR-Users] CockroachDB and Kamailio

2020-08-20 Thread Henning Westerholt
Hi Noah,

if you find something that does not work with the default PostgreSQL schema 
from kamdbctl, create an issue. It some cases it is just a matter of formatting 
and it can work for PostgreSQL and CockroachDB. This is probably the easier 
path, from an maintenance point of view.

What do you mean by default configuration?

Cheers,

Henning

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

-Original Message-
From: Noah Mehl  
Sent: Thursday, August 20, 2020 6:35 PM
To: Henning Westerholt 
Cc: Kamailio (SER) - Users Mailing List 
Subject: Re: [SR-Users] CockroachDB and Kamailio

Henning,

Thanks for the reply!  I am testing away.  I will update with my findings.

That being said, some things might be slightly different.  Should I add a 
cockroachdb option to the kamdbctl and default configs as a PR?

~Noah

> On Aug 20, 2020, at 2:35 AM, Henning Westerholt  wrote:
> 
> Dear Noah,
> 
> it was probably not discussed on the public list, at least I don't remember 
> it. Cockroachdb claims to be compatible with PostgreSQL, so it should work 
> with this DB Kamailio module.
> 
> If you encounter issues, report on this list, or open a bug report if its 
> something related to problems in the Kamailio db_postgres module.
> 
> Cheers,
> 
> Henning
> 
> --
> Henning Westerholt - https://skalatan.de/blog/ Kamailio services - 
> https://gilawa.com
> 
> -Original Message-
> From: sr-users  On Behalf Of Noah 
> Mehl
> Sent: Wednesday, August 19, 2020 10:13 PM
> To: sr-users@lists.kamailio.org
> Subject: [SR-Users] CockroachDB and Kamailio
> 
> Has anyone been down this path before?  We are trying to test this out and 
> the results are pretty promising so far.
> 
> I realize the lack of Stored Procedures and Triggers make this untenable for 
> many Postgres based implementations.
> 
> Thanks!
> 
> ~Noah
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


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


Re: [SR-Users] CockroachDB and Kamailio

2020-08-20 Thread Alex Balashov
I don’t know that the project can reasonably support every conceivable 
database. We might be wise to stick to the major ones.

—
Sent from mobile, with due apologies for brevity and errors.

> On Aug 20, 2020, at 11:35 AM, Noah Mehl  wrote:
> 
> Henning,
> 
> Thanks for the reply!  I am testing away.  I will update with my findings.
> 
> That being said, some things might be slightly different.  Should I add a 
> cockroachdb option to the kamdbctl and default configs as a PR?
> 
> ~Noah
> 
>> On Aug 20, 2020, at 2:35 AM, Henning Westerholt  wrote:
>> 
>> Dear Noah,
>> 
>> it was probably not discussed on the public list, at least I don't remember 
>> it. Cockroachdb claims to be compatible with PostgreSQL, so it should work 
>> with this DB Kamailio module.
>> 
>> If you encounter issues, report on this list, or open a bug report if its 
>> something related to problems in the Kamailio db_postgres module.
>> 
>> Cheers,
>> 
>> Henning
>> 
>> -- 
>> Henning Westerholt - https://skalatan.de/blog/
>> Kamailio services - https://gilawa.com 
>> 
>> -Original Message-
>> From: sr-users  On Behalf Of Noah Mehl
>> Sent: Wednesday, August 19, 2020 10:13 PM
>> To: sr-users@lists.kamailio.org
>> Subject: [SR-Users] CockroachDB and Kamailio
>> 
>> Has anyone been down this path before?  We are trying to test this out and 
>> the results are pretty promising so far.
>> 
>> I realize the lack of Stored Procedures and Triggers make this untenable for 
>> many Postgres based implementations.
>> 
>> Thanks!
>> 
>> ~Noah
>> ___
>> Kamailio (SER) - Users Mailing List
>> sr-users@lists.kamailio.org
>> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
> 
> 
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users

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


Re: [SR-Users] CockroachDB and Kamailio

2020-08-20 Thread Noah Mehl
Henning,

Thanks for the reply!  I am testing away.  I will update with my findings.

That being said, some things might be slightly different.  Should I add a 
cockroachdb option to the kamdbctl and default configs as a PR?

~Noah

> On Aug 20, 2020, at 2:35 AM, Henning Westerholt  wrote:
> 
> Dear Noah,
> 
> it was probably not discussed on the public list, at least I don't remember 
> it. Cockroachdb claims to be compatible with PostgreSQL, so it should work 
> with this DB Kamailio module.
> 
> If you encounter issues, report on this list, or open a bug report if its 
> something related to problems in the Kamailio db_postgres module.
> 
> Cheers,
> 
> Henning
> 
> -- 
> Henning Westerholt - https://skalatan.de/blog/
> Kamailio services - https://gilawa.com 
> 
> -Original Message-
> From: sr-users  On Behalf Of Noah Mehl
> Sent: Wednesday, August 19, 2020 10:13 PM
> To: sr-users@lists.kamailio.org
> Subject: [SR-Users] CockroachDB and Kamailio
> 
> Has anyone been down this path before?  We are trying to test this out and 
> the results are pretty promising so far.
> 
> I realize the lack of Stored Procedures and Triggers make this untenable for 
> many Postgres based implementations.
> 
> Thanks!
> 
> ~Noah
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


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


Re: [SR-Users] CockroachDB and Kamailio

2020-08-20 Thread Henning Westerholt
Dear Noah,

it was probably not discussed on the public list, at least I don't remember it. 
Cockroachdb claims to be compatible with PostgreSQL, so it should work with 
this DB Kamailio module.

If you encounter issues, report on this list, or open a bug report if its 
something related to problems in the Kamailio db_postgres module.

Cheers,

Henning

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

-Original Message-
From: sr-users  On Behalf Of Noah Mehl
Sent: Wednesday, August 19, 2020 10:13 PM
To: sr-users@lists.kamailio.org
Subject: [SR-Users] CockroachDB and Kamailio

Has anyone been down this path before?  We are trying to test this out and the 
results are pretty promising so far.

I realize the lack of Stored Procedures and Triggers make this untenable for 
many Postgres based implementations.

Thanks!

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

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


[SR-Users] CockroachDB and Kamailio

2020-08-19 Thread Noah Mehl
Has anyone been down this path before?  We are trying to test this out and the 
results are pretty promising so far.

I realize the lack of Stored Procedures and Triggers make this untenable for 
many Postgres based implementations.

Thanks!

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