[asterisk-users] Problem with odbc connector with cdr

2015-02-03 Thread Olli Heiskanen
Hello,

I'm stuck with getting cdr records stored in MySql database. I have a
working realtime environment and have verified that the db connection works
fine when used via res_config_mysql.conf. I'd appreciate Your help on how
to get the odbc connector working as I think there's something wrong with
its configuration.

The problem presented itself as an error when making a call that was
supposed to be stored in mysql cdr: Unable to retrieve database handle.
CDR failed.
This kept popping up every time I was trying to have a call be stored in my
mysql cdr table, and I traced the problem to the odbc connector, where my
knowhow is about to end.

One problem may be that odbcinst -j outputs wrong ini files, I believe I
need these to be under /etc/ instead of /usr/local/etc/, but I'm unsure
about how to change those permanently.

# odbcinst -j
unixODBC 2.3.2
DRIVERS: /usr/local/etc/odbcinst.ini
SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini
SQLULEN Size...: 4
SQLLEN Size: 4
SQLSETPOSIROW Size.: 2

Odbcinst does see the connection, it reads it from
/usr/local/etc/odbcinst.ini.
# odbcinst -q -d
[MySQL]

I tried copying my connection information onto those files listed above and
I'm not getting any errors in Asterisk logs when restarting Asterisk.
However:
# echo select 1 | isql -v MySQL
[IM002][unixODBC][Driver Manager]Data source name not found, and no default
driver specified
[ISQL]ERROR: Could not SQLConnect


Here's the contents of odbc.ini:

[MySQL-asterisk]
Description = MySQL Asterisk database
Trace = Off
TraceFile = stderr
Driver = MySQL
SERVER = serverip
USER = myuser
PASSWORD = mypass
PORT = 3306
DATABASE = asterisk

And odbcinst.ini:
[MySQL]
Description = ODBC for MySQL
Driver  = /usr/lib/libmyodbc5.so
Setup   = /usr/lib/libodbcmyS.so
Driver64= /usr/lib64/libmyodbc5.so
Setup64 = /usr/lib64/libodbcmyS.so
FileUsage   = 1

And here I hit a wall, how can I fix the configuration?


MySQL-asterisk is referred to in res_odbc.conf, whose label is referred to
in cdr_odbc.conf. When the odbc connector starts working, is this the
correct way to configure the cdr db connection in Asterisk?

Thanks,
Olli
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Problem with odbc connector with cdr

2015-02-03 Thread John Kiniston
I notice you have MySQL-asterisk as your definition in your odbc.ini but
you are trying to connect to simply 'MySQL' with your 'isql' command.

Does isql work with 'MySQL-asterisk' as the DSN instead of simply 'MySQL' ?

I have machines that use /etc/odbc.ini and machines that use
/usr/local/etc/odbc.ini depending on if I used a package to instal ODBC or
if I compiled ODBC myself.

On Tue, Feb 3, 2015 at 1:35 AM, Olli Heiskanen 
ohjelmistoarkkite...@gmail.com wrote:


 Hello,

 I'm stuck with getting cdr records stored in MySql database. I have a
 working realtime environment and have verified that the db connection works
 fine when used via res_config_mysql.conf. I'd appreciate Your help on how
 to get the odbc connector working as I think there's something wrong with
 its configuration.

 The problem presented itself as an error when making a call that was
 supposed to be stored in mysql cdr: Unable to retrieve database handle.
 CDR failed.
 This kept popping up every time I was trying to have a call be stored in
 my mysql cdr table, and I traced the problem to the odbc connector, where
 my knowhow is about to end.

 One problem may be that odbcinst -j outputs wrong ini files, I believe I
 need these to be under /etc/ instead of /usr/local/etc/, but I'm unsure
 about how to change those permanently.

 # odbcinst -j
 unixODBC 2.3.2
 DRIVERS: /usr/local/etc/odbcinst.ini
 SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
 FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
 USER DATA SOURCES..: /root/.odbc.ini
 SQLULEN Size...: 4
 SQLLEN Size: 4
 SQLSETPOSIROW Size.: 2

 Odbcinst does see the connection, it reads it from
 /usr/local/etc/odbcinst.ini.
 # odbcinst -q -d
 [MySQL]

 I tried copying my connection information onto those files listed above
 and I'm not getting any errors in Asterisk logs when restarting Asterisk.
 However:
 # echo select 1 | isql -v MySQL
 [IM002][unixODBC][Driver Manager]Data source name not found, and no
 default driver specified
 [ISQL]ERROR: Could not SQLConnect


 Here's the contents of odbc.ini:

 [MySQL-asterisk]
 Description = MySQL Asterisk database
 Trace = Off
 TraceFile = stderr
 Driver = MySQL
 SERVER = serverip
 USER = myuser
 PASSWORD = mypass
 PORT = 3306
 DATABASE = asterisk

 And odbcinst.ini:
 [MySQL]
 Description = ODBC for MySQL
 Driver  = /usr/lib/libmyodbc5.so
 Setup   = /usr/lib/libodbcmyS.so
 Driver64= /usr/lib64/libmyodbc5.so
 Setup64 = /usr/lib64/libodbcmyS.so
 FileUsage   = 1

 And here I hit a wall, how can I fix the configuration?


 MySQL-asterisk is referred to in res_odbc.conf, whose label is referred to
 in cdr_odbc.conf. When the odbc connector starts working, is this the
 correct way to configure the cdr db connection in Asterisk?

 Thanks,
 Olli

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

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




