Project

General

Profile

Fanvil Unterstuetzung/Support

Added by Markus Jessl over 2 years ago

Hello,

thx a lot for this great project.

I'm trying to get the following setup working with your latest code version (0.9.1) under Windows.

Phone: Fanvil X3U (FW: 2.4.6)
CardDav server: Synology Contacts (syncs with Google contacts)

I get your l2cpbg server successfully running and basically setup the phone according to the Yealink phone example.

However I get the following log error shown when the phone tries to get the contacts via ldap request:

Jul 20 18:53:34.683 [DEBU] [server] Correlation Text '192.168.xxx.xxx:32891|2021-07-20 18:53:34.683462 +0800 +08 m=+22.531731501|1' = 0xafb8d253 = afb8d253 Jul 20 18:53:34.695 [INFO] [server] Search request #1: (objectclass=*) from 192.168.xxx.xxx:32891 {afb8d253} Jul 20 18:53:34.702 [DEBU] [server] Stats &ldap.Stats{Conns:1, Binds:1, Unbinds:0, Searches:1, statsMutex:sync.Mutex{state:0, sema:0x0}} Jul 20 18:53:34.712 [ERRO] [server] No attributes (possibliy after cleanup of unconfigured ldap attribute mappings)! 2021/07/20 18:53:34 handleSearchRequest error LDAP Result Code 16 "No Such Attribute": No attributes (possibliy after cleanup of unconfigured ldap attribute mappings)!

Could you please kindly provide any advise.

Thx a lot.

Best Regards,

Markus


Replies (13)

RE: Fanvil Unterstuetzung/Support - Added by Jörg Ebeling over 2 years ago

Hi Markus,

thanks a lot for reporting your issue.

Looks like your phone request an LDAP Attribute which isn't defined in the L2CPBG config... which is uncommon, because I already defined a large set of generic LDAP attributes as default values.

Please be so kind and set L2CPBG's log level to debug:

[log]
level = debug

... restart L2CPBG and watch the log.
It should list missing attribute definitions as well as the ones requested by the Phone.
Don't hesitate to show your log result/failures here, before twiddling with the attribute definitions ;-) (I even guess your phone (is configured to) request an uncommon/wrong attribute(s)).

Extracting/saving a sample contact (with a dummy name and number) as VCF file from Synology might also helpful as I never tested Synology's CardDAV implementation (might also be that they use uncommon Card attributes).

BTW: In the next release there will be a "Service Manager" which will start L2CPBG in background as "service" so that there's no need anymore to start it in a Windows Terminal.

RE: Fanvil Unterstuetzung/Support - Added by Markus Jessl over 2 years ago

Hi Joerg,

thx for the fast reply.

I think your answer just overlapped with my issue update :).

As mentioned in my updated issue the debug log shows:

Jul 20 18:53:34.683 [DEBU] [server] Correlation Text '192.168.xxx.xxx:32891|2021-07-20 18:53:34.683462 +0800 +08 m=+22.531731501|1' = 0xafb8d253 = afb8d253 Jul 20 18:53:34.695 [INFO] [server] Search request #1: (objectclass=*) from 192.168.xxx.xxx:32891 {afb8d253} Jul 20 18:53:34.702 [DEBU] [server] Stats &ldap.Stats{Conns:1, Binds:1, Unbinds:0, Searches:1, statsMutex:sync.Mutex{state:0, sema:0x0}} Jul 20 18:53:34.712 [ERRO] [server] No attributes (possibliy after cleanup of unconfigured ldap attribute mappings)! 2021/07/20 18:53:34 handleSearchRequest error LDAP Result Code 16 "No Such Attribute": No attributes (possibliy after cleanup of unconfigured ldap attribute mappings)!

An exported vCard from the Synology Contact entry would look like this.

BEGIN:VCARD VERSION:3.0 FN:Test Lastname UID:18-people-c1268993292387415387 N:LastName;Test;;; BDAY:19550221 EMAIL;TYPE=work:t@test.de EMAIL;TYPE=work:t1@test.de TEL;TYPE=cell:+49 152 88888888 TEL;TYPE=work:+49 12345678 END:VCARD

