Yealink Forums
Prevent prefetching of remote phonebook - Printable Version

+- Yealink Forums (http://forum.yealink.com/forum)
+-- Forum: IP Phone Series (/forumdisplay.php?fid=4)
+--- Forum: Phone specific topic (/forumdisplay.php?fid=12)
+--- Thread: Prevent prefetching of remote phonebook (/showthread.php?tid=40520)



Prevent prefetching of remote phonebook - dmark - 01-13-2017 03:29 PM

Hello!

I try to implement a remote phonebook with server-side search function.

The initial remote phonebook XML looks like this:

Code:
<?xml version="1.0" encoding="utf-8"?>
<YealinkIPPhoneDirectory>
<Title>Firma</Title>
<DirectoryEntry><Name>Albertine</Name><Telephone>(714) 208-2992</Telephone></DirectoryEntry>
<DirectoryEntry><Name>Barrett</Name><Telephone>(670) 217-0290</Telephone></DirectoryEntry>
<DirectoryEntry><Name>Christine</Name><Telephone>(680) 360-3348</Telephone></DirectoryEntry>
<DirectoryEntry><Name>Jeramy</Name><Telephone>(302) 102-6431</Telephone></DirectoryEntry>
<DirectoryEntry><Name>Kristen</Name><Telephone>(719) 481-2889</Telephone></DirectoryEntry>
<DirectoryEntry><Name>Mohamed</Name><Telephone>(942) 849-9823</Telephone></DirectoryEntry>
<DirectoryEntry><Name>Nana</Name><Telephone>(423) 475-8404</Telephone></DirectoryEntry>
<SoftKeyItem><Name>0</Name><URL>http://pbx/phonebook.php?t=company&k=0</URL></SoftKeyItem>
<SoftKeyItem><Name>1</Name><URL>http://pbx/phonebook.php?t=company&k=1</URL></SoftKeyItem>
<SoftKeyItem><Name>2</Name><URL>http://pbx/phonebook.php?t=company&k=2</URL></SoftKeyItem>
<SoftKeyItem><Name>3</Name><URL>http://pbx/phonebook.php?t=company&k=3</URL></SoftKeyItem>
<SoftKeyItem><Name>4</Name><URL>http://pbx/phonebook.php?t=company&k=4</URL></SoftKeyItem>
<SoftKeyItem><Name>5</Name><URL>http://pbx/phonebook.php?t=company&k=5</URL></SoftKeyItem>
<SoftKeyItem><Name>6</Name><URL>http://pbx/phonebook.php?t=company&k=6</URL></SoftKeyItem>
<SoftKeyItem><Name>7</Name><URL>http://pbx/phonebook.php?t=company&k=7</URL></SoftKeyItem>
<SoftKeyItem><Name>8</Name><URL>http://pbx/phonebook.php?t=company&k=8</URL></SoftKeyItem>
<SoftKeyItem><Name>9</Name><URL>http://pbx/phonebook.php?t=company&k=9</URL></SoftKeyItem>
<SoftKeyItem><Name>*</Name><URL>http://pbx/phonebook.php?t=company&k=A</URL></SoftKeyItem>
<SoftKeyItem><Name>#</Name><URL>http://pbx/phonebook.php?t=company&k=</URL></SoftKeyItem>
</YealinkIPPhoneDirectory>
If the "k" parameter is empty, the phonebook.php makes a search like "select * from phonebook order by name". If it is not empty, for example k=6 the select is "select * from phonebook where name like (mno)* order by name" ("6" means the letters on key 6).

In the example above, after pressing key 6 the phonebook.php would only deliver Mohamed and Nana. And additionally a new list of SoftKey Items:
Code:
<SoftKeyItem><Name>0</Name><URL>http://pbx/phonebook.php?t=company&k=60</URL></SoftKeyItem>
<SoftKeyItem><Name>1</Name><URL>http://pbx/phonebook.php?t=company&k=61</URL></SoftKeyItem>
[...]
so further key presses would refine the search.

This schema works fine on Snom phones for years. The problem with Yealink T42G-T48G (and probably others) is: They make a prefetch of all found URLs within the XML phonebook. Which make the search function pretty useless...

Is there a way to disable this prefetching completely. The http request should only be sent when the user presses a key.

I already enabled "features.remote_phonebook.enter_update_enable" but this does not disable prefetching.


RE: Prevent prefetching of remote phonebook - Travis_Yealink - 01-17-2017 03:22 AM

(01-13-2017 03:29 PM)dmark Wrote:  Hello!

I try to implement a remote phonebook with server-side search function.

The initial remote phonebook XML looks like this:

Code:
<?xml version="1.0" encoding="utf-8"?>
<YealinkIPPhoneDirectory>
<Title>Firma</Title>
<DirectoryEntry><Name>Albertine</Name><Telephone>(714) 208-2992</Telephone></DirectoryEntry>
<DirectoryEntry><Name>Barrett</Name><Telephone>(670) 217-0290</Telephone></DirectoryEntry>
<DirectoryEntry><Name>Christine</Name><Telephone>(680) 360-3348</Telephone></DirectoryEntry>
<DirectoryEntry><Name>Jeramy</Name><Telephone>(302) 102-6431</Telephone></DirectoryEntry>
<DirectoryEntry><Name>Kristen</Name><Telephone>(719) 481-2889</Telephone></DirectoryEntry>
<DirectoryEntry><Name>Mohamed</Name><Telephone>(942) 849-9823</Telephone></DirectoryEntry>
<DirectoryEntry><Name>Nana</Name><Telephone>(423) 475-8404</Telephone></DirectoryEntry>
<SoftKeyItem><Name>0</Name><URL>http://pbx/phonebook.php?t=company&k=0</URL></SoftKeyItem>
<SoftKeyItem><Name>1</Name><URL>http://pbx/phonebook.php?t=company&k=1</URL></SoftKeyItem>
<SoftKeyItem><Name>2</Name><URL>http://pbx/phonebook.php?t=company&k=2</URL></SoftKeyItem>
<SoftKeyItem><Name>3</Name><URL>http://pbx/phonebook.php?t=company&k=3</URL></SoftKeyItem>
<SoftKeyItem><Name>4</Name><URL>http://pbx/phonebook.php?t=company&k=4</URL></SoftKeyItem>
<SoftKeyItem><Name>5</Name><URL>http://pbx/phonebook.php?t=company&k=5</URL></SoftKeyItem>
<SoftKeyItem><Name>6</Name><URL>http://pbx/phonebook.php?t=company&k=6</URL></SoftKeyItem>
<SoftKeyItem><Name>7</Name><URL>http://pbx/phonebook.php?t=company&k=7</URL></SoftKeyItem>
<SoftKeyItem><Name>8</Name><URL>http://pbx/phonebook.php?t=company&k=8</URL></SoftKeyItem>
<SoftKeyItem><Name>9</Name><URL>http://pbx/phonebook.php?t=company&k=9</URL></SoftKeyItem>
<SoftKeyItem><Name>*</Name><URL>http://pbx/phonebook.php?t=company&k=A</URL></SoftKeyItem>
<SoftKeyItem><Name>#</Name><URL>http://pbx/phonebook.php?t=company&k=</URL></SoftKeyItem>
</YealinkIPPhoneDirectory>
If the "k" parameter is empty, the phonebook.php makes a search like "select * from phonebook order by name". If it is not empty, for example k=6 the select is "select * from phonebook where name like (mno)* order by name" ("6" means the letters on key 6).

In the example above, after pressing key 6 the phonebook.php would only deliver Mohamed and Nana. And additionally a new list of SoftKey Items:
Code:
<SoftKeyItem><Name>0</Name><URL>http://pbx/phonebook.php?t=company&k=60</URL></SoftKeyItem>
<SoftKeyItem><Name>1</Name><URL>http://pbx/phonebook.php?t=company&k=61</URL></SoftKeyItem>
[...]
so further key presses would refine the search.

This schema works fine on Snom phones for years. The problem with Yealink T42G-T48G (and probably others) is: They make a prefetch of all found URLs within the XML phonebook. Which make the search function pretty useless...

Is there a way to disable this prefetching completely. The http request should only be sent when the user presses a key.

I already enabled "features.remote_phonebook.enter_update_enable" but this does not disable prefetching.


Hello,

Would you please give me some screenshots about "prefetching" issue you met?
I don't really understand what the exact issue you met since I don't have the test environment, actually, we just developed a better search method for remote phonebook.

If you can record a short video to me, that would be better, I will check if the new search method can meet your requirement.

Upload link as below:
http://ftp.yealink.com/?ShareToken=5A1863A97B0FA4BCF2C7776EBA0052112A708081

Regards
Travis


RE: Prevent prefetching of remote phonebook - dmark - 01-17-2017 11:35 AM

Hello Travis,

thank you for your answer. I sent you the requested video and additionally
- the Apache access.log when opening the remote phonebook. You can see a bunch of http requests within a few seconds.
- the "http-result-u_41.txt" shows the result of initially calling the remote phonebook for user "41" (parameter "u=41"). It is mainly the XML Menu with three URLs.
- the "http-result-u_41-t_imported.txt" shows the result of calling the "imported Company-wide Phonebook" (Parameters u=41&t=imported). There are the first 15 entries and the URLs for the SoftKeys to refine the search.

The problem is that the Yealink phones immediately start requesting all further HTTP URLs they find in a XML Menu or Directory.

Further Info: I try to implement Yealink support for the (mainly) german open source PBX "Gemeinschaft 3" (https://github.com/amooma/GS3). You can find the remote phonebook implementation for the Snom phones here:
https://github.com/amooma/GS3/blob/master/opt/gemeinschaft/htdocs/prov/snom/pb.php

I try to do something similar for Yealink so the User does not need to care about which phone he/she actually uses.


RE: Prevent prefetching of remote phonebook - Travis_Yealink - 01-19-2017 07:47 AM

(01-17-2017 11:35 AM)dmark Wrote:  Hello Travis,

thank you for your answer. I sent you the requested video and additionally
- the Apache access.log when opening the remote phonebook. You can see a bunch of http requests within a few seconds.
- the "http-result-u_41.txt" shows the result of initially calling the remote phonebook for user "41" (parameter "u=41"). It is mainly the XML Menu with three URLs.
- the "http-result-u_41-t_imported.txt" shows the result of calling the "imported Company-wide Phonebook" (Parameters u=41&t=imported). There are the first 15 entries and the URLs for the SoftKeys to refine the search.

The problem is that the Yealink phones immediately start requesting all further HTTP URLs they find in a XML Menu or Directory.

Further Info: I try to implement Yealink support for the (mainly) german open source PBX "Gemeinschaft 3" (https://github.com/amooma/GS3). You can find the remote phonebook implementation for the Snom phones here:
https://github.com/amooma/GS3/blob/master/opt/gemeinschaft/htdocs/prov/snom/pb.php

I try to do something similar for Yealink so the User does not need to care about which phone he/she actually uses.


Hello,

I met similar case before, the cause is the Yealink phone mechanism, that means it's designed so.

In our new V81 firmware, we have a better search function for remote phonebook.
1. please upgarde the firmware to 28.81.0.41, download link as below:
http://ftp.yealink.com/?ShareToken=482CAC54ACCF842FC78E9AFD8F4B29985C5BA9AC

2. After firmware upgrading, set below parameters via autoprovision:
remote_phonebook.super_search.enable = 1
directory.search_type = 1

3. delete softkey items on your remote phonebook file (ONLY contacts included), and then test the new search function.

The new method doesn't occupy much memory, and I already got good feedback from other customers. Wait for your test result.

Any misunderstanding, please let me know.

Regards
Travis


RE: Prevent prefetching of remote phonebook - dmark - 01-25-2017 06:03 PM

Hello Travis,

i flashed my T46G with your new firmware file 28.81.0.41 and also did the necessary changes in provisioning and phonebook.

Conclusion after a quick test: Your new "super search" works for me. On phones with older firmware i can use the "normal" search which requires a few more key presses.

I will do some more testing tomorrow...

When do you plan to release the *.41 firmware?

Regards,
Dirk


RE: Prevent prefetching of remote phonebook - Travis_Yealink - 02-04-2017 04:20 PM

(01-25-2017 06:03 PM)dmark Wrote:  Hello Travis,

i flashed my T46G with your new firmware file 28.81.0.41 and also did the necessary changes in provisioning and phonebook.

Conclusion after a quick test: Your new "super search" works for me. On phones with older firmware i can use the "normal" search which requires a few more key presses.

I will do some more testing tomorrow...

When do you plan to release the *.41 firmware?

Regards,
Dirk

Hi Dirk,

sorry for late, I just finished my holiday and back to office.

*.41 firmware is a special firmware, which we won't official release, but I think customer can use this firwmare safely.

Any question, freely to let me know.

Regards,
Travis


RE: Prevent prefetching of remote phonebook - dmark - 03-14-2017 09:13 AM

Hello Travis,

i saw that Yealink just released the firmware version x.81.0.70.

In the coreesponding release notes the "super search" feature is not mentioned. Can you tell me whether this feature is included in the new firmware or not?

Thanks in advance.

Regards,
Dirk


RE: Prevent prefetching of remote phonebook - Travis_Yealink - 03-14-2017 11:47 AM

(03-14-2017 09:13 AM)dmark Wrote:  Hello Travis,

i saw that Yealink just released the firmware version x.81.0.70.

In the coreesponding release notes the "super search" feature is not mentioned. Can you tell me whether this feature is included in the new firmware or not?

Thanks in advance.

Regards,
Dirk

Hi Dirk,

Sorry, as I told you, this function is for special request, and we didn't add it in general firmware.

Regards,
Travis


RE: Prevent prefetching of remote phonebook - dmark - 03-14-2017 12:07 PM

OK, then I misunderstood you. I thought that 28.81.0.41 was a beta firmware with the new feature included.

My initial question was not a "special request". I am working on support for Yealink IP phones for the (mainly german) Open-Source VoIP-PBX "Gemeinschaft 3" (as mentioned above). I think it would be great if Out-of-the-Box Yealink phones will work with that PBX. Actually you can use Yealink T42G, T46G and T48G with that PBX, but phonebook works completely different compared to other supported phone types. This ist the situation I tried to avoid...


RE: Prevent prefetching of remote phonebook - Travis_Yealink - 03-14-2017 12:45 PM

(03-14-2017 12:07 PM)dmark Wrote:  OK, then I misunderstood you. I thought that 28.81.0.41 was a beta firmware with the new feature included.

My initial question was not a "special request". I am working on support for Yealink IP phones for the (mainly german) Open-Source VoIP-PBX "Gemeinschaft 3" (as mentioned above). I think it would be great if Out-of-the-Box Yealink phones will work with that PBX. Actually you can use Yealink T42G, T46G and T48G with that PBX, but phonebook works completely different compared to other supported phone types. This ist the situation I tried to avoid...

Hi Dirk,

I know what you mean, but this phonebook method is not in the public use, and our develop team evaluated it first, and decided not to add it to general firmware. (for saving phone memory purpose)

However, x.81.0.41 is based on x.81.0.25(this is our general firmware version), and there is no doubt that .41 firmware is much better than .25, and I think you can recommend this version to your customers without any concern.

Regards,
Travis