-- 
A human being should be able to change a diaper, plan an invasion, butcher
a hog, conn a ship, design a building, write a sonnet, balance accounts,
build a wall, set a bone, comfort the dying, take orders, give orders,
cooperate, act alone, solve equations, analyze a new problem, pitch manure,
program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
---Heinlein
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] any valid up-to-date info about Kamailio-Asterisk integration ?

2015-02-03 Thread Daniel-Constantin Mierla
From Kamailio point of view, the tutorial referred here
(http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb)
should be quite actual. As Matt said, we do have new features with more
recent releases 4.1.x and 4.2.x but the relevant parts in the relation
with Asterisk (authentication, registration, etc.) are more or less the
same.

If Asterisk preserved pretty much its old realtime mechanism and
database structure, then should be straightforward to adjust in case of
small changes.

I hope to get a new tutorial that uses latest Kamailio and Asterisk 13
in the near future, targeting to use ARI instead of database for making
the integration of the two applications.

Cheers,
Daniel

On 29/01/15 16:52, Matthew Jordan wrote:
 On Thu, Jan 29, 2015 at 2:43 AM, Kirill Marchuk 62...@mail.ru wrote:
 Hi all

  Have recently watched Matt Jordan's session on Kamailio World 2014

 On slides 26-29 of his presentation
 (http://www.kamailio.org/events/2014-KamailioWorld/day1/09-Matt.Jordan-Asterisk12-And-PJSIP.pdf)
 he speaks about a (completely new, for me at least) approach to build
 scalable telephony systems, using N instances of Kamailio and N instances of
 Asterisk

 Are there any whitepapers, howtos, implementation experience reports,
 whatever, available, that would describe such an approach in details and
 help some not-so-advanced admins to at least understand if is it what they
 need, or not exactly, or not at all ?

 We are planning to look closer at Kamailio (or any other proxy, like
 OpenSip) as a way to do both load-balancing and failover solutions, so that
 refusal of any Asterisk instance should have minimal possible effect on the
 overall system availability.
 The best documentation out there - that I'm personally aware of - is
 Daniel's guide on integrating Kamailio and Asterisk:

 http://kb.asipto.com/asterisk:realtime:kamailio-4.0.x-asterisk-11.3.0-astdb

 While there have been quite a few improvements made in Asterisk (and I
 imagine, Kamailio as well) since that was written, that guide would be
 a good starting point, regardless of the versions involved.

 A lot of questions howevere arise, like: what if one SIP user got REGISTERed
 at Server 1, and the other on Server 3, so how can they call one another ?
 There are many different ways of handling this.

 First, you have to ask yourself what you want Asterisk and Kamailio to
 do in your set up. Some sample questions:
 * Who acts as the registrar?
 * Who manages subscriptions?
 * Should each Asterisk server have a special purpose, or should they
 be treated as a generic pool of media servers?
 * Should Asterisk be involved in 'normal' calls (two-party, no media
 manipulation), or should it only be used when special services are
 needed?

 Your goal, in any scenario, should be to keep the Asterisk dialplan as
 simple as possible. That typically means not placing customer specific
 logic in the dialplan, but instead relying on func_odbc to pull
 customer specific information from a database.

  In later versions (such
 as Asterisk 13), you can remove much of the logic from the dialplan
 and use ARI to build custom media applications.

 But no, not a lot of this is written down yet.

 Also, outbound registrations can be done from one instance at a time, say
 it's done from Server1 for Trunk1, so how can users, that got authenticated
 at Server2, call thru that registration (Trunk1) ?
 If your Asterisk servers are sitting behind Kamailio, they should
 probably just be registering to their Kamailio instances. Again, if
 Kamailio is handling the registration, identification, and
 authentication, then you probably don't want Asterisk doing any of
 that. You would instead just have Asterisk trust that Kamailio is
 sending it the right calls, and have it handle them accordingly.

 Also, Kamailio itself has to be protected from failing, and probably even
 from overload...
 That's pretty standard stuff for Kamailio.

 Would be great to read something in-depth about that


-- 
Daniel-Constantin Mierla
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] Problem with odbc connector with cdr

