Yealink Forums
Ni file name in POST URLs [Was: How exactly are -local.cfg files POSTed to server ?] - Printable Version

+- Yealink Forums (http://forum.yealink.com/forum)
+-- Forum: IP Phone Series (/forumdisplay.php?fid=4)
+--- Forum: Auto Provisioning (/forumdisplay.php?fid=14)
+--- Thread: Ni file name in POST URLs [Was: How exactly are -local.cfg files POSTed to server ?] (/showthread.php?tid=41679)



Ni file name in POST URLs [Was: How exactly are -local.cfg files POSTed to server ?] - oliv - 04-04-2018 08:55 AM

Hello,

I'm testing latest 66.83.0.10 firmware's local settings uploading.
My phone config includes:
static.auto_provision.server.url = http://192.168.64.250/yealink
static.auto_provision.custom.protect = 1
static.auto_provision.custom.sync = 1
static.auto_provision.custom.upload_method = 1
static.auto_provision.custom.sync.path = http://192.168.64.250/yealink

When a phone boots, it tries to download a <MAC>-local.cfg file with request (as printed in /var/log/apache2/access.log file) such as:

192.168.64.42 - - [04/Apr/2018:10:46:01 +0200] "GET /yealink/001565bffdfe-local.cfg HTTP/1.1" 200 228 "-" "Yealink SIP-T42S 66.83.0.10 00:15:65:bf:fd:fe"

When I change a setting using phone keyboard, I can see the sending a POST request such as :

192.168.64.42 - - [04/Apr/2018:10:46:01 +0200] "POST /yealink/ HTTP/1.1" 404 470 "-" "Yealink SIP-T42S 66.83.0.10 00:15:65:bf:fd:fe"

I would expect my phone to POST to the same /yealink/001565bffdfe-local.cfg URL.

Are my expectations correct ?
Can you upload a <MAC>-local.cfg file to a simple Apache2-enabled HTTP server or do you have to back this server with something else (PHP, ...) ?

Best regards


RE: Ni file name in POST URLs - Samuel_Yealink - 04-17-2018 02:52 AM

Hi Oliv,

Sorry for replying late, yes you are right, when you change the configuration, the changes will be posted to the same MAC-local.cfg file.

For auto provisioning, normally we can use a simple HTTP server, so your Apache-enabled HTTP server is OK.

KR
Samuel Wang


RE: Ni file name in POST URLs - oliv - 04-19-2018 01:16 PM

(04-17-2018 02:52 AM)Samuel_Yealink Wrote:  Hi Oliv,

Sorry for replying late, yes you are right, when you change the configuration, the changes will be posted to the same MAC-local.cfg file.

For auto provisioning, normally we can use a simple HTTP server, so your Apache-enabled HTTP server is OK.

KR
Samuel Wang
Thank you very much, Samuel, for replying.

So, would you say this is a bug and I should see, in my /var/log/apache2/access.log file something like:
192.168.64.42 - - [04/Apr/2018:10:46:01 +0200] "POST /yealink/001565bffdfe-local.cfg HTTP/1.1" 404 470 "-" "Yealink SIP-T42S 66.83.0.10 00:15:65:bf:fd:fe"

If positive, is there something more to be done, to have this issue tracked, and hopefully worked on ?

Best regards


RE: Ni file name in POST URLs - Samuel_Yealink - 04-20-2018 02:19 AM

Hi Oliv,

I don't think it is a bug, because it doesn't affect the phone from doing the auto provisioning. Indeed it is a good question why the log of the POST doesn't include the specific path, I will check this with R&D later.

The whole process of auto provisioning is as linked below,

http://download.support.yealink.com/download?path=upload%2Fattachment%2F2018-3-13%2F3%2F1e9d7d8b-91e6-47d5-840c-c45792319f5b%2FYealink%20SIP%20IP%20Phones%20Auto%20Provisioning%20Guide_V83_10.​pdf


RE: Ni file name in POST URLs - oliv - 04-20-2018 06:51 AM

(04-20-2018 02:19 AM)Samuel_Yealink Wrote:  I don't think it is a bug, because it doesn't affect the phone from doing the auto
Yes and no, Samuel.

As you may know, Apache2 server by itself, does not support PUT method. So, if I'm not mistaken, if you want save phones local settings on an Apache2-enabled provisioning server, you need phones to support saving local settings through POST method.

So, I would be very curious to ear about this from R&D or whoever is interested in this topic.


RE: Ni file name in POST URLs - oliv - 11-08-2018 12:37 PM

(04-20-2018 02:19 AM)Samuel_Yealink Wrote:  Hi Oliv,

I don't think it is a bug, because it doesn't affect the phone from doing the auto provisioning. Indeed it is a good question why the log of the POST doesn't include the specific path, I will check this with R&D later.

The whole process of auto provisioning is as linked below,

http://download.support.yealink.com/download?path=upload%2Fattachment%2F2018-3-13%2F3%2F1e9d7d8b-91e6-47d5-840c-c45792319f5b%2FYealink%20SIP%20IP%20Phones%20Auto%20Provisioning%20Guide_V83_10.​pdf
Hi Samuel,

Any update on this one ?
Testing today with 84.10 firmware, I can still see lines with missing file name in URL such as:
192.168.64.42 - - [08/Nov/2018:13:32:43 +0100] "POST /yealink/ HTTP/1.1" 404 470 "-" "Yealink SIP-T42S 66.84.0.10 00:15:65:bf:fd:fe"


RE: Ni file name in POST URLs - jolouis - 11-08-2018 04:18 PM

Try removing the line:
static.auto_provision.custom.sync.path

(You can tell the phone to set it to default after by doing a factory reset, or by changing the provisioning value to "=%NULL%")

From your provisioning server. The manual states:
Quote:If it is left blank, the IP phone will try to upload/download the <MAC>-local.cfg file to/from the provisioning server.
Since your provisioning server is the same as the path you were using, it should all just work.

I expect the issue is that the custom.sync.path expects a full path including filename. So if you wanted to specify it that way, you would need something like:
Code:
static.auto_provision.custom.sync.path= http://192.168.64.250/yealink/$MAC-local.cfg

That's just a guess, but it works for .boot files so might work in a normal provisioning one too. In any case it should be redundant, try leaving it undefined or set to %NULL% first and see if that fixes it.


RE: Ni file name in POST URLs - oliv - 11-08-2018 06:15 PM

(11-08-2018 04:18 PM)jolouis Wrote:  Try removing the line:
static.auto_provision.custom.sync.path

(You can tell the phone to set it to default after by doing a factory reset, or by changing the provisioning value to "=%NULL%")

From your provisioning server. The manual states:
Quote:If it is left blank, the IP phone will try to upload/download the <MAC>-local.cfg file to/from the provisioning server.
Since your provisioning server is the same as the path you were using, it should all just work.

I expect the issue is that the custom.sync.path expects a full path including filename. So if you wanted to specify it that way, you would need something like:
Code:
static.auto_provision.custom.sync.path= http://192.168.64.250/yealink/$MAC-local.cfg

That's just a guess, but it works for .boot files so might work in a normal provisioning one too. In any case it should be redundant, try leaving it undefined or set to %NULL% first and see if that fixes it.

I tried with 3 different procedures:
1. with full path static.auto_provision.custom.sync.path = http://192.168.64.250/yealink/$MAC-local.cfg
2. with static.auto_provision.custom.sync.path = %NULL%
3. with # static.auto_provision.custom.sync.path = http://192.168.64.250/yealink/$MAC-local.cfg (commenting the whole line)

Before each attempt, I did a factory reset. After phone restart, I changed Ring Tone using phone keys.

With each attempt, I saw two POST (one for initial setting, one after Ring Tone modification. Each POST looked like:
192.168.64.42 - - [08/Nov/2018:19:06:52 +0100] "POST /yealink/ HTTP/1.1" 404 470 "-" "Yealink SIP-T42S 66.84.0.10 00:15:65:bf:fd:fe"

So basically, it still does not work yet for me.


RE: Ni file name in POST URLs - jolouis - 11-09-2018 01:58 PM

Strange... I've got a T41S here, if I have time this afternoon I'll try to replicate and see what I get on this end.