[YMCS/YDMP Free Trial Program]Yealink would like to offer Free Trial Program of Yealink device management service for our current eligible customers. You can see the details below.
https://www.yealink.com/ydmp-freetrial-2020


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Auto Provisioning and Chunked transfer encoding
Author Message
bearded Offline
Junior Member
**

Posts: 4
Joined: Oct 2013
Reputation: 0
Post: #1
Auto Provisioning and Chunked transfer encoding
Hello Yealink Community,

I'm trying to provision Yealink T26P from dynamically generated config file, which is sent from server as a chunked response.

Static config file can be fetched without problems:

Code:
autop[482]: http.c(1443): dns timeout:5
autop[482]: error.c(111): dns count:1,RetryTimes=2, Timeout=2
autop[482]: http.c(358): device mac:00:15:65:47:29:bf
autop[482]: http.c(704): UserAgent is yealink SIP-T26P 6.70.13.9 00:15:65:47:29:bf
autop[482]: http.c(3505): query header:#012GET /yealink/y000000000004.cfg HTTP/1.1#015#012Host: test.com#015#012User-Agent: yealink SIP-T26P 6.70.13.9 00:15:65:47:29:bf#015#012Accept: */*#015#012Connection: Keep-Alive#015#012#015
autop[482]: http.c(3542): ***send data***#012......
autop[482]: http.c(3650): recv header:#012HTTP/1.1 200 OK
autop[482]: http.c(2299): Server: nginx/0.7.65
autop[482]: http.c(2299): Date: Sun, 20 Oct 2013 10:21:36 GMT
autop[482]: http.c(2299): Content-Type: text/xml
autop[482]: http.c(2299): Content-Length: 361
autop[482]: http.c(2299): Last-Modified: Sat, 19 Oct 2013 20:19:26 GMT
autop[482]: http.c(2299): Connection: keep-alive
autop[482]: http.c(2299): Accept-Ranges: bytes
autop[482]: http.c(2299):
autop[482]: [./src/fileStream.cpp     :972 ] IFO Open URL OK

But phone cannot fetch dynamically generated file, and it not provide much information about why exactly it cannot be fetched:

Code:
autop[482]: http.c(358): device mac:00:15:65:47:29:bf
autop[482]: http.c(704): UserAgent is yealink SIP-T26P 6.70.13.9 00:15:65:47:29:bf
autop[482]: http.c(3505): query header:#012GET /yealink/sip-t26p/y000000000004.cfg HTTP/1.1#015#012Host: test.com#015#012User-Agent: yealink SIP-T26P 6.70.13.9 00:15:65:47:29:bf#015#012Accept: */*#015#012Connection: Keep-Alive#015
autop[482]: http.c(3542): ***send data***#012......
autop[482]: http.c(3650): recv header:#012HTTP/1.1 200 OK
autop[482]: http.c(2299): Server: nginx/0.7.65
autop[482]: http.c(2299): Date: Sun, 20 Oct 2013 10:16:47 GMT
autop[482]: http.c(2299): Content-Type: text/xml
autop[482]: http.c(2299): Transfer-Encoding: chunked
autop[482]: http.c(2299): Connection: keep-alive
autop[482]: http.c(2299): Status: 200 OK
autop[482]: http.c(2299): Accept-Ranges: bytes
autop[482]: http.c(2299): Last-Modified: Sun, 20 Oct 2013 10:16:47 GMT
autop[482]: http.c(2299): Content-Lenght: 361
autop[482]: http.c(2299): Content-Disposition: attachment
autop[482]: http.c(2299): Content-Transfer-Encoding: binary
autop[482]: http.c(2299): Cache-Control: private
autop[482]: http.c(2299): X-UA-Compatible: IE=Edge
autop[482]: http.c(2299): X-Request-Id: 6b5ee4db6fee7f30f82ef1f8a534c053
autop[482]: http.c(2299): X-Runtime: 0.045505
autop[482]: http.c(2299):
autop[482]: [./src/fileStream.cpp     :972 ] IFO Open URL Fail
autop[482]: [./src/autoParser.cpp     :621 ] IFO Failed connect to server ! Try [1] times ...
autop[482]: [./src/autoParser.cpp     :626 ] WAR Can't connect server !!

