Project

General

Profile

Actions

Support #39

closed

Unidentified LDAP request of Fanvil X3U

Added by Jörg Ebeling over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
07/28/2021
Due date:
% Done:

100%

Estimated time:
6:00 h (Total: 12:00 h)

Description

Fanvil X3U (FW: 2.4.6) does an initial but unidentified LDAP request:

ldapsearch -P 3 -h 192.168.xxx.xxx -p 1389 -b "dc=xxx, dc=local" -s one -l 60 -LLL -N -D "cn=phone" -w xxx > /tmp/2751005888.ldif

At the moment L2CPBG answers with an exceptional response (identified by the uncommon search scope "one" @ filter.go).
In general it work, but the Fanvil debug log shows a couple of unidentified errors which might happen due to the response trick.

I've the assumption that Fanvil has some kind of phonebook- group feature for which this initial request was made (i.e. ou=group?).

See #38-8
Find some kind of Fanvil LDAP sample LDIF


Files

PhoneGroup.jpg (451 KB) PhoneGroup.jpg Markus Jessl, 07/23/2021 06:24 AM
l2cpbg_0.9.3FanvilDebug1_windows-64bit.zip (9.69 MB) l2cpbg_0.9.3FanvilDebug1_windows-64bit.zip Jörg Ebeling, 08/18/2021 11:39 PM
l2cpbg_0.9.3FanvilDebug.txt (223 KB) l2cpbg_0.9.3FanvilDebug.txt Markus Jessl, 08/19/2021 07:00 AM
l2cpbg_0.9.3beta3_windows-64bit.zip (9.69 MB) l2cpbg_0.9.3beta3_windows-64bit.zip Jörg Ebeling, 08/20/2021 11:03 PM
l2cpbg_0.9.3beta3Debug.txt (256 KB) l2cpbg_0.9.3beta3Debug.txt Markus Jessl, 08/24/2021 05:21 AM
l2cpbg_0.9.3beta4_windows-64bit.zip (9.71 MB) l2cpbg_0.9.3beta4_windows-64bit.zip Jörg Ebeling, 08/30/2021 12:41 AM
image001.png (49.6 KB) image001.png Markus Jessl, 08/30/2021 07:01 AM
image002.png (39.4 KB) image002.png Markus Jessl, 08/30/2021 07:02 AM
image001.png (49.6 KB) image001.png Markus Jessl, 08/30/2021 07:56 AM
image002.png (39.4 KB) image002.png Markus Jessl, 08/30/2021 07:56 AM
l2cpbg_0.9.3beta5_windows-64bit.zip (9.71 MB) l2cpbg_0.9.3beta5_windows-64bit.zip Jörg Ebeling, 08/30/2021 11:48 PM

Subtasks 2 (0 open2 closed)

Feature #40: Need to store addressbook in DBClosedJörg Ebeling07/28/2021

Actions
Feature #46: LDAP resolver restructurationClosedJörg Ebeling08/25/2021

Actions

Related issues 1 (0 open1 closed)

Copied from Bug #38: "No attributes" error with Fanvil X3UClosedJörg Ebeling07/20/202107/21/2021

Actions
Actions #1

Updated by Jörg Ebeling over 2 years ago

  • Copied from Bug #38: "No attributes" error with Fanvil X3U added
Actions #2

Updated by Markus Jessl over 2 years ago

Hi Joerg,

there is a Fanvil LDAP setup guide made public by Fanvil in 2018:

https://www.fanvil.com/Uploads/Temp/download/20191219/5dfb106241ad5.pdf

Maybe it will help you on this.

Cheers,

Markus

Actions #3

Updated by Markus Jessl over 2 years ago

Regarding the group feature, the attached screenshot (PhoneGroup.jpg) shows you the related screen in the phone entry details.

Actions #4

Updated by Jörg Ebeling over 2 years ago

Hi Markus!

Thanks a lot for the document and the image!

After a quick view into the document, it look like my assumption was right and the phone tries to gather the LDAP "ou" attribute(s) = Fanvil "Branches/Group" from the LDAP tree.
Need to check my source code, but I think before doing some kind of workaround, best would be to implement the storage of the AddressBook-Name to the internal DB, so that the AddressBook-Name can be used as "ou" subtree return.

Actions #5

Updated by Jörg Ebeling over 2 years ago

  • Target version set to 0.9.3
Actions #8

Updated by Jörg Ebeling over 2 years ago

Hi Markus!

Hope you're well.

