Solved ODBC Directory search not workin

Discussion in '3CX Phone System - General' started by sanketgroup, Dec 4, 2015.

Thread Status:
Not open for further replies.
  1. sanketgroup

    Joined:
    Jun 28, 2012
    Messages:
    97
    Likes Received:
    0
    Hello
    I am running v14 sp2.

    I was trying to setup MSSQL ODBC directory search.

    I set DSN on PC where 3cx is installed.
    I used 3cx ODBC connection test tool found on http://www.3cx.com/docs/odbc-search-phonebook-directory/
    Tool shows me everything perfect.
    And same setting made in 3cx server > Directory Search > ODBC

    But no clients are getting search result and just getting regular caller id.

    I was monitoring SQL server if any query coming from 3cx. But there was none except query which came from test tool.
    Pls help me to solve this.

    Thanx
     
  2. wtrbhe

    Joined:
    Oct 9, 2015
    Messages:
    22
    Likes Received:
    0
    Hi,
    we have the same problem since the update to V14 SP1, and SP2 also did not fix it. With 12.5 everything worked fine.
    The log - file for directory search (3CXCompanyDirectory.trace) could not be found anymore.
     
  3. andreaschr

    Joined:
    Oct 26, 2015
    Messages:
    91
    Likes Received:
    6
    Hi ,

    In case of MSSQL database you will have to specify a connection string including user and password of the database. To do so, go in Settings / Advanced / Company Directory Sync / ODBC Search / DSN Name should be : uid=USER;pwd=PASS;


    If this fix the issue let me know
     
  4. wtrbhe

    Joined:
    Oct 9, 2015
    Messages:
    22
    Likes Received:
    0
    I tried this now too, but it didn't help.

    To check, what the system is doing, i've activated ODBC tracing at the pbx - server. It looks like the ODBC connector is not active: if i use the odbc-test-tool to check connectivity i see a lot of entrys in log file, but when i get a call from outside with an unknown number the ODBC connection is not triggered.
    I've checked it with LDAP too and this is working fine.
     
  5. andreaschr

    Joined:
    Oct 26, 2015
    Messages:
    91
    Likes Received:
    6
    Hi ,
    If you have not configured LDAP Directory Search, you need to check the box in order for ODBC queries to be carried out.
    Can you please attached screenshot of your ODBC configuration and a screenshot of ODBC connection test tool with results so i can help you farther ?
     
  6. sanketgroup

    Joined:
    Jun 28, 2012
    Messages:
    97
    Likes Received:
    0
    Hello
    attached is screenshot as you required.

    Thanx
     

    Attached Files:

    • 3cx.jpg
      3cx.jpg
      File size:
      137.3 KB
      Views:
      2,333
  7. wtrbhe

    Joined:
    Oct 9, 2015
    Messages:
    22
    Likes Received:
    0
    I've tried it:
    - with LDAP configured
    - without any LDAP settings
    - with an LDAP-Dummy-Connection
    Every test with and without "...prefer ODBC results over LDAP..." checked.

    The query string is
    SELECT * FROM Person where adrOfficePhoneNumber like '%%number%%' or adrCellPhoneNumber like '%%number%%'
     

    Attached Files:

  8. andreaschr

    Joined:
    Oct 26, 2015
    Messages:
    91
    Likes Received:
    6
    Hi all ,

    sanketgroup

    As i can see from the screenshot

    You didn't configure any DB column Number you should configure the correct number to each one .
    Also attached a screenshot of ODBC connection test tool .

    wtrbhe

    Try on DSN like this mtp;uid=USER;pwd=PASS; replace the USER and PASS with your Credential
    The screenshot of ODBC connection test tool wasn't clear i cloudend see all the tables but column 7 you set as First Name is adrFin.. with value MAX is this correct ?
     
  9. sanketgroup

    Joined:
    Jun 28, 2012
    Messages:
    97
    Likes Received:
    0
    I did try with column number, but i does not work.
    I have attached both screenshots.
    As said first, Tool can detect name successfully but not 3cx server.
     

    Attached Files:

  10. wtrbhe

    Joined:
    Oct 9, 2015
    Messages:
    22
    Likes Received:
    0
    Hi andreaschr,
    the table has more than 80 columns, so unpossible to get a screenshot of all. The field 7 is adrFirstName and my test-user has the first name Max, last name Mustermann found in column 9 and phone number in c 28.

    I've already tried it with the explained string for DSN with our credentials, same result, works fine in test-tool, does nothing in main system.

    The exact same settings worked in V12.5 without any problems.
     
  11. andreaschr

    Joined:
    Oct 26, 2015
    Messages:
    91
    Likes Received:
    6
    Hi ,

    sanketgroup

    Check that you have enabled the Resolved caller ID from
    From Management Console -> Settings -> Company Phonebook -> Phonebook Option.

    wtrbhe

    Can you check and post the logs from CallHistoryService.log , what is the error so we can investigate further ?
    The logs you can find them in this folder %ProgramData%\3CX\Instance1\Data\Logs
     
  12. wtrbhe

    Joined:
    Oct 9, 2015
    Messages:
    22
    Likes Received:
    0
    Hi andreaschr,

    first - thanks for trying to help.


    The log contains many lines like this:
    2015/12/09 11:57:10.033|1976|0013|Erro|Targeting segment is not found for target 754b441b4d3f


    And a few times a block with these massages, think this happens on reboot ...

    2015/12/08 07:57:18.321|20996|0012|Erro|An error occurred while stopping object model manager
    2015/12/08 07:57:18.340|20996|0012|Warn|TCX.Configuration.Exceptions.PhoneSystemException: Config server is not connected
    bei TCX.Configuration.PhoneSystem.Connect()
    bei TCX.Configuration.PhoneSystem.get_Root()
    bei CallHistoryService.OtherTasks.ObjModelTasks.ObjModelManager.Stop()
    2015/12/08 07:57:18.516|20996|0012|Warn|TCX.Configuration.Exceptions.PhoneSystemException: Config server is not connected
    bei TCX.Configuration.PhoneSystem.Connect()
    bei TCX.Configuration.PhoneSystem.get_Root()
    bei CompanyDirectoryService.ConnectorService.Stop()
    bei OptionalServicesLib.CompositeOptionalService.Stop()
    2015/12/08 07:57:18.543|20996|0012|Warn|System.InvalidOperationException: UpdatePendingStatus kann nur während der Verarbeitung von Befehlen zum Starten, Beenden, Anhalten und Fortsetzen aufgerufen werden.
    bei System.ServiceProcess.ServiceBase.RequestAdditionalTime(Int32 milliseconds)
    bei CallHistoryService.Service1.OnStop()
    ------------|Inf(00)| Date: 08.12.2015 07:57:52
     
  13. andreaschr

    Joined:
    Oct 26, 2015
    Messages:
    91
    Likes Received:
    6
    Hi wtrbhe,

    This Logs do not have anything to do with the ODBC.
    Set the logs to Verbose restarted the services make a call from a number that you have in the MSSQL and answer. then you will have the correct logs .

    We will make it work do not worry. :D
     
  14. sanketgroup

    Joined:
    Jun 28, 2012
    Messages:
    97
    Likes Received:
    0
    Hi andreaschr
    "Resolved caller ID" is set to on, but still it does not search and show anything.

    Thanx
     
  15. andreaschr

    Joined:
    Oct 26, 2015
    Messages:
    91
    Likes Received:
    6
    Hi sanketgroup,

    Can you also provide some logs

    Set the logs to Verbose restarted the services make a call from a number that you have in the MSSQL and answer.
    The logs you can find them in this folder %ProgramData%\3CX\Instance1\Data\Logs CallHistoryService.log
     
  16. sanketgroup

    Joined:
    Jun 28, 2012
    Messages:
    97
    Likes Received:
    0
    In CallHistoryService.log file all i can see is:

    2015/12/09 19:01:52.423|3008|0013|Erro|Targeting segment is not found for target 8138a006f83d
    2015/12/09 19:01:52.950|3008|0013|Erro|Targeting segment is not found for target 86548638100b
    2015/12/09 19:01:59.991|3008|0013|Erro|Targeting segment is not found for target a532bf5b6c75
    2015/12/09 19:02:11.922|3008|0013|Erro|Targeting segment is not found for target 4305db04702c

    All errors in this are similar except last characters are different.
     
  17. wtrbhe

    Joined:
    Oct 9, 2015
    Messages:
    22
    Likes Received:
    0
    The system is running with verbose logging, since the date of install.

    I've made over 40 test-calls the last two days, everytime the 1st call was answered and then did a 2nd call to see if the contact will be resolved.
    During the tests, i set the "test-number" to an contact stored in an LDAP directory, configured LDAP sync, made the two test-calls. On 1st call display showed number, i answered and on 2nd call display showed contact name, as it should be.

    Again, with activated ODBC-Logging on pbx server you can see, that the pbx is doing nothing on odbc interface. Using test-tool everything appears in log ...

    CallHistoryService.log is attached
     

    Attached Files:

  18. wtrbhe

    Joined:
    Oct 9, 2015
    Messages:
    22
    Likes Received:
    0
    Hi Andreas,

    thanks for the great help.

    Benjamin
     
  19. sanketgroup

    Joined:
    Jun 28, 2012
    Messages:
    97
    Likes Received:
    0
    Thanx Andreas...
    appreciate your help...
     
  20. rodin1

    Joined:
    Apr 29, 2009
    Messages:
    11
    Likes Received:
    0
    Hi there,

    What was the fix for this? I believe I am having the same issue.
     
Thread Status:
Not open for further replies.