Re: [asterisk-users] cdr_odbc.c:174 odbc_log: Unable to retrieve database handle. CDR failed.

2018-12-07 Thread hw

On 12/07/2018 03:08 PM, Joshua C. Colp wrote:

On Fri, Dec 7, 2018, at 9:54 AM, hw wrote:

On 12/07/2018 02:25 PM, Joshua C. Colp wrote:

On Fri, Dec 7, 2018, at 9:19 AM, hw wrote:


Hi,

is cdr logging using odbc buggy?  I'im only getting an error
"cdr_odbc.c:174 odbc_log: Unable to retrieve database handle.  CDR failed.".

Connecting with isql to the datasource given in cdr_odbc.conf works just
fine, and using the database for sippeers also works.


This message is output when the "dsn" value provided in cdr_odbc.conf does not 
match a dsn/class (context name) configured in res_odbc.conf

You should confirm they match and if still encountering a problem then provide 
the configuration.



Thanks, it's working now.  I've been using the name of the data source
rather than the name of the section.  It doesn't make any sense to call
it data source name (dsn) at places where the name of a section is expected.


The cdr_odbc module originates from 15 years ago, so it's unsurprising.


Is it not being used much?



It also doesn't make sense that the section name in res_odbc.conf should
be relevant here.  Resources (res) would be configuration information
--- the tables for this are created with alembic --- while logging
information is something else --- and the tables for it are not created
with alembic.


The resource module implements the interface to ODBC and provides/manages the 
connections. Other modules are consumers of it and thus reference it.


Then why doesn't alembic create the tables for logging as well as the 
ones for configuration information?



This could use a lot of cleanup and (or at least) much better documentation.


If you'd like to contribute documentation improvements they follow the same 
process as everything[1]. If there's wiki pages that could use improvement just 
leave a comment and after a few you'll be granted access to edit things.

[1] https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process


I would have improved a wiki page yesterday if there had been a way to 
do that.  Maybe if there were parts of the wiki for users to easily make 
comments, more users would contribute.  Who has the time and is willing 
to go through a lengthy contribution process which involves consulting 
lawyers to figure out if it is advisable to sign the license agreement 
after verifying if the agreement is even applicable in your country? 
Finding lawyers knowledgable in international copyright laws is a task 
in itself, and they're probably rather expensive ...  After that, you 
need to address privacy concerns that could be involved as well ...


I'm certainly not going to give my full name and address etc. just to 
improve a wiki page.  It's useless anyway because there's no way to 
verify if the information is true.


--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] cdr_odbc.c:174 odbc_log: Unable to retrieve database handle. CDR failed.

2018-12-07 Thread Joshua C. Colp
On Fri, Dec 7, 2018, at 9:54 AM, hw wrote:
> On 12/07/2018 02:25 PM, Joshua C. Colp wrote:
> > On Fri, Dec 7, 2018, at 9:19 AM, hw wrote:
> >>
> >> Hi,
> >>
> >> is cdr logging using odbc buggy?  I'im only getting an error
> >> "cdr_odbc.c:174 odbc_log: Unable to retrieve database handle.  CDR 
> >> failed.".
> >>
> >> Connecting with isql to the datasource given in cdr_odbc.conf works just
> >> fine, and using the database for sippeers also works.
> > 
> > This message is output when the "dsn" value provided in cdr_odbc.conf does 
> > not match a dsn/class (context name) configured in res_odbc.conf
> > 
> > You should confirm they match and if still encountering a problem then 
> > provide the configuration.
> > 
> 
> Thanks, it's working now.  I've been using the name of the data source 
> rather than the name of the section.  It doesn't make any sense to call 
> it data source name (dsn) at places where the name of a section is expected.

The cdr_odbc module originates from 15 years ago, so it's unsurprising.

> 
> It also doesn't make sense that the section name in res_odbc.conf should 
> be relevant here.  Resources (res) would be configuration information 
> --- the tables for this are created with alembic --- while logging 
> information is something else --- and the tables for it are not created 
> with alembic.

The resource module implements the interface to ODBC and provides/manages the 
connections. Other modules are consumers of it and thus reference it.
 
> 
> This could use a lot of cleanup and (or at least) much better documentation.

If you'd like to contribute documentation improvements they follow the same 
process as everything[1]. If there's wiki pages that could use improvement just 
leave a comment and after a few you'll be granted access to edit things.

[1] https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process

-- 
Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] cdr_odbc.c:174 odbc_log: Unable to retrieve database handle. CDR failed.

2018-12-07 Thread hw

On 12/07/2018 02:25 PM, Joshua C. Colp wrote:

On Fri, Dec 7, 2018, at 9:19 AM, hw wrote:


Hi,

is cdr logging using odbc buggy?  I'im only getting an error
"cdr_odbc.c:174 odbc_log: Unable to retrieve database handle.  CDR failed.".

Connecting with isql to the datasource given in cdr_odbc.conf works just
fine, and using the database for sippeers also works.


This message is output when the "dsn" value provided in cdr_odbc.conf does not 
match a dsn/class (context name) configured in res_odbc.conf

You should confirm they match and if still encountering a problem then provide 
the configuration.



Thanks, it's working now.  I've been using the name of the data source 
rather than the name of the section.  It doesn't make any sense to call 
it data source name (dsn) at places where the name of a section is expected.


It also doesn't make sense that the section name in res_odbc.conf should 
be relevant here.  Resources (res) would be configuration information 
--- the tables for this are created with alembic --- while logging 
information is something else --- and the tables for it are not created 
with alembic.



This could use a lot of cleanup and (or at least) much better documentation.

--
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
 https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] cdr_odbc.c:174 odbc_log: Unable to retrieve database handle. CDR failed.

2018-12-07 Thread Joshua C. Colp
On Fri, Dec 7, 2018, at 9:19 AM, hw wrote:
> 
> Hi,
> 
> is cdr logging using odbc buggy?  I'im only getting an error 
> "cdr_odbc.c:174 odbc_log: Unable to retrieve database handle.  CDR failed.".
> 
> Connecting with isql to the datasource given in cdr_odbc.conf works just 
> fine, and using the database for sippeers also works.

This message is output when the "dsn" value provided in cdr_odbc.conf does not 
match a dsn/class (context name) configured in res_odbc.conf

You should confirm they match and if still encountering a problem then provide 
the configuration.

-- 
Joshua C. Colp
Digium - A Sangoma Company | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - US
Check us out at: www.digium.com & www.asterisk.org

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users