Think I've identified the first unidentified LDAP request Fanvil does.
I build a debug version in which this initial request get responded with a static ("Group A" & "Group B") response.
I guess the phone will not show any useful, but I'm interested in the phones debug log and hope to see that this initial request don't run on an error anymore, as well I'm interested in the next ldapsearch the phone will do.

Would be very helpful if you're able to test it!!

Cya

Jörg

Actions #9

Updated by Markus Jessl over 2 years ago

Hi Joerg,

thx a lot for your efforts.

Find attached the log file (containing both logs).

Just FYI:
Before I opened the LDAP addressbook on the phone I called a test number (10000) and I saw in the logs that this also triggers a LDAP request.

Happy debugging.

Cheers,

Markus

Actions #11

Updated by Jörg Ebeling over 2 years ago

Hi Markus.

Quite cool! Thanks a lot for the quick debug log.
Look better now. The relevant errors are gone. The remaining errors happen due to my unrelated static response.
Think I understand now what Fanvil is doing/requesting there. Will need to implement some DB adaptions as well as correct some LDAP responses (which are not RFC conform now).

Regarding your test number 10000:
Yes, it's the reverse lookup some phones do (more or less comfortable). It's a very handy feature I often use on my Yealink. Simply enter some numbers I recognize, will show all the contacts which match. Yealink does this 1 second after each typed number. Very comfortable and much quicker then entering letters!

Actions #12

Updated by Jörg Ebeling over 2 years ago

Hi Markus!

think it's solved now.

The special initial Fanvil "AddressBook" request should be responded now correctly, as well as the contacts should get send now within the right LDAP context (ou=<address book>).

Please be so kind and make another test.
In principle, it should work as before (you probably get now an extra "AddressBook Name" selection). But at least, you should now see a group value which I expect should be the CardDAV addressbook name (within the contact details).

(the evaluation license from #42 should also work with this version)

Thanks a lot for your ongoing support!!

Actions #13

Updated by Markus Jessl over 2 years ago

Hi Joerg,

Thx a lot.

I will do some testing beginning of next week (a bit busy at the moment).

Is it now possible to configure which address book should be shown on the phone (any changes to the phones LDAP settings)?
If yes, please kindly advise as I then would like to load 2 address books with L2CPBG from my CardDAV server but each connected phone should get only its related address book.

Thx again.

Cheers,

Markus

Actions #14

Updated by Jörg Ebeling over 2 years ago

Hi Markus!

Don't hurry, test it whenever you've some free time.

Good question regarding the AddressBooks!
Well, in general the 0.9.3beta3 mainly shall response in the correct way as Fanvil requets. Including the AddressBook-Name, which I guess get shown by Fanvil as "Group".
Not more!! And no config change required.
But for sure, you're right, having now the AddressBook-Name, it should also be possible to use it for selection.
I'll do some tests... and give feedback.

Actions #15

Updated by Jörg Ebeling over 2 years ago

  • Status changed from Resolved to In Progress
  • % Done changed from 100 to 80

Hi Markus.

LDAP AddressBook selection does not work in the current beta.

Will implement it in that way, that you're able to select the addressbook by selecting it within your phones config like the following sample:

Your L2CPBG is configured i.e. with

[ldap]
  base = "dc=xxx, dc=local"

and will load the CardDAV addressbooks "Company" and "Private" from your CardDAV server.

Then the contacts get stored within "ou=Company, dc=xxx, dc=local" and "ou=Private, dc=xxx, dc=local" so that you can select the interested on within your Fanvil's LDAP Setting within "Search Base".

Will that solve your request?
For sure, by this you can choose only one or all addressbooks per phone, but in my long-term-vision I've a couple of more complex configuration scenarios which will (hopefully) also solve this limitation ;-)

Cheers

Jörg

Actions #16

Updated by Markus Jessl over 2 years ago

Hi Joerg,

Will that solve your request?
Yes, it will :) One address book per phone is all I need.

Will try to do the testing of "0.9.3beta3" as soon as I can.

PS: Please kindly send me a PM/EMail as I want to buy a 3 phone license from you.

Thanks & Cheers,

Markus

Actions #17

Updated by Jörg Ebeling over 2 years ago

  • % Done changed from 80 to 50

Hi Markus!

Quite cool that it would solve your requirement!

In between I already got it running with the "ou=<addressbook name>" selection, so in general it will work. But tonight I decided that I'm not fine with it... to much quirky exceptions, I'll rewrite the whole result-handling stuff (will take a couple of hours) before further testing on your side.

Quite cool that you're interested in a license. The new price-matrix is already published in the News file within the beta3 package. I'll PM you once the just mentioned rewrite is done and everything is working as expected on your phones.

Kind regards

Jörg

Actions #18