Thx again.

Cheers,

Markus

PS: Bin auch Deutscher, schreibe aber in English falls noch andere das Problem haben ;).

RE: Fanvil Unterstuetzung/Support - Added by Jörg Ebeling over 2 years ago

Hi Markus!

Yes, you outperformed me during my last post :-)

Your Fanvil config looks good!

Also you VCARD look good!

I miss a log entry of the requested attributes in your listed log entries. Can you please try log level "trace"? If that shows the requested attributes?

The request which is logged "(objectclass=*)" look like a simple (overall) directory list request. Can you please try to do a name search (with any letter like "m" from which you know that you have it in your contacts (like "Mork vom Ork")?

Also, when deleting the database (after stopped L2CPBG and before the next start), the log should show a large list of the initial loaded contacts. Is there anything ugly logged?

PS: Sehr nett das Du Dir die Mühe machst in Englisch zu schreiben damit die anderen auch was von unserer Kommunikation haben ;-)!!

RE: Fanvil Unterstuetzung/Support - Added by Jörg Ebeling over 2 years ago

Hi Markus,

in between I checked some Fanvil Docs, everything look fine as you configured it.

I also found a solved feature request #20 from another user with a Fanvil X4.

So in general, it should work... or at least "has worked" (but please do not try the old version, instead of we'll find what's happen with the current one) ;-)

RE: Fanvil Unterstuetzung/Support - Added by Markus Jessl over 2 years ago

Hi Joerg,

here comes the trace log after deleting the DB + restarting and initial contact load:

Jul 20 19:38:29.311 [TRAC] [server] handler->Bind(bindDN='cn=phone', bindSimplePw='xxxxxx') Jul 20 19:38:29.323 [TRAC] [server] handler->Search(boundDN='cn=phone', searchReq ldap.SearchRequest{BaseDN:"dc=xxx, dc=local", Scope:1, DerefAliases:0, SizeLimit:0, TimeLimit:60, TypesOnly:false, Filter:"(objectclass=*)", Attributes:[]string{}, Controls:[]ldap.Control{}}, ...) Jul 20 19:38:29.344 [DEBU] [server] Correlation Text '192.168.xxx.xxx:53200|2021-07-20 19:38:29.3445838 +0800 +08 m=+129.081306801|1' = 0xd1fecefc = d1fecefc Jul 20 19:38:29.355 [INFO] [server] Search request #1: (objectclass=*) from 192.168.xxx.xxx:53200 {d1fecefc} Jul 20 19:38:29.365 [DEBU] [server] Stats &ldap.Stats{Conns:1, Binds:1, Unbinds:0, Searches:1, statsMutex:sync.Mutex{state:0, sema:0x0}} Jul 20 19:38:29.374 [TRAC] [server] Search(searchReq ldap.SearchRequest{BaseDN:"dc=xxx, dc=local", Scope:1, DerefAliases:0, SizeLimit:0, TimeLimit:60, TypesOnly:false, Filter:"(objectclass=*)", Attributes:[]string{}, Controls:[]ldap.Control{}}), ... Jul 20 19:38:29.392 [TRAC] [server] checkAttributes() Jul 20 19:38:29.398 [ERRO] [server] No attributes (possibliy after cleanup of unconfigured ldap attribute mappings)! 2021/07/20 19:38:29 handleSearchRequest error LDAP Result Code 16 "No Such Attribute": No attributes (possibliy after cleanup of unconfigured ldap attribute mappings)!

The initial contact load log part looked OK to me.

Thx.

RE: Fanvil Unterstuetzung/Support - Added by Jörg Ebeling over 2 years ago

Markus,

quite thanks for your quick help, and sorry for my wrong estimation that the debug log-level will show the interesting stuff.

Log-level "trace" did it! ;-) :

