Re: [OpenSIPS-Users] warning on postgres data type

2018-02-14 Thread Pasan Meemaduma via Users
Hi Bogdan,
Thanks for the reply. I'll see if I can use call-Id + from_tag for it. But at 
the moment we are using uuid version 1 for this to make sure we get more 
accurate uniqueness. 


 

On Wednesday, 14 February 2018, 15:54, Bogdan-Andrei Iancu 
 wrote:
 

  Hi,
 
 OK, the uuid is custom data type (specific to postgres ??), so doing the cast 
at DB level is the proper way to address the warning.
 
 But, why not using the call-Id + from_tag as uuid for the calls ?
 
 Regards,
  Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Summit 2018
  http://www.opensips.org/events/Summit-2018Amsterdam
 On 02/14/2018 12:03 PM, Pasan Meemaduma wrote:
  
  Hi Bogdan, 
  It returns the postgres data type uuid. I put that in acc extra field to keep 
track calls. 
  
  If I use following, I'm not getting the warning anymore. 
  
  avp_db_query("SELECT uuid_generate_v1mc()::varchar","$avp(callid)") 
   
 
  On Wednesday, 14 February 2018, 14:55, Bogdan-Andrei Iancu 
 wrote:
  
 
Hi Pasan,
 
 But from the DB point of view, what data type does your procedure return ?
 
 Regards,
  Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Summit 2018
  http://www.opensips.org/events/Summit-2018Amsterdam
  On 02/14/2018 08:51 AM, Pasan Meemaduma via Users wrote:
  
  Hi List,
  
  I got another issue where opensips issue a warning I'm trying to load a uuid 
from a postgres database as opensips doesn't have a built-in function to 
generate a uuid. How do I get rid of this warning ? 
  
  WARNING:db_postgres:db_postgres_get_columns: unhandled data type column 
(uuid_generate_v1mc) type id (2950), use  DB_STRING as default
  
  Its caused by following line in my config 
  avp_db_query("SELECT uuid_generate_v1mc()","$avp(callid)"); 
  
  does this mean I need to convert it to string before returning from postgres 
via the sql I use ? 
   
  
 ___
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] warning on postgres data type

2018-02-14 Thread Bogdan-Andrei Iancu

Hi,

OK, the uuid is custom data type (specific to postgres ??), so doing the 
cast at DB level is the proper way to address the warning.


But, why not using the call-Id + from_tag as uuid for the calls ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Summit 2018
  http://www.opensips.org/events/Summit-2018Amsterdam

On 02/14/2018 12:03 PM, Pasan Meemaduma wrote:

Hi Bogdan,

It returns the postgres data type uuid. I put that in acc extra field 
to keep track calls.


If I use following, I'm not getting the warning anymore.

avp_db_query("SELECT uuid_generate_v1mc()::varchar","$avp(callid)")



On Wednesday, 14 February 2018, 14:55, Bogdan-Andrei Iancu 
 wrote:



Hi Pasan,

But from the DB point of view, what data type does your procedure return ?

Regards,
Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com 
OpenSIPS Summit 2018
   http://www.opensips.org/events/Summit-2018Amsterdam
On 02/14/2018 08:51 AM, Pasan Meemaduma via Users wrote:

Hi List,

I got another issue where opensips issue a warning I'm trying to load 
a uuid from a postgres database as opensips doesn't have a built-in 
function to generate a uuid. How do I get rid of this warning ?



WARNING:db_postgres:db_postgres_get_columns: unhandled data type 
column (uuid_generate_v1mc) type id (2950), use DB_STRING as default


Its caused by following line in my config

avp_db_query("SELECT uuid_generate_v1mc()","$avp(callid)");


does this mean I need to convert it to string before returning from 
postgres via the sql I use ?




___
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] warning on postgres data type

2018-02-14 Thread Pasan Meemaduma via Users
Hi Bogdan,
It returns the postgres data type uuid. I put that in acc extra field to keep 
track calls. 

If I use following, I'm not getting the warning anymore. 

avp_db_query("SELECT uuid_generate_v1mc()::varchar","$avp(callid)")
 

On Wednesday, 14 February 2018, 14:55, Bogdan-Andrei Iancu 
 wrote:
 

  Hi Pasan,
 
 But from the DB point of view, what data type does your procedure return ?
 
 Regards,
  Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Summit 2018
  http://www.opensips.org/events/Summit-2018Amsterdam
 On 02/14/2018 08:51 AM, Pasan Meemaduma via Users wrote:
  
  Hi List,
  
  I got another issue where opensips issue a warning I'm trying to load a uuid 
from a postgres database as opensips doesn't have a built-in function to 
generate a uuid. How do I get rid of this warning ? 
  
  WARNING:db_postgres:db_postgres_get_columns: unhandled data type column 
(uuid_generate_v1mc) type id (2950), use DB_STRING as default
  
  Its caused by following line in my config 
  avp_db_query("SELECT uuid_generate_v1mc()","$avp(callid)"); 
  
  does this mean I need to convert it to string before returning from postgres 
via the sql I use ? 
   
  
 ___
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] warning on postgres data type

2018-02-14 Thread Bogdan-Andrei Iancu

Hi Pasan,

But from the DB point of view, what data type does your procedure return ?

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
  http://www.opensips-solutions.com
OpenSIPS Summit 2018
  http://www.opensips.org/events/Summit-2018Amsterdam

On 02/14/2018 08:51 AM, Pasan Meemaduma via Users wrote:

Hi List,

I got another issue where opensips issue a warning I'm trying to load 
a uuid from a postgres database as opensips doesn't have a built-in 
function to generate a uuid. How do I get rid of this warning ?



WARNING:db_postgres:db_postgres_get_columns: unhandled data type 
column (uuid_generate_v1mc) type id (2950), use DB_STRING as default


Its caused by following line in my config

avp_db_query("SELECT uuid_generate_v1mc()","$avp(callid)");


does this mean I need to convert it to string before returning from 
postgres via the sql I use ?




___
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