I think that Phone simply does not support Chunked transfer encoding.
Any chance that phone will support it in near future?
10-22-2013 06:08 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Yealink Support Offline
Administrator
*******

Posts: 2,684
Joined: Dec 2012
Reputation: 24
Post: #2
RE: Auto Provisioning and Chunked transfer encoding
Hi bearded,

Yes, we don't support Chunked transfer encoding now.
Can you tell me why do you want to use this chunked response?
Is it convenience for your controls?
10-23-2013 05:49 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
bearded Offline
Junior Member
**

Posts: 4
Joined: Oct 2013
Reputation: 0
Post: #3
RE: Auto Provisioning and Chunked transfer encoding
Hello Yealink Support,

The problem is that Ruby on Rails framework uses Chunked response by default, and there is not easy way to disable it (at least I did not find it yet).

I was a bit wondered that Yealink phone does not support it because I did not had such problem with phones like Aastra, Cisco, Gigaset, Grandstream, Panasonic, Polycom and Snom.

So for me it would be very great if Yealink phone could support Chunked response as well, because in other case I will need to rework whole provisioning for all supported brands Sad
10-23-2013 05:57 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
jolouis Offline
Moderator
*****

Posts: 339
Joined: Oct 2013
Reputation: 6
Post: #4
RE: Auto Provisioning and Chunked transfer encoding
I ran into the same problem a few days ago when testing RPS. I had been using older firmware version 61.0.129 which was sent to me as a Beta to add initial RPS support, and funny enough that worked just fine with Chunked transfers. Neither of the official 70 and 71 firmwares do though it seems as Support just confirmed...

We're using a PHP/Apache setup, so for us the easy solution was just to force Apache to drop into HTTP 1.0 compatibility mode by adding:

SetEnv downgrade-1.0

to a .htaccess file. Not sure if that will help you with your Rails setup or not but gives you an idea of a possible workaround without having to rebuild everything from scratch.
10-24-2013 01:31 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Yealink Support Offline
Administrator
*******

Posts: 2,684
Joined: Dec 2012
Reputation: 24
Post: #5
RE: Auto Provisioning and Chunked transfer encoding
Hi bearded,

Because your firmware adds some special features and if you want to add this feature, you can contact with the technican of your distributor.
I will also double check with our R&D about this feature in your version.
(This post was last modified: 10-24-2013 05:33 PM by Yealink Support.)
10-24-2013 05:04 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
bearded Offline
Junior Member
**

Posts: 4
Joined: Oct 2013
Reputation: 0
Post: #6
RE: Auto Provisioning and Chunked transfer encoding
I did a typo in HTTP Header, wrote 'Content-Lenght', so now problem is solved, and I just need to sleep more... Smile
10-25-2013 05:51 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Yealink Support Offline
Administrator
*******

Posts: 2,684
Joined: Dec 2012
Reputation: 24
Post: #7
RE: Auto Provisioning and Chunked transfer encoding
Hi bearded,

Sorry for the mistake. I double check with our R&D colleagues about Chunked transfer encoding. And they confirm that yealink phone can support this encoding.
10-26-2013 09:35 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
bearded Offline
Junior Member
**

Posts: 4
Joined: Oct 2013
Reputation: 0
Post: #8
RE: Auto Provisioning and Chunked transfer encoding
(10-26-2013 09:35 AM)Yealink Support Wrote:  Hi bearded,

Sorry for the mistake. I double check with our R&D colleagues about Chunked transfer encoding. And they confirm that yealink phone can support this encoding.

Hello Yealink Support,

From what I saw in Wireshark - phone does not support it.
I think your R&D colleagues should make a real test of this feature, because "can support" and "support" are different things.

Here is a piece of code, which gives them an easy way to check the problem.

Code:
def send_yealink_common_cfg
  _config = [
    '#!version:1.0.0.1',
    '',
    'lang.gui = Russian',
    ''
  ].join("\n")

#  response.headers['Accept-Ranges'] = 'bytes'
#  response.headers['Content-Length'] = _config.bytesize.to_s
#  response.headers['Last-Modified'] = Time.now.httpdate

  send_data _config, filename: "#{params[:id].downcase}.cfg", type: 'text/xml', disposition: 'inline'