[TRAC] [server] handler->Search(boundDN='cn=phone', searchReq ldap.SearchRequest{BaseDN:"dc=xxx, dc=local", Scope:1, DerefAliases:0, SizeLimit:0, TimeLimit:60, TypesOnly:false, Filter:"(objectclass=*)", Attributes:[]string{}, ...)

Your phone does not ask in which attributes it's interested in "..., Attributes:[]string{}, ..." (an empty list/array) which result in my "No attributes" error message.

Could you please try to do a name search with any letter (and check the log if it list something else)?
As well as a reverse search in that way that you call your Fanvil phone (and also check the log if it list anything interesting)?

Do you know about Wireshark and how to capture an LDAP request? If not, don't try it, it's a animal :-)
(I can't believe that the phone doesn't ask in which attributes it's interested in)

Greetings
Jörg

RE: Fanvil Unterstuetzung/Support - Added by Markus Jessl over 2 years ago

Hi,

unfortunately I can't do a search as I can't access the LDAP contacts in the phones menu.

You might have a look at the end of the following older Fanvil document (page 58++) to see how the phone menu looks like.

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

Maybe that document helps you as well regarding the LDAP configuration fanvil is using in the doc.

However, I was able to turn on the debug log of the phone and it shows also the ldapsearch command:


D/xui.window | windowTaskCreate: ui receive EVT = EVT_KEY_RELEASE event code is 25
D/xui.winHdl | winDefaultHdl: ui handle EVT = EVT_KEY_RELEASE
D/xui.window | windowTaskCreate: ui receive EVT = EVT_WIN_INIT event code is 127
D/xui.winHdl | winDefaultHdl: ui handle EVT = EVT_WIN_INIT
I/vcore.cfm.request | setCallControllerState: set call control state=0, oldState=0

D/contactConfig | getLdapPhoneBookInfo: netPhoneBookName[ldapPBook1].
I/sdevldapPhoneBook | sdevldapPhoneBookOpen: server=[192.168.xxx.xxx]
I/sdevldapPhoneBook | isUrlInldapPhoneBook: cmp success.
D/sdevldapPhoneBook | ldapPhoneBookDataReset: url=[ldap://192.168.xxx.xxx/dc=xxx, dc=local], urlPos=[-1]

I/sdevldapPhoneBook | ldapPhoneBookDataReset: contact list size=[0]
D/platform.sdev.fs | Can not find suffix in * , use default *
D/platform.sdev.fs | sdevFsIoctl: fileName=[], filePath=[/tmp], fullPath=[/tmp/]!
D/platform.sdev.fs | sdevFsIoctl: fileName=[], filePath=[/tmp], fullPath=[/tmp/]!
D/platform.sdev.fs | get file [*] path success. filePath[/tmp]
D/vcore.contact.ldapparse | ldapFileReadLdif:ldapCmdString[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]

D/vcore.contact.ldapparse | ldapFileReadLdif: get ldif file size[0]

E/vcore.contact.ldapparse | ldapFileParse: ldapFileReadLdif error.
E/sdevldapPhoneBook | ldapPhoneBookDataReset: ldapPrase error.
E/sdevldapPhoneBook | sdevldapPhoneBookLoad: reset error
I/sdevldapPhoneBook | sdevldapPhoneBookClose: server=[192.168.xxx.xxx]
D/contactConfig | getLdapPhoneBookInfo: netPhoneBookName[ldapPBook1].
D/xui.window | windowTaskCreate: ui receive EVT = EVT_WIN_INIT event code is 42
I/UI_LOG | {winDestory widgets End End}

I/UI_LOG | winLdapContactCreate: widget link list has been established, return...

D/xui.winHdl | winDefaultHdl: ui handle EVT = EVT_WIN_INIT
I/vcore.cfm.request | setCallControllerState: set call control state=0, oldState=0

D/xui.window | windowTaskCreate: ui receive EVT = EVT_WIN_INIT event code is 127
D/xui.winHdl | winDefaultHdl: ui handle EVT = EVT_WIN_INIT
I/vcore.cfm.request | setCallControllerState: set call control state=0, oldState=0

D/xui.window | windowTaskCreate: ui receive EVT = EVT_WIN_INIT event code is 42
I/UI_LOG | {winDestory widgets End End}

I/UI_LOG | winLdapContactCreate: widget link list has been established, return...

D/xui.winHdl | winDefaultHdl: ui handle EVT = EVT_WIN_INIT
I/vcore.cfm.request | setCallControllerState: set call control state=0, oldState=0


I will most likely come back to you tomorrow as I'm currently located in Asia and it's soon bedtime :).
If you still want the WireShark capture, please kindly let me know and I can generate it tomorrow.

Thx again.

RE: Fanvil Unterstuetzung/Support - Added by Jörg Ebeling over 2 years ago

Hi Markus,

okay, thanks a lot!

Your phone debug help so far as it uses a known and replay-able "ldapsearch" command.

I'll do some debugging in the evening and will check the source-code if I can prefer some kind of "quick test hack" version, which skips my attribute checks.

Thanks for you patient and support!

Good night
Jörg

RE: Fanvil Unterstuetzung/Support - Added by Jörg Ebeling over 2 years ago

Dear Markus,

Fanvil is right, my Gateway response is wrong.

I opened ticket #38.

I plan to build a beta of 0.9.2 during this night, for you.
Will be published there #38.
I already placed you on the watch-list, so you get informed when any news happen.

Sorry for this bug!

Jörg

RE: Fanvil Unterstuetzung/Support - Added by Markus Jessl over 2 years ago

Hi Joerg,

thx a million for your great support.

I used the beta version and it generates the following output:

l2cpbg

09:10:39 [TRC] [server] handler->Bind(bindDN='cn=phone', bindSimplePw='xxx') 09:10:39 [TRC] [server] handler->Search(boundDN='cn=phone', searchReq ldap.SearchRequest{BaseDN:"dc=xxx, dc=local", Scope:1, DerefAliases:0, SizeLimit:0, TimeLimit:60, TypesOnly:false, Filter:"(objectclass=*)", Attributes:[]string{}, Controls:[]ldap.Control{}}, ...) 09:10:39 [DBG] [server] Correlation Text '192.168.xxx.xxx:56092|2021-07-21 09:10:39.8490228 +0800 +08 m=+15.227142501|1' = 0xc82adf4 = c82adf4 09:10:39 [INF] [server] Search request #1: (objectclass=*) from 192.168.xxx.xxx:56092 {c82adf4} 09:10:39 [DBG] [server] Stats &ldap.Stats{Conns:1, Binds:1, Unbinds:0, Searches:1, statsMutex:sync.Mutex{state:0, sema:0x0}} 09:10:39 [TRC] [server] Search(searchReq ldap.SearchRequest{BaseDN:"dc=xxx, dc=local", Scope:1, DerefAliases:0, SizeLimit:0, TimeLimit:60, TypesOnly:false, Filter:"(objectclass=*)", Attributes:[]string{}, Controls:[]ldap.Control{}}), ... 09:10:39 [TRC] [server] Search request without attributes. Preparing to returning all configured attributes = []string{"facsimileTelephoneNumber", "mail", "c", "homePhone", "l", "mobile", "postalAddress", "postalCode", "sn", "company", "department", "givenName", "cn", "street", "telephoneNumber"} 09:10:39 [DBG] [server] s.request.Filter '(objectclass=*)' 09:10:39 [TRC] [server] uidsByFilter(Description 'Present' = 'objectclass', Scope 1 (Single Level), 0 childs) 09:10:39 [TRC] [server] filterPresent(Description 'Present' = 'objectclass', uid = '', Scope 1 (Single Level), 0 childs) 09:10:39 [DBG] [server] filter &ber.Packet{ClassType:0x80, TagType:0x0, Tag:0x7, Value:interface {}(nil), ByteValue:[]uint8(nil), Data:(*bytes.Buffer)(0xc000116750), Children:[]*ber.Packet{}, Description:"Present"} 09:10:39 [TRC] [server] isFilterAttributeDefined('objectclass') 09:10:39 [TRC] [server] isAttributeDefined('objectclass') 09:10:39 [WRN] [server] Unconfigured LDAP attribute 'objectclass' requested. Add a [ldap.map.objectclass...] mapping to the config! 09:10:39 [ERR] [server] Unconfigured LDAP filter attribute 'objectclass'. Add a [ldap.map.objectclass...] mapping to the config! 2021/07/21 09:10:39 handleSearchRequest error LDAP Result Code 18 "Inappropriate Matching": Unconfigured LDAP filter attribute 'objectclass'. Add a [ldap.map.objectclass...] mapping to the config!

Fanvil

D/contactConfig | getLdapPhoneBookInfo: netPhoneBookName[ldapPBook1]. I/sdevldapPhoneBook | sdevldapPhoneBookOpen: server=[192.168.xxx.xxx] I/sdevldapPhoneBook | isUrlInldapPhoneBook: cmp success. D/sdevldapPhoneBook | ldapPhoneBookDataReset: url=[ldap://192.168.xxx.xxx:1389/dc=xxx, dc=local], urlPos=[-1] I/sdevldapPhoneBook | ldapPhoneBookDataReset: contact list size=[0] D/platform.sdev.fs | Can not find suffix in * , use default * D/platform.sdev.fs | sdevFsIoctl: fileName=[*], filePath=[/tmp], fullPath=[/tmp/*]! D/platform.sdev.fs | sdevFsIoctl: fileName=[*], filePath=[/tmp], fullPath=[/tmp/*]! D/platform.sdev.fs | get file [*] path success. filePath[/tmp] D/vcore.contact.ldapparse | ldapFileReadLdif:ldapCmdString[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] D/vcore.contact.ldapparse | ldapFileReadLdif: get ldif file size[0] E/vcore.contact.ldapparse | ldapFileParse: ldapFileReadLdif error. E/sdevldapPhoneBook | ldapPhoneBookDataReset: ldapPrase error. E/sdevldapPhoneBook | sdevldapPhoneBookLoad: reset error I/sdevldapPhoneBook | sdevldapPhoneBookClose: server=[192.168.xxx.xxx] D/contactConfig | getLdapPhoneBookInfo: netPhoneBookName[ldapPBook1].

Afterwards, I added in the phone's "LDAP Settings", to the fields "Name Attr" as well as "Display name" the ldap attribute "uid" and did another search.

l2cpbg

09:51:06 [TRC] [server] handler->Bind(bindDN='cn=phone', bindSimplePw='xxx') 09:51:06 [TRC] [server] handler->Search(boundDN='cn=phone', searchReq ldap.SearchRequest{BaseDN:"dc=xxx, dc=local", Scope:1, DerefAliases:0, SizeLimit:0, TimeLimit:60, TypesOnly:false, Filter:"(objectclass=*)", Attributes:[]string{}, Controls:[]ldap.Control{}}, ...) 09:51:06 [DBG] [server] Correlation Text '192.168.xxx.xxx:43275|2021-07-21 09:51:06.8470117 +0800 +08 m=+173.981493701|1' = 0xc5dceeb8 = c5dceeb8 09:51:06 [INF] [server] Search request #1: (objectclass=*) from 192.168.xxx.xxx:43275 {c5dceeb8} 09:51:06 [DBG] [server] Stats &ldap.Stats{Conns:1, Binds:1, Unbinds:0, Searches:1, statsMutex:sync.Mutex{state:0, sema:0x0}} 09:51:06 [TRC] [server] Search(searchReq ldap.SearchRequest{BaseDN:"dc=xxx, dc=local", Scope:1, DerefAliases:0, SizeLimit:0, TimeLimit:60, TypesOnly:false, Filter:"(objectclass=*)", Attributes:[]string{}, Controls:[]ldap.Control{}}), ... 09:51:06 [TRC] [server] Search request without attributes. Preparing to returning all configured attributes = []string{"company", "givenName", "homePhone", "postalAddress", "mobile", "sn", "telephoneNumber", "cn", "facsimileTelephoneNumber", "l", "mail", "c", "street", "department", "postalCode"} 09:51:06 [DBG] [server] s.request.Filter '(objectclass=*)' 09:51:06 [TRC] [server] uidsByFilter(Description 'Present' = 'objectclass', Scope 1 (Single Level), 0 childs) 09:51:06 [TRC] [server] filterPresent(Description 'Present' = 'objectclass', uid = '', Scope 1 (Single Level), 0 childs) 09:51:06 [DBG] [server] filter &ber.Packet{ClassType:0x80, TagType:0x0, Tag:0x7, Value:interface {}(nil), ByteValue:[]uint8(nil), Data:(*bytes.Buffer)(0xc0004a0000), Children:[]*ber.Packet{}, Description:"Present"} 09:51:06 [TRC] [server] isFilterAttributeDefined('objectclass') 09:51:06 [TRC] [server] isAttributeDefined('objectclass') 09:51:06 [WRN] [server] Unconfigured LDAP attribute 'objectclass' requested. Add a [ldap.map.objectclass...] mapping to the config! 09:51:06 [ERR] [server] Unconfigured LDAP filter attribute 'objectclass'. Add a [ldap.map.objectclass...] mapping to the config! 2021/07/21 09:51:06 handleSearchRequest error LDAP Result Code 18 "Inappropriate Matching": Unconfigured LDAP filter attribute 'objectclass'. Add a [ldap.map.objectclass...] mapping to the config!

Fanvil

D/contactConfig | getLdapPhoneBookInfo: netPhoneBookName[ldapPBook1]. I/sdevldapPhoneBook | sdevldapPhoneBookOpen: server=[192.168.xxx.xxx] I/sdevldapPhoneBook | isUrlInldapPhoneBook: cmp success. D/sdevldapPhoneBook | ldapPhoneBookDataReset: url=[ldap://192.168.xxx.xxx:1389/dc=xxx, dc=local], urlPos=[-1] I/sdevldapPhoneBook | ldapPhoneBookDataReset: contact list size=[0] D/platform.sdev.fs | Can not find suffix in *, use default * D/platform.sdev.fs | sdevFsIoctl: fileName=[*], filePath=[/tmp], fullPath=[/tmp/*]! D/platform.sdev.fs | sdevFsIoctl: fileName=[*], filePath=[/tmp], fullPath=[/tmp/*]! D/platform.sdev.fs | get file [*] path success. filePath[/tmp] D/vcore.contact.ldapparse | ldapFileReadLdif:ldapCmdString[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] D/vcore.contact.ldapparse | ldapFileReadLdif: get ldif file size[0] E/vcore.contact.ldapparse | ldapFileParse: ldapFileReadLdif error. E/sdevldapPhoneBook | ldapPhoneBookDataReset: ldapPrase error. E/sdevldapPhoneBook | sdevldapPhoneBookLoad: reset error I/sdevldapPhoneBook | sdevldapPhoneBookClose: server=[192.168.xxx.xxx] D/contactConfig | getLdapPhoneBookInfo: netPhoneBookName[ldapPBook1].

Thx again.

RE: Fanvil Unterstuetzung/Support - Added by Jörg Ebeling over 2 years ago

Hi Markus,

thanks a lot for your detailed debugging!

You did everything right, but my fix does not worked as expected/tested because it still response with an error.

I need to build you another fix/test beta.

Unfortunately I'm busy today, so it will take probably one or two days longer.

I'm sorry, not that great support when a fix doesn't work :-/

Greetings
Jörg

RE: Fanvil Unterstuetzung/Support - Added by Markus Jessl over 2 years ago

Hi Joerg,

don't worry. Take your time, it's not urgent on my side.

I'm planning some hardware upgrades end of the year (once I'm back in Germany) and will install 2 or 3 Fanvil X7C phones.
That's why I'm currently preparing and testing with my current Fanvil phone :).

Just FYI: I will open another help topic regarding some other question I have as well, but it's not urgent either.

I really appreciate your great support.

Cheers,

Markus

RE: Fanvil Unterstuetzung/Support - Added by Jörg Ebeling over 2 years ago

Hi Markus,

Markus Jessl wrote in RE: Fanvil Unterstuetzung/Support:

...
I'm planning some hardware upgrades end of the year (once I'm back in Germany) and will install 2 or 3 Fanvil X7C phones.
...

It fully look like the older Yealink SIP-T46 phone... which, by the way, has a very functional/practical phonebook support (at least T4x and T5x non-Android versions). You can immediately start using phonebook searches, with zero or one keys to press. I love to use these models!

    (1-13/13)
    Go to top