2015-02-03 Thread Olli Heiskanen
Thanks John,

At first got an error using MySQL-asterisk, but then I removed /etc/ ini
files and used the DSN in /usr/local/etc/odbc.ini, that did the trick for
isql. I must have created the files /etc/ while following a guide online.
Nice!

After some meddling with the Asterisk conf files to have the correct values
I got the cdrs working, thanks dude!

cheers,
Olli






2015-02-03 18:04 GMT+02:00 John Kiniston johnkinis...@gmail.com:

 I notice you have MySQL-asterisk as your definition in your odbc.ini but
 you are trying to connect to simply 'MySQL' with your 'isql' command.

 Does isql work with 'MySQL-asterisk' as the DSN instead of simply 'MySQL' ?

 I have machines that use /etc/odbc.ini and machines that use
 /usr/local/etc/odbc.ini depending on if I used a package to instal ODBC or
 if I compiled ODBC myself.

 On Tue, Feb 3, 2015 at 1:35 AM, Olli Heiskanen 
 ohjelmistoarkkite...@gmail.com wrote:


 Hello,

 I'm stuck with getting cdr records stored in MySql database. I have a
 working realtime environment and have verified that the db connection works
 fine when used via res_config_mysql.conf. I'd appreciate Your help on how
 to get the odbc connector working as I think there's something wrong with
 its configuration.

 The problem presented itself as an error when making a call that was
 supposed to be stored in mysql cdr: Unable to retrieve database handle.
 CDR failed.
 This kept popping up every time I was trying to have a call be stored in
 my mysql cdr table, and I traced the problem to the odbc connector, where
 my knowhow is about to end.

 One problem may be that odbcinst -j outputs wrong ini files, I believe I
 need these to be under /etc/ instead of /usr/local/etc/, but I'm unsure
 about how to change those permanently.

 # odbcinst -j
 unixODBC 2.3.2
 DRIVERS: /usr/local/etc/odbcinst.ini
 SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
 FILE DATA SOURCES..: /usr/local/etc/ODBCDataSources
 USER DATA SOURCES..: /root/.odbc.ini
 SQLULEN Size...: 4
 SQLLEN Size: 4
 SQLSETPOSIROW Size.: 2

 Odbcinst does see the connection, it reads it from
 /usr/local/etc/odbcinst.ini.
 # odbcinst -q -d
 [MySQL]

 I tried copying my connection information onto those files listed above
 and I'm not getting any errors in Asterisk logs when restarting Asterisk.
 However:
 # echo select 1 | isql -v MySQL
 [IM002][unixODBC][Driver Manager]Data source name not found, and no
 default driver specified
 [ISQL]ERROR: Could not SQLConnect


 Here's the contents of odbc.ini:

 [MySQL-asterisk]
 Description = MySQL Asterisk database
 Trace = Off
 TraceFile = stderr
 Driver = MySQL
 SERVER = serverip
 USER = myuser
 PASSWORD = mypass
 PORT = 3306
 DATABASE = asterisk

 And odbcinst.ini:
 [MySQL]
 Description = ODBC for MySQL
 Driver  = /usr/lib/libmyodbc5.so
 Setup   = /usr/lib/libodbcmyS.so
 Driver64= /usr/lib64/libmyodbc5.so
 Setup64 = /usr/lib64/libodbcmyS.so
 FileUsage   = 1

 And here I hit a wall, how can I fix the configuration?


 MySQL-asterisk is referred to in res_odbc.conf, whose label is referred
 to in cdr_odbc.conf. When the odbc connector starts working, is this the
 correct way to configure the cdr db connection in Asterisk?

 Thanks,
 Olli

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

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




 --
 A human being should be able to change a diaper, plan an invasion, butcher
 a hog, conn a ship, design a building, write a sonnet, balance accounts,
 build a wall, set a bone, comfort the dying, take orders, give orders,
 cooperate, act alone, solve equations, analyze a new problem, pitch manure,
 program a computer, cook a tasty meal, fight efficiently, die gallantly.
 Specialization is for insects.
 ---Heinlein

 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

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

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

