[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
Change vlan setting to more than one phone at once
Author Message
xrpapak Offline
Junior Member
**

Posts: 5
Joined: Nov 2014
Reputation: 0
Post: #1
Change vlan setting to more than one phone at once
I have about 90 phones and I need to enable vlan for both PC and WAN ports. I have configure my HP switch ports for access and voice vlan needed and now I have to setup the phones.

However, about 90 phones are too many to change them manually. As a result, I should find a way to make the change I would say "automatically". Firstly, I thought of a script which would export the configuration file of each phone, make the changes for vlan settings, import the file and reboot it. The only method I thought if this could be done is via http post but I have difficulty in implementing export and import of the file.

Could someone give me a hint with this? Or maybe is there another way to implement the scenario I mentioned?

Thanks in advance.
11-17-2014 12:06 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
cptjack Offline
Member
***

Posts: 97
Joined: Jan 2014
Reputation: 8
Post: #2
RE: Change vlan setting to more than one phone at once
Hi xrpapak, what type of phone and firmware are you currently using?
Also do you have some kind of provisioning server implemented at the moment?

Please use the reputation button below if you like this post.
11-17-2014 05:31 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
xrpapak Offline
Junior Member
**

Posts: 5
Joined: Nov 2014
Reputation: 0
Post: #3
RE: Change vlan setting to more than one phone at once
(11-17-2014 05:31 AM)cptjack Wrote:  Hi xrpapak, what type of phone and firmware are you currently using?
Also do you have some kind of provisioning server implemented at the moment?

Hello cptjack,

Thank you for your answer,
Phones are T20P, T22P and T26P.
Firmware is 72.0....(I don't remember the rest)

I don't have any provisioning server implemented. Phones use DHCP for IP configuration and SIP server(asterisk) for extensions etc.. No provisioning servers implemented. That's why I am thinking of a solution like that I mentioned above but I am sure if this can happen.
11-17-2014 05:40 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Yealink_Jim Offline
Super Moderator
******

Posts: 127
Joined: Aug 2014
Reputation: 2
Post: #4
RE: Change vlan setting to more than one phone at once
Hi,
I suggest that you can enable vlan for both PC and WAN ports via Auto Provisioning. Given below is the configuration parameters:

-------------------------------------------------------------------
#!version:1.0.0.1
#Enable or disable the VLAN of WAN prot; 0-Disabled (default), 1-Enabled;
#Require reboot;
network.vlan.internet_port_enable =

#Configure the VLAN ID, it ranges from 0 to 4094, the default value is 0.
#Require reboot;
network.vlan.internet_port_vid =

#Configure the VLAN priority, it ranges from 0 (default) to 7.
#Require reboot;
network.vlan.internet_port_priority =

#Enable or disable the VLAN of PC port; 0-Disabled (default), 1-Enabled;
#Require reboot;
network.vlan.pc_port_enable =

#Configure the VLAN ID, it ranges from 0 to 4094, the default value is 1.
#Require reboot;
network.vlan.pc_port_vid =

#Configure the VLAN priority, it ranges from 0 (default) to 7.
#Require reboot;
network.vlan.pc_port_priority =
-------------------------------------------------------------------------------------------

Yealink IP phones support FTP, TFTP, HTTP, and HTTPS protocols for auto
provisioning and are configured by default to use theTFTP protocol.
Briefly, the procedure is to prepare a TFTP server, put the configuration CFG file to the TFTP server, then enable the phone to update the firmware via the TFTP server.

[Image: attachment.php?aid=1161]

You can refer to below Auto Provisioning guide for more information:

http://www.yealink.com/Upload/T2X/2014.3...V72_30.pdf

Hope this helps!


Attached File(s) Thumbnail(s)
   
11-17-2014 02:27 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
xrpapak Offline
Junior Member
**

Posts: 5
Joined: Nov 2014
Reputation: 0
Post: #5
RE: Change vlan setting to more than one phone at once
(11-17-2014 02:27 PM)Yealink_Jim Wrote:  Hi,
I suggest that you can enable vlan for both PC and WAN ports via Auto Provisioning. Given below is the configuration parameters:

-------------------------------------------------------------------
#!version:1.0.0.1
#Enable or disable the VLAN of WAN prot; 0-Disabled (default), 1-Enabled;
#Require reboot;
network.vlan.internet_port_enable =

#Configure the VLAN ID, it ranges from 0 to 4094, the default value is 0.
#Require reboot;
network.vlan.internet_port_vid =

#Configure the VLAN priority, it ranges from 0 (default) to 7.
#Require reboot;
network.vlan.internet_port_priority =

#Enable or disable the VLAN of PC port; 0-Disabled (default), 1-Enabled;
#Require reboot;
network.vlan.pc_port_enable =

#Configure the VLAN ID, it ranges from 0 to 4094, the default value is 1.
#Require reboot;
network.vlan.pc_port_vid =

#Configure the VLAN priority, it ranges from 0 (default) to 7.
#Require reboot;
network.vlan.pc_port_priority =
-------------------------------------------------------------------------------------------

Yealink IP phones support FTP, TFTP, HTTP, and HTTPS protocols for auto
provisioning and are configured by default to use theTFTP protocol.
Briefly, the procedure is to prepare a TFTP server, put the configuration CFG file to the TFTP server, then enable the phone to update the firmware via the TFTP server.

[Image: attachment.php?aid=1161]

You can refer to below Auto Provisioning guide for more information:

http://www.yealink.com/Upload/T2X/2014.3...V72_30.pdf

Hope this helps!

Hello Yealink_Jim,

Thanks for your answer,

I would like to avoid auto provisioning ip phones via tftp server. That's because this means I should configure each phone separately to know tftp server, then take each phone's MAC address and configure its MAC.cfg file, setup <y000000.cfg> file and reboot for all phones. As a result, doing the above process I realize infrastructure changes and I haven't planned the impact.

I imagine something like the following http://<phone_ip_address>/cgi-bin/ConfigManApp.com?key=Reboot which is used for rebooting a phone remotely. Something like that for exporting the configuration file, make the changes regarding vlan settings, importing again and rebooting the phones.

Is it possible something like this happens?
11-17-2014 04:17 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
Yealink_Jim Offline
Super Moderator
******

Posts: 127
Joined: Aug 2014
Reputation: 2
Post: #6
RE: Change vlan setting to more than one phone at once
Hi,
Yes, I got you. You can use DHCP Server deployment way to configure both PC and WAN ports. You can refer to below Auto Provisioning guide page 69-76:

http://www.yealink.com/Upload/T2X/2014.3...V72_30.pdf

Hope this helps!
11-17-2014 04:57 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
xrpapak Offline
Junior Member
**

Posts: 5
Joined: Nov 2014
Reputation: 0
Post: #7
RE: Change vlan setting to more than one phone at once
(11-17-2014 04:57 PM)Yealink_Jim Wrote:  Hi,
Yes, I got you. You can use DHCP Server deployment way to configure both PC and WAN ports. You can refer to below Auto Provisioning guide page 69-76:

http://www.yealink.com/Upload/T2X/2014.3...V72_30.pdf

Hope this helps!

According to this, I should also configure a tftp server on my network as putting option 66 it asks me to define the provisioning server.

And here, supposing I have configured a tftp server, what file should I put inside tftp server? A general configuration file from which all phones will take configuration changes I have made?
11-17-2014 05:20 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
cptjack Offline
Member
***

Posts: 97
Joined: Jan 2014
Reputation: 8
Post: #8
RE: Change vlan setting to more than one phone at once
You might be able to do it via SIP Notify or Push XML, but I'm not sure if the T2x supports VLAN configuration via Push XML... I think v72 can do it, but I have only tested the scripts below on a T48G with v73, so please test carefully!

As a starting point, an example of a Push XML is in this thread. Push XML can be delivered by a trusted server (ip) or in a SIP header from the PBX.

A PHP test script to change one parameter on one phone would go like this. It requires however that the server IP is configured in Features -> "Remote Control" -> "Push XML Server IP Address".[/php]
PHP Code:
<?php
$phoneip 
"192.168.0.100";
$serverip "192.168.0.1";

function 
push2phone($server,$phone,$data)
{
$xml "xml=".$data;
$post "POST / HTTP/1.1\r\n";
$post .= "Host: $phone\r\n";
$post .= "Referer: $server\r\n";
$post .= "Connection: Keep-Alive\r\n";
$post .= "Content-Type: text/xml\r\n";
$post .= "Content-Length: ".strlen($xml)."\r\n\r\n";
$fp = @fsockopen $phone80$errno$errstr5);
if(
$fp)
{
fputs($fp$post.$xml);
flush();
fclose($fp);
} else {
    echo 
"error $errno $errstr";
    }
}
##############################

$xml "<YealinkIPPhoneConfiguration Beep='yes'>\n".
     
"<Item>network.vlan.pc_port_vid = 10</Item>\n".
     
"</YealinkIPPhoneConfiguration>\n";
     
push2phone($serverip,$phoneip,$xml);
?>


If you already have asterisk, you can accomplish the same by adding a SIP Notify message in sip_notify.conf:
Code:
[yealink-changevpn]
Event=>yealink-xml
Content-type=>application/xml
Content=><YealinkIPPhoneConfiguration Beep="yes">
Content=><Item>network.vlan.pc_port_vid = 20</Item>
Content=></YealinkIPPhoneConfiguration>

Then from the asterisk console run:
Code:
sip notify yealink-changevpn tel1 tel2 tel3 etc...

The example above will only change the PC VLAN ID, but you can add additional configuration items if needed. Please note that the phone will reboot immediately as the change in VLAN requires reboot.

I hope this helps you on the right track.

Please use the reputation button below if you like this post.
11-18-2014 06:53 AM
Find all posts by this user    like0    dislike0 Quote this message in a reply
xrpapak Offline
Junior Member
**

Posts: 5
Joined: Nov 2014
Reputation: 0
Post: #9
RE: Change vlan setting to more than one phone at once
Lately, I tried with DHCP option 132. I read after from firmware 9.71... and lately phones have feature VLAN discovery, with option 132, enabled by default. So, I configured switch port with voice vlan and data vlan and then on DHCP server, I added dhcp option 132 for scope of voice vlan. In addition, I checked that LLDP is enabled on both switch port and phone.

Unfortunately, nothing changed and this scenario didn't came true. Both phone and PC got IP address from data vlan. In order my scenario works I should enable vlan on WAN port of yealink phone.
11-18-2014 10:28 PM
Find all posts by this user    like0    dislike0 Quote this message in a reply
cptjack Offline
Member
***

Posts: 97
Joined: Jan 2014
Reputation: 8
Post: #10
RE: Change vlan setting to more than one phone at once
First thing is to manually configure one phone to make sure you have the correct settings for your network. Then you can apply these parameters using the example script(s) above, either PHP or SIP Notify to only change the parameters you really need.

Like:
Code:
<item>network.vlan.internet_port_enable = 1</item>
<item>network.vlan.internet_port_vid = 132</item>
<item>network.vlan.internet_port_priority = 0</item>
<item>network.vlan.pc_port_enable = 1</item>
<item>network.vlan.pc_port_vid = 1</item>
<item>network.vlan.pc_port_priority = 0</item>
or any combination thereof. This is only an example, so it should be changed to match your network configuration.

Once you have it setup on one phone, it should be possible to duplicate the settings accross multiple phones. The parameters are the same as the auto provisioning guide, but they can be included in an XML message/script to change it on the phone.

I would opt to add a command to the sip_notify.conf so you can update the phone from the Asterisk CLI. Since the phone will reboot, you can monitor the if the extensions goes offline and come back online with the new IP from within the console.

Please use the reputation button below if you like this post.
11-18-2014 11:48 PM
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
  2-way paging with no indication on phone nolto 1 1,747 05-11-2023 11:20 PM
Last Post: Yisroel_MongoTEL
  T57W - Using the Phone Directory bill@wesimplifyit.com 0 1,087 04-14-2023 12:41 AM
Last Post: bill@wesimplifyit.com
  W70B - 3CX phone book is not displayed completely ChrisGER 1 4,770 03-19-2023 07:31 PM
Last Post: thomas32
Question 3CX / Yealink passthrough VLAN issue (when phone is rebooted) maindriver 4 11,595 03-24-2022 10:25 PM
Last Post: maindriver
  Directory DSS Key Target Change nolto 1 5,338 01-14-2022 07:05 PM
Last Post: nolto
  Limit maximum of active calls per phone elastalink 5 15,052 09-09-2021 03:52 AM
Last Post: kapetrosyan
  Read specific variable from phone configuration saivo 0 3,472 06-13-2021 05:23 PM
Last Post: saivo
  Change default admin password with config file? PeterSkiles 1 7,525 05-18-2021 01:22 AM
Last Post: complex1
  Change number of rings to get to day voicmail drb@thecatdr.net 4 10,681 06-10-2020 05:44 PM
Last Post: drb@thecatdr.net
  Raw XML for Remote Phone Book rgranholm 1 6,868 03-24-2020 06:14 AM
Last Post: crazyau

Forum Jump:


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

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