end

Best wishes to your company and distributors with their own firmware.
10-26-2013 04:24 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
amvalente Offline
Junior Member
**

Posts: 19
Joined: Mar 2014
Reputation: 0
Post: #9
RE: Auto Provisioning and Chunked transfer encoding
Hello,

I'm facing a similar problem with my SIP-T32G phone with the 32.70.0.171 RPS firmware version. There are any solution to this problem?

The syslog I got:
Aug 1 00:12:33 autop[504]: http.c(3505): query header: GET /001122334455.cfg HTTP/1.1^M Host: 12.115.34.34:9090^M User-Agent: Yealink SIP-T32G 32.70.0.171 00:11:22:33:44:55^M Accept: */*^M Connection: Keep-Alive^M ^M
Aug 1 00:12:33 autop[504]: http.c(3542): ***send data*** ......
Aug 1 00:12:37 autop[504]: http.c(3650): recv header: HTTP/1.1 200 OK
Aug 1 00:12:37 autop[504]: http.c(2299): Server: nginx/1.4.5
Aug 1 00:12:37 autop[504]: http.c(2299): Date: Tue, 06 May 2014 15:29:14 GMT
Aug 1 00:12:37 autop[504]: http.c(2299): Content-Type: application/octet-stream
Aug 1 00:12:37 autop[504]: http.c(2299): Transfer-Encoding: chunked
Aug 1 00:12:37 autop[504]: http.c(2299): Connection: keep-alive
Aug 1 00:12:37 autop[504]: http.c(2299):
Aug 1 00:12:37 autop[504]: [./src/fileStream.cpp :954 ] IFO Open URL Fail
Aug 1 00:12:37 autop[504]: [./src/autoParser.cpp :621 ] IFO Failed connect to server ! Try [1] times ...
Aug 1 00:12:37 autop[504]: [./src/autoParser.cpp :626 ] WAR Can't connect server !!
Aug 1 00:12:37 autop[504]: [./src/autoServer.cpp :755 ] IFO Upgrade finished [FAIL] !
Aug 1 00:12:37 autop[504]: [./src/autoServer.cpp :843 ] IFO <<<<<< Autoprovision End >>>>>>
05-06-2014 11:52 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Yealink Support Offline
Administrator
*******

Posts: 2,684
Joined: Dec 2012
Reputation: 24
Post: #10
RE: Auto Provisioning and Chunked transfer encoding
Sorry. I think you should change to use "Content-Length" header.
05-07-2014 09:47 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
Question "Trusted Certificates" and auto provisioning jobst 2 276 05-06-2022 08:35 PM
Last Post: jobst
Wink Auto Provsioning EOL products and devices that do dont have recent firmware releases GalacticSolutions 1 750 04-17-2022 07:05 AM
Last Post: markm
  T46G RingCentral Provisioning jszima 0 451 03-07-2022 10:24 AM
Last Post: jszima
  Auto Provision Wall Paper Stopped Working TRP Tech 4 3,261 11-19-2021 10:27 AM
Last Post: TRP Tech
  Setting of lang.gui via remote provisioning cloudaware 1 1,743 10-26-2021 07:11 PM
Last Post: cloudaware
  zero touch provisioning & firewall gareth20202 2 2,604 10-09-2021 04:55 PM
Last Post: Phil2021
  Step by Step for Auto Provisioning nguyenp 2 5,506 08-06-2021 04:27 PM
Last Post: Phil2021
  Auto-Provision W60P on FreeSWITCH Phoneperson 10 16,266 03-06-2021 03:51 AM
Last Post: Phoneperson
  disable provisioning on T26P yeaphild 0 2,979 02-25-2021 07:25 PM
Last Post: yeaphild
  Provisioning only works on startup Snapdragons 3 5,816 09-29-2020 12:49 AM
Last Post: Jay_Yealink

Forum Jump:


User(s) browsing this thread: 1 Guest(s)

Contact Us   Yealink   Return to Top   Return to Content   Lite (Archive) Mode   RSS Syndication