Re: [asterisk-users] Semi OT - LDAP multi-valued attributes support in SIP phones

2015-02-03 Thread Karsten Wemheuer
Hi Olivier,

Am Donnerstag, den 29.01.2015, 18:07 +0100 schrieb Olivier: 
 Hello,
 
 I've just started to look at LDAP in IP telephony.
 
 1. I've read parts of RFC2798 which defines inetOrgPerson class.
 I could find homePhone or telephoneNumber (multi-valued) attributes
 but nothing like phoneExtension.
 Did I miss something ?
 I not, what would you advise to store private extensions in LDAP db ?
 
 2. Several SIP phones can query LDAP databases.
 Have you met any success with such SIP phones and LDAP entries with
 two values for telephoneNumber ?
 In other words, is it required by SIP phone to only have one
 telephoneNumber or mobile attribute value per entry ?

it is some time ago that have looked at this kind of stuff... AFAIK most
phones have the possibility to define some sort of filters to select the
attribute(s). If I remember correctly the phones from Snom, Gigaset,
Tiptel and Yealink have a parameter to select attributes for name and
number.

HTH,

Karsten



-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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


Re: [asterisk-users] What conditions allow the use of dahdi native bridge?

2015-02-03 Thread Charles Wang
Hi all,

I found the answer about it.
First, I must turn off callwaiting  callwaitingcallerid from
chan_dahdi.conf.
Second, I can't add tTkK parameters after dial(related with DTMF).
Third, I can't add DYNAMIC_FEATURES before dial.

By this way, I can get Native Bridge.

Best regards,
Charles

2015-01-30 9:16 GMT+08:00 Charles Wang lazy.char...@gmail.com:

 Hi Richard,

 Thank you for your response. But after I remove the parameters of dial
 command (tTkK). The call was still not native bridge.
 Let me know if you have any suggestion.

 Best regards,
 Charles

 2015-01-30 0:34 GMT+08:00 Richard Mudgett rmudg...@digium.com:



 On Wed, Jan 28, 2015 at 8:27 PM, Charles Wang lazy.char...@gmail.com
 wrote:

 Hi all,

 I want to test the Native Bridge mode of DAHDI (FXS/FXO). I use asterisk
 11.14.2 and DAHDI 2.8.0.

 I try to set callwaiting = no AND callwaitingcallerid = no in
 chan_dahdi.conf.
 But I can't find native bridging information from CLI(opened debug mode
 in logger.conf). How can I test the dahdi_bridge in native bridge mode?

 I use normal dial command ex: Dial(DAHDI/2,30,tTkK) to dial from FXS1 to
 FXS2.

 Does anyone kind to help me solve it?


 Native bridging cannot happen if Asterisk has an interest in the audio
 stream.
 Remove the tTkK flags in the Dial command.

 Richard


 --
 _
 -- Bandwidth and Colocation Provided by http://www.api-digital.com --
 New to Asterisk? Join us for a live introductory webinar every Thurs:
http://www.asterisk.org/hello

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




 --
 Best Regards
 Charles




-- 
Best Regards
Charles
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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