Updated by Markus Jessl over 2 years ago

Hi Joerg,

I did some testing with the "0.9.3beta3" version. See the logs attached.
The Group field on the Fanvil phone display for the address book entries showed nothing (was just empty).

By the way, I couldn't find the "News" file within the beta3 package ;).

Just FYI:
I also tested the Fanvil X7C and X210 with version "0.9.2". Working fine as well (beside the things you are working on right now).

Cheers,

Markus

Actions #19

Updated by Jörg Ebeling over 2 years ago

  • % Done changed from 50 to 60

Hi Markus!

Thanks a lot for further testing!
Unfortunately Fanvil still miss something from my L2CPBG responses:

E/vcore.pfm.contact | contactSearchByPage: sDbSearch error ''.
E/vcore.pfm.contact | getGroupIdByContactId: contactSearch CONTACT_SEARCH_CONTACT_ID_TO_GROUP_ID error.
D/vcore.pfm.contact | getContactInfo: getGroupIdByContactId error.
D/vcore.pfm.contact | getContactInfoByIndex: sdb is not local contact
D/sdevldapPhoneBook | sdevldapPhoneBookGetRow: current=[1]
D/vcore.pfm.contact | getContactInfo: line=[-1]
D/sdevldapPhoneBook | sdevldapPhoneBookSearch: url=[ldap://192.168.xxx.xxx:1389/dc=xxx, dc=local].
W/vcore.pfm.contact | pfmFreeSubSearchInfo: param error

I'll do some further evaluation once I'm done with my "result code" rewrite.

Quite cool info that you also successfully tested the Fanvil X7C and X210 Models!! Will put them on the "tested" list.
I'm vancy with the X210 because it has H.264 support.
Also thinking about to buy one if I struggle longer with the Group-Error... but it also depends on another project with video-doorbell integration. So for the time being I'll bother you with debug logs ;-)

Regarding the missing News file:
I'm sorry, you're right, my fault!! It's my internal "News" notice which get placed on the website once I'm done. Forgot that :-(. Here's the relevant part:

License change

Now that L2CPBG become more and more usable, it got necessary to ensure that the free version get only used by private persons and not by companies or professionals. That's why I limited the "Free" version also to 2 phones (LDAP clients) as well as a max. of 100 contacts.

Luckily I also got convinced that it would be more approriate (in special for smaller companies) to have a more fair price-matrix instead of a "one for all fee".

If you get hit by the new limitations of the free version, think about selling a license (also to support further development). Here's the price matrix:

Version max. phones 1 Version blaming in Phone Display max. LDAP requests/h max. phonebook entries 2 Gold features 3 Price/€ 4
Free 2 12 100 0,00
Max3 3 unlimited 500 29,00
Max5 5 unlimited 1000 49,00
Max10 10 unlimited 2000 79,00
Pro10 10 unlimited unlimited 149,00
Pro50 50 unlimited unlimited 299,00
Enterprise unlimited unlimited unlimited 499,00

Before deciding to buy a license, please ensure that L2CPBG work as expected with all your phones and your CardDAV server. If you can't test it because of the free limitations, or any other reason, don't hesitate to ask for a 60 day evaluation license. Simply drop me a mail to with your real name.

  1. Every device/phone which successful login to L2CPBG, lock a phone-slot (via IP) for 8 hours

  2. In real, the number of imported CardDAV contacts get limited

  3. Gold features are: Multi-instance capability, ???

  4. Inkl. German VAT

Actions #20

Updated by Jörg Ebeling over 2 years ago

  • % Done changed from 60 to 80
Actions #21

Updated by Jörg Ebeling over 2 years ago

Hi Markus.

LDAP AddressBook selection does work now in this beta.

It's implement it in that way, that you're able to select the addressbook by selecting it within your phones config like the following sample:

Your L2CPBG is configured i.e. with

[ldap]
  base = "dc=xxx, dc=local"

and will load the CardDAV addressbooks "Company" and "Private" from your CardDAV server.

Then the contacts get stored within "ou=Company, dc=xxx, dc=local" and "ou=Private, dc=xxx, dc=local" so that you can select the interested one within your Fanvil's LDAP Setting within "Search Base".

Kind regards

Jörg

Updated by Markus Jessl over 2 years ago

Hi Joerg,

thx a lot.

I gave it a try (did not use any licence information in the conf file) but getting errors:


11:42:57 [TRC] [intern] FluxClients({'tcp', '192.168.xxx.xxx:59864'})

11:42:57 [DBG] [intern] Register client IP '192.168.xxx.xxx' (Port 59864)

11:42:57 [DBG] [server] Correlation Text '192.168.xxx.xxx:59864|2021-08-30 11:42:57.8279558 +0800 +08 m=+14.009002901|1' = 0x2e4bc6b5 = 2e4bc6b5

11:42:57 [INF] [server] Search request #1: (objectclass=*) from 192.168.xxx.xxx:59864 {2e4bc6b5}

11:42:57 [DBG] [server] Stats &ldap.Stats{Conns:1, Binds:1, Unbinds:0, Searches:1, statsMutex:sync.Mutex{state:0, sema:0x0}}

11:42:57 [DBG] [server] Search(searchReq ldap.SearchRequest{BaseDN:"ou=xxx.xxx@xxx.de, dc=xxx, dc=local", Scope:1, DerefAliases:0, SizeLimit:0, TimeLimit:60, TypesOnly:false, Filter:"(objectclass=*)", Attributes:[]string{}, Controls:[]ldap.Control{}}, ...

11:42:57 [DBG] [server] s.request.Filter '(objectclass=*)'

2021/08/30 11:42:57 handleSearchRequest error LDAP Result Code 80 "Other": Search(searchReq ldap.SearchRequest{BaseDN:"ou=xxx.xxx@xxx.de, dc=xxx, dc=local", Scope:1, DerefAliases:0, SizeLimit:0, TimeLimit:60, TypesOnly:false, Filter:"(objectclass=*)", Attributes:[]string{}, Controls:[]ldap.Control{}}, ...) failed with: Unhandled search scope 'Single Level' (cidsByFilter)

My address books are usually have email addresses as names as that's the way Synology Contacts imports them.

But I tried also with an address book without any @ sign. Didn't work either.

Thx for having a look.

BTW:
I’m having problems with your project site. Getting the attached error:

Cheers,

Markus

Actions #24

Updated by Jörg Ebeling over 2 years ago

Hi Markus!

Thanks for testing!

What the heck... there is it again, the unidentified request from Fanvil... but to be honest... I could have foreseen it... but haven't.
Shame on me ^ ^

It's implemented now in this new beta.

Actions #25

Updated by Jörg Ebeling over 2 years ago

Sorry, forget to answer to your other topics:

Special chars within the addressbook-name, should generally work because I (hopefully) handle them correctly. Your @ character should work.
Quotes, double-quotes and the comma (yes, the simple comma) are more problematic but should also get escaped correctly (except within CardDAV names, there's still an issue).

Thanks for the info about the fault on my project site. Restarted it. Please inform me if there are still issues.

Kind regards

Jörg

Actions #26

Updated by Markus Jessl over 2 years ago

Hi Joerg,

Thx a million. Working fine now with the beta5 version.

Great work.

So basically only the group feature is missing now, right ?

Cheers,

Markus

Actions #27

Updated by Jörg Ebeling over 2 years ago

  • % Done changed from 80 to 90

Hi Markus!

Quite cooool!! Thanks a lot for your patience!

Yes, basically the "group feature" is left to fix.
But since the last request-issue/beta, I'm unsure if my "group" assumption of the unidentified Fanvil request is right.

Hope to get my Fanvil X7C? this week. Then I'll do some more debugging with a real LDAP Server and monitor the request/responses with wireshark.

Happy phone-dialing ;-)

Jörg

Actions #28

Updated by Jörg Ebeling over 2 years ago

  • % Done changed from 90 to 100

Hi Markus!

I got my X7C, a couple of days ago and did some testing.

Unfortunately without succeed in identifying the device's logged "CONTACT_SEARCH_CONTACT_ID_TO_GROUP_ID" error.
I also installed a real LDAP server and filled it with sample data exactly as describe within Fanvil's LDAP docs and howto, but also get the same error.
So it doesn't look like a L2CPBG error for me, instead of it look like a general Fanvil LDAP issue.
Cause I've been really interested in supporting this "group" stuff, I tried to contact Fanvil regarding this issue, but haven't received any response till now.

Unfortunately some other stuff like H.264 also doesn't work like advertised/expected, as well as I'm unsatisfied with some other phone behavior (slow, buggy, ugly or useless error messages), I will send back the phone the next days ;-)

In my opinion, this ticket could be closed.

Okay?

Greetings

Jörg

Actions #29

Updated by Markus Jessl over 2 years ago

Hello Jörg,

No worries. Just go ahead and close the issue.

I assume the final 0.9.3 version will be out soon then.

Thx again,

Cheers,

Markus

Actions #30

Updated by Jörg Ebeling over 2 years ago

  • Status changed from In Progress to Closed
Actions

Also available in: Atom PDF

Go to top