Koozali.org: home of the SME Server

Yealink Provisioning

Offline compsos

  • *
  • 472
  • +0/-0
Yealink Provisioning
« on: May 31, 2010, 06:37:11 AM »
Hi
We are trying to auto provision Yealink TP26P phones. Has anyone already tried these units?

The example we have at the moment suggests a directory tree structure which sail may not be keen on.
It requires
/tftpboot/yealink/DialRule
/tftpboot/yealink/Config
/tftpboot/yealink/Config/Network
/tftpboot/yealink/Config/Setting
/tftpboot/yealink/Config/voip
/tftpboot/yealink/vpPhone

Each for single file unless we are doing something different for each phone. It just looks too complicated and not enough KISS principle.
Regards

Gordon............

Offline compsos

  • *
  • 472
  • +0/-0
Re: Yealink Provisioning
« Reply #1 on: May 31, 2010, 01:55:45 PM »
I am sure this is carrying a lot of baggage but seems to be working.
Can it be trimmed down? So far have not had any files written out to all the paths so still not sure what effect they all have.

If you have a different Yealink to the TP26P then change the y..........cfg code as per this table
T28 use y000000000000.cfg
T26 use y000000000004.cfg
T22 use y000000000005.cfg
T20 use y000000000007.cfg

Code removed due to errors contained
« Last Edit: June 05, 2010, 02:33:01 AM by compsos »
Regards

Gordon............

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Yealink Provisioning
« Reply #2 on: May 31, 2010, 02:34:18 PM »
Yes we can autoprovision Yealink units.

It is just 2 files; a "mac" file template and a global file template, much like any other SIP TFTP provisioning set-up.  We've only ever used a single configurator (global) template, with the name y000000000000.cfg, for all of the T2x phone types and it seems to work just fine but, having just read Gordon's post, I'm wondering if perhaps we've missed something.

The factory supplied MAC file template that we were given by Yealink is rather large and it isn't immediately obvious what all of the parameters do so you may have to experiment with it a little to get the phone to do exactly what you want but these are pretty nice phones in our view. 

I'll put updated templates in the next set of releases (later this week).

Kind Regards

S




« Last Edit: May 31, 2010, 02:45:26 PM by SARK devs »

Offline compsos

  • *
  • 472
  • +0/-0
Re: Yealink Provisioning
« Reply #3 on: May 31, 2010, 11:50:00 PM »
I think some of the parameters are for the different types of provisioning (ie) http; ftp; tftp. So it would be good to be able to just concentrate on the ones required. I will experiment with the phonebook part and see if we can work it on tftp.

These phones can have 3 accounts which link to "line" buttons. Is this just a case of setting up 3 extension numbers to the 1 phone?

The audio on these units sounds good and the ringer volume is also good. That is a comparison to Polycom 320 and Aastra 57i phones.
Regards

Gordon............

Offline compsos

  • *
  • 472
  • +0/-0
Re: Yealink Provisioning
« Reply #4 on: June 05, 2010, 03:13:00 AM »
Slowly getting through the options etc.

All the path statements relate to the Phone so they should remain untouched. Also different sources on the web showed different paths. Be warned the phone will download the cfg with invalid paths. (ie) it created new "PhoneBooks" in the wrong area of the phone. A backup of the configuration file from the phone became huge.

If you want common phone books either create a directory within a web enabled ibay or create one just for the phone book files.

Create a new IP device and add the following code to the provisioning stanza. Note the mac.cfg file name has to be lowercase.
Code: [Select]
["$mac.cfg"
[ cfg_version ]
path = /yealink/config/Setting/autop.cfg
mac_cfg_ver = 0.0.0.1

[ account ]
path=/yealink/config/voip/sipAccount0.cfg
Enable = 1
DisplayName = $ext
UserName = $ext
AuthName = $ext
password = $password
SIPServerHost = $localip
SIPServerPort = 5060
SIPListenPort = 5060
Expire = 3600
UseOutboundProxy = 0
OutboundHost = 
OutboundPort = 5060
EnableSTUN = 0 

[ audio0 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 1
PayloadType = PCMU
priority = 1
rtpmap = 0

[ audio1 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 1
PayloadType = PCMA
priority = 2 "
rtpmap = 8

[ audio2 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 0
PayloadType = G723_53
priority = 0
rtpmap = 4

[ audio3 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 0
PayloadType = G723_63
priority = 0
rtpmap = 4

[ audio4 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 1
PayloadType = G729
priority = 3
rtpmap = 18

[ audio5 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 0
PayloadType = G722
priority = 0
Rtpmap = 9

[ audio6 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 0
PayloadType = iLBC
Priority = 3
rtpmap = 97

[ audio7 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 0
PayloadType = G726-16
priority = 0
rtpmap = 112 

[ audio8 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 0
PayloadType = G726-24
priority = 0
rtpmap = 102

[ audio9 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 0
PayloadType = G726-32
Priority = 0
rtpmap = 2

[ audio10 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 0
PayloadType = G726-40
priority = 0
rtpmap = 104

[ NAT ]
path=/yealink/config/voip/sipAccount0.cfg
MaxRTPPort = 11800
MinRTPPort = 11780 
NATTraversal = 0
STUNServer = 217.10.79.21
STUNPort = 10000
EnableUDPUpdate = 1
UDPUpdateTime = 30
rport = 0

[ DTMF ]
path=/yealink/config/voip/sipAccount0.cfg
DTMFInbandTransfer = 1
DTMFPayload = 101
]

["y000000000004.cfg"
[ cfg_version ]
path = /yealink/config/Setting/autop.cfg
com_cfg_ver = 0.0.0.1

[ firmware ]
server_type = tftp
server_ip = $localip
server_port = 69
login_name =
login_pswd =
http_url= $localip
firmware_name = 6.43.0.50.rom

[ autop_mode ]
path = /yealink/config/Setting/autop.cfg
mode = 3
schedule_day =

[ autoprovision ]
path = /yealink/config/Setting/autop.cfg
server_type = tftp
ftp_server_ip =
ftp_server_port =
tftp_server_ip = $localip
tftp_server_port = 69
ftp_name =
ftp_pswd =
http_url = $localip

[ Features ]
path = /yealink/config/Features/Phone.cfg
DND = 0
Call_Waiting = 1

[ AutoAnswer ]
path = /yealink/config/Features/Phone.cfg
Enable = 0

[ PhoneSetting ]
path = /yealink/config/Setting/Setting.cfg
Voicevolume = 4
Ringtype = Ring1
HandFreeSpkVol = 8
HandFreeMicVol = 8
HandSetSpkVol = 8
HandSetMicVol =
HeadSetSpkVol =
HeadSetMicVol =
 
[ Time ]
path = /yealink/config/Setting/Setting.cfg
TimeZone = +10
TimeServer1 = $localip
TimeServer2 = cn.pool.ntp.org
Interval = 1000

[ ContactList ]
path = /tmp/download.cfg
server_address = $localip/contactData1.xml

[ RemotePhoneBook0 ]
path = /yealink/config/Setting/Setting.cfg
URL = http://$localip/phones/Phonebook0.xml
Name = Directory
]


The remote Phone book has to be in this format
Code: [Select]
<?xml version="1.0" encoding="UTF-8" ?>

<xxxIPPhoneDirectory clearlight="true">

<Title>LIST NAME</Title>

<Prompt>Prompt</Prompt>

<DirectoryEntry>

<Name>NAME DESC</Name>

<Telephone>NUMBER</Telephone>

</DirectoryEntry>

<DirectoryEntry>

<Name>NAME DESC</Name>

<Telephone>NUMBER</Telephone>

</DirectoryEntry>

<SoftKeyItem>

<Name>#</Name>

<URL>http://xxx/minibrowser/start.xml</URL>

</SoftKeyItem>

<SoftKeyItem>

<Name>*</Name>

<URL>http://xxx/minibrowser/menu.xml</URL>

</SoftKeyItem>

</xxxIPPhoneDirectory>

Just duplicate the Directory block with more entries.

The local phone book needs a different format. The "" are required.
Code: [Select]
<contactData>

<group>
<contact sDisplayName="NAME" sOfficeNumber="NUMBER" sMobilNumber="NUMBER" sOtherNumber="" sLine="0"/>
</group>
<blacklist/>
</contactData>
Just repeat the contact line with the required entries. So far this has not been imported during the provisioning but is requested during the in.tftpd[27573]: RRQ from 192.168.36.75 filename contactData1.xml. Still working on that one.

There are a lot more options/lines that can go into the provisioning files. See the http://www.yealink.com/en/download.asp?BigClassName=IP%20Phone
As for the extra lines, I created a new extension number without the mac address and added it as account1. It worked not sure if it is the best way to do it.

Comments welcome.
Regards

Gordon............

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Yealink Provisioning
« Reply #5 on: June 05, 2010, 09:00:41 PM »
This is nice work. Just one thing... 

Quote
I created a new extension number without the mac address and added it as account1. It worked not sure if it is the best way to do it.

Can you explain this?  - I'm not sure I understood.

Kind Regards

S

Offline compsos

  • *
  • 472
  • +0/-0
Re: Yealink Provisioning
« Reply #6 on: June 07, 2010, 12:39:45 AM »
Hi
Still working on the files just re-adding each block feature to gauge its usefulness. Have re-added the time block. Also the contacts in contactData1.xml work on re provisioning.

On the Yealink phones they have 3 Line buttons. My understanding is that each button can have a asterisk account associated with it and dial out on that account. Within the cfg files they are called sipAccount0, sipAccount1 and sipAccount3. So playing around with the Web interface to setup sipAccount1 by using an extension from Sail that only has a number and automatic password (no mac address) allows the "Line 2" button to work. It would be like allocating spare extensions as extra dial out lines. Or could a "shared" extension number be used across all the phones on "Line 2" "Line 3"?
Regards

Gordon............

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Yealink Provisioning
« Reply #7 on: June 07, 2010, 01:35:55 AM »
Understood

Are you also able to set them as simple multi-presence (i.e. 3 lines all on the same extension number)? 

Best

S

Offline compsos

  • *
  • 472
  • +0/-0
Re: Yealink Provisioning
« Reply #8 on: June 07, 2010, 03:39:14 AM »

Yes that appears to work also. The Polycom and Aastra seem to do this automatically.

Within the webpage it seems a whole host of choices, like "line 3" can call activate "Line 1" code etc etc etc. If account 5001 is already in use can the same phone make another call on the same account?

Regards

Gordon............

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Yealink Provisioning
« Reply #9 on: June 07, 2010, 07:45:37 AM »
Quote
If account 5001 is already in use can the same phone make another call on the same account?

From a purely SIP point of view, yes it can. This is controlled in Asterisk by the call-limit parameter in sip.conf.  It happens a lot, for example every time you do a SIP transfer, the phone starts multiple calls from the same ID.  Call-limit only applies to outbound calls. However, with most phones (like the Snoms) you can turn off call-waiting, which means that the phone will not accept multiple inbound calls and, instead, will give a SIP busy if it is already on call.  Aastras (last time I looked) don't have this feature which can be a nuisance in the real world.  There is (or was, its a long time since I looked) a whole wack of pretty nasty code in freepbx, which spends a lot of resource trying to figure out what state the phone is in just to compenaste for the Aastra's lack of call-waiting.

Best

S
 
   

Offline compsos

  • *
  • 472
  • +0/-0
Re: Yealink Provisioning
« Reply #10 on: June 08, 2010, 06:46:15 AM »
Latest Copy of the IP device definition.

Notes:
  • Every block must have a path statement
  • the path must be correct including case
  • Yealink documents show the path without /yealink our testing required it. Telnet can be activated on the phone and the internal path does include the /yealink
  • The Network section has a Custom Option field, but within the phone this has been set as [ cutom_option ] block. Maybe future firmware will correct the typo if indeed it is one.
  • Watch for whitespaces, they seem to be required
  • The code links "line 2" button to the same account as "Line 1", The first 2 DSS keys are also set to other extensions, modify as required. Also Country code etc
  • If either of the files have errors the download according to the messages log file occurs, just the phone does not respond as expected. And no error warning issued

Audio on these units is great, can ring loudly, speaker phone is clear and good range in volume. Once configured easy to use.

Code: [Select]
["$mac.cfg"

[ account ]
path=/yealink/config/voip/sipAccount0.cfg
Enable = 1
DisplayName = $ext
UserName = $ext
AuthName = $ext
password = $password
SIPServerHost = $localip
SIPServerPort = 5060
SIPListenPort = 5060
Expire = 3600
UseOutboundProxy = 0
OutboundHost = 
OutboundPort = 5060
EnableSTUN = 0

[ account ]
path=/yealink/config/voip/sipAccount1.cfg
Enable = 1
DisplayName = $ext
UserName = $ext
AuthName = $ext
password = $password
SIPServerHost = $localip
SIPServerPort = 5060
SIPListenPort = 5060
Expire = 3600
UseOutboundProxy = 0
OutboundHost = 
OutboundPort = 5060
EnableSTUN = 0

[ audio0 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 1
PayloadType = PCMU
priority = 1
rtpmap = 0

[ audio1 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 1
PayloadType = PCMA
priority = 2 "
rtpmap = 8

[ audio2 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 0
PayloadType = G723_53
priority = 0
rtpmap = 4

[ audio3 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 0
PayloadType = G723_63
priority = 0
rtpmap = 4

[ audio4 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 1
PayloadType = G729
priority = 3
rtpmap = 18

[ audio5 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 0
PayloadType = G722
priority = 0
Rtpmap = 9

[ audio6 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 0
PayloadType = iLBC
Priority = 3
rtpmap = 97

[ audio7 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 0
PayloadType = G726-16
priority = 0
rtpmap = 112 

[ audio8 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 0
PayloadType = G726-24
priority = 0
rtpmap = 102

[ audio9 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 0
PayloadType = G726-32
Priority = 0
rtpmap = 2

[ audio10 ]
path=/yealink/config/voip/sipAccount0.cfg
enable = 0
PayloadType = G726-40
priority = 0
rtpmap = 104

[ NAT ]
path=/yealink/config/voip/sipAccount0.cfg
MaxRTPPort = 11800
MinRTPPort = 11780 
NATTraversal = 0
STUNServer = 217.10.79.21
STUNPort = 10000
EnableUDPUpdate = 1
UDPUpdateTime = 30
rport = 0

[ DTMF ]
path=/yealink/config/voip/sipAccount0.cfg
DTMFInbandTransfer = 1
DTMFPayload = 101
]

["y000000000004.cfg"

[ firmware ]
server_type = tftp
server_ip = $localip
server_port = 69
login_name =
login_pswd =
http_url= $localip
firmware_name =

[ autop_mode ]
path = /yealink/config/Setting/autop.cfg
mode = 7
schedule_day = 1

[ autoprovision ]
path = /yealink/config/Setting/autop.cfg
server_type = tftp
tftp_server_ip = $localip
tftp_server_port = 69
http_url = $localip

[ cutom_option ]
path = yealink/Setting/autop.cfg
cutom_option_code1 = 120
cutom_option_type1 = 0
cutom_option_code0 =
cutom_option_type0 = 0

[ AdminPassword ]
path = /yealink/config/Setting/autop.cfg
password = your password

[ UserPassword ]
path = /yealink/config/Setting/autop.cfg
password = $ext

[ SYSLOG ]
path = /yealink/config/Network/Network.cfg
SyslogdIP = $localip

[ telnet ]
path = /yealink/config/Network/Network.cfg
# 0 to disable, 1 to enable
telnet_enable = 1

[ Country ]
path = /yealink/config/voip/tone.ini
Country = Australia

[ Features ]
path = /yealink/config/Features/Phone.cfg
DND = 0
Call_Waiting = 1

[ AutoAnswer ]
path = /yealink/config/Features/Phone.cfg
Enable = 0

[ PhoneSetting ]
path = /yealink/config/Setting/Setting.cfg
Voicevolume = 4
Ringtype = Ring1
HandFreeSpkVol = 8
HandFreeMicVol = 8
HandSetSpkVol = 8
HandSetMicVol = 8
HeadSetSpkVol = 8
HeadSetMicVol = 8
 
[ Time ]
path = /yealink/config/Setting/Setting.cfg
TimeZone = +10
TimeZoneName = Australia(Brisbane)
TimeServer1 = $localip
TimeServer2 =
Interval = 1000
DateFormat = 0
TimeFormat = 0
SummerTime = 0
TimeZoneInstead = 10
StartTime =
EndTime =

[ memory1 ]
path = /yealink/config/vpPhone/vpPhone.ini
Line = 0
type = blf
Value = 5000
KEY_MODE = Asterisk
HotNumber =
HotLineId = 1
Callpickup =
IntercomId = -1
IntercomNumber =
DKtype = 16
PickupValue = *8

[ memory2 ]
path = /yealink/config/vpPhone/vpPhone.ini
Line = 0
type = bla
Value = 5005
KEY_MODE = Asterisk
HotNumber =
HotLineId = 1
Callpickup =
IntercomId = -1
IntercomNumber =
DKtype = 16
PickupValue = *8

[ ContactList ]
path = /tmp/download.cfg
server_address = $localip/contactData1.xml

[ RemotePhoneBook0 ]
path = /yealink/config/Setting/Setting.cfg
URL = http://$localip/phones/Phonebook0.xml
Name = SOS Phone Book
]
Regards

Gordon............

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Yealink Provisioning
« Reply #11 on: June 08, 2010, 06:53:40 AM »
Is it OK for us to lift this and use in the sail device templates Gordon?

Kind Regards

Jeff

Offline compsos

  • *
  • 472
  • +0/-0
Re: Yealink Provisioning
« Reply #12 on: June 08, 2010, 07:27:09 AM »
Jeff

No problems. Hope it helps the next user. Note we have only done it for the TP26P but the others are similar.
We have 25 of these being fitted in the next few weeks so will advise if we run into any issues and the users opinions.

G
Regards

Gordon............

Offline SARK devs

  • ****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: Yealink Provisioning
« Reply #13 on: June 08, 2010, 10:27:36 AM »
Thankyou

Best

Jeff

Offline compsos

  • *
  • 472
  • +0/-0
Re: Yealink Provisioning
« Reply #14 on: July 26, 2010, 10:34:37 AM »
Now having used Polycom, Aastra, Yealink and Oscom phones and Polycom and Snom conference phones, I think the Yealinks are just great. I am sure they can do a lot more in the provisioning than we have applied. Only downside is that they do not appear to be able to write back to the server any new phone numbers entered by the user. This may be just the configuration at the tftp server side. Polycoms can write back to the same server. Yealinks are a whole lot cheaper than Polycom and maybe a future firmware will overcome this shortfall. Will try giving each phone its own contactData1.xml file and see if that helps.

One suggestion with the provisioning is to get a unique user password per phone shift the [ user-password ] section to the $mac.cfg from the $y0000000004.cfg definition.

So far have not managed to get the Oscom's to talk to the server. They get an IP address but do not appear when "adopt"ing phones.
Regards

Gordon............