Установка и настройка Autoprovision для телефона Yealink SIP-T26P

Администратор,

asterisk
Большинство IP-телефонов используют для Autoprovision протокол TFTP, Yealink SIP-T26P тоже поддерживает TFTP/HTTP/HTTPS/FTP, для настройки будем использовать самый распространенный и удобный, TFTP.

1 ) Установка TFTP сервера
[Asterisk:CentOS], Fedora:

yum install tftp-server xinetd -y
chkconfig xinetd on
hkconfig tftp on chmod 777 /tftpboot
/etc/init.d/xinetd start
После установки сервера, в папке /tftpboot создаем конфигурационный файл "y000000000004.cfg", это общий конфигурационный файл которого будут использовать все телефоны модели Yealink T26

cd /tftpboot
touch 000000000004.cfg
для остальных моделей :

T28: y000000000000.cfg
T26: y000000000004.cfg
T22: y000000000005.cfg
T20: y000000000007.cfg
T12: y000000000008.cfg
Для настройки отдельных параметров используется файл с именем MAC адреса телефона (00156511e1ce.cfg  это файл конфигурационный для телефона с МАК адресом 00156511E1CE)

touch 00156511e1ce.cfg
Просмотр и описание содержания файлов.

y000000000004.cfg

[ autop_mode ]
path = /config/Setting/autop.cfg
mode =
schedule_min =
schedule_time =
schedule_time_end =
schedule_dayofweek =

[ PNP ]
path = /config/Setting/autop.cfg
Pnp = 0

[ cutom_option ]
path = /config/Setting/autop.cfg
cutom_option_code0 =
cutom_option_type0 = 1

[ autoprovision ]
path = /config/Setting/autop.cfg
server_address =
user =
password =

[ AES_KEY ]
path = /config/Setting/autop.cfg
aes_key_16 =
aes_key_16_mac =

[ ringtone ]
path = /tmp/download.cfg
server_address =

[ Lang ]
path = /tmp/download.cfg
server_address =

[ ContactList ]
path = /tmp/download.cfg
server_address =

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

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

[ firmware ]
path = /tmp/download.cfg
server_type =
server_ip =
server_port =
login_name =
login_pswd =
http_url   =
firmware_name =

[ DialNow ]
path = /tmp/dialnow.xml
1 =
2 =
.
.
.
.
20 =
00156511e1ce.cfg

[ account ]
path = /config/voip/sipAccount0.cfg
Enable = 1
Label = Имя
DisplayName = имя на дисплее телефона
AuthName =  номер или акк. провайдера
UserName = номер или акк. провайдера
password = пароль
SIPServerHost = IP или домен провайдера
SIPServerPort = 5060
UseOutboundProxy = 0
OutboundHost =
OutboundPort = 5060
Transport = 0
BakOutboundHost =
BakOutboundPort = 5060
proxy-require =
AnonymousCall = 0
RejectAnonymousCall = 0
Expire = 3600
SIPListenPort = 5060
Enable 100Rel = 0
precondition = 0
SubsribeRegister = 0
SubsribeMWI = 0
CIDSource = 0
EnableSessionTimer = 0
SessionExpires =
SessionRefresher = 0
EnableUserEqualPhone = 0
srtp_encryption = 0
ptime = 20
ShareLine =
dialoginfo_callpickup =
MissedCallLog = 1
AutoAnswer = 0
AnonymousCall_OnCode =
AnonymousCall_OffCode =
AnonymousReject_OnCode =
AnonymousReject_OffCode =
BLANumber =

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

[ NAT ]
path = /config/voip/sipAccount0.cfg
NATTraversal = 0
STUNServer =
STUNPort = 3478
EnableUDPUpdate = 1
UDPUpdateTime = 30
rport = 0

[ ADVANCED ]
path = /config/voip/sipAccount0.cfg
default_t1 = 0.5
default_t2 = 4
default_t4 = 5

[blf]
path = /config/voip/sipAccount0.cfg
SubscribePeriod = 1800
BLFList_URI =

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

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

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

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

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


[ audio5 ]
path = /config/voip/sipAccount0.cfg
enable = 1
PayloadType = G722
priority = 4
rtpmap = 9

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

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

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

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

[ WAN ]
path = /config/Network/Network.cfg
#WANType:0:DHCP,1:PPPoE,2:StaticIP
WANType = 0
WANStaticIP =
WANSubnetMask =
WANDefaultGateway =

[ DNS ]
path = /config/Network/Network.cfg
PrimaryDNS =
SecondaryDNS =

[ PPPoE ]
path = /config/Network/Network.cfg
PPPoEUser =
PPPoEPWD =

[ LAN ]
path = /config/Network/Network.cfg
#LANTYPE:0:Router, 1:Bridge
LANTYPE = 1
RouterIP = 10.0.0.1
LANSubnetMask = 255.255.255.0
EnableDHCP = 1
DHCPStartIP = 10.0.0.10
DHCPEndIP = 10.0.0.100

[ VLAN ]
path = /config/Network/Network.cfg
#ISVLAN,VID and USRPRIORITY are used for VLAN on LAN port
#PC_PORT_VLAN_ENABLE,PC_PORT_VID and PC_PORT_PRIORITY are used for PC port
ISVLAN = 0
VID = 0
USRPRIORITY = 0
PC_PORT_VLAN_ENABLE = 0
PC_PORT_VID = 0
PC_PORT_PRIORITY = 0

[ QOS ]
path = /config/Network/Network.cfg
SIGNALTOS = 40
RTPTOS = 40

[ RTPPORT ]
path = /config/Network/Network.cfg
MaxRTPPort = 11800
MinRTPPort = 11780

[ SYSLOG ]
path = /config/Network/Network.cfg
#specify the server for syslog storage
SyslogdIP =

[ Lang ]
path = /config/Setting/Setting.cfg
#WebLanguage is the setting of language on web management
WebLanguage =

[ Time ]
path = /config/Setting/Setting.cfg
TimeZone = +8
TimeServer1 = cn.pool.ntp.org
TimeServer2 = cn.pool.ntp.org
Interval = 1000
#Set daylight saving time.SummerTime 0 means disable,1 means enable, 2 means automatic
SummerTime = 2
StartTime =
EndTime =
TimeFormat =
DateFormat =
OffSetTime =
DSTTimeType =

[ PhoneSetting ]
path = /config/Setting/Setting.cfg
InterDigitTime = 4
FlashHookTimer = 1
Lock = 0
Ringtype = Ring1.wav
BackLight = 2
BacklightTime = 30
ProductName =
Contrast =
HandFreeSpkVol = 8
HandFreeMicVol = 8
HandSetSpkVol = 8
HandSetMicVol = 8
HeadSetSpkVol = 8
HeadSetMicVol = 8
RingVol= 8

[ SignalToneVol ]
path = /config/Setting/Setting.cfg
Handset = 8
Headset = 8
Handfree = 8

[ AlertInfo0 ]
path = /config/Setting/Setting.cfg
Text =
Ringer =

[ AlertInfo1 ]
path = /config/Setting/Setting.cfg
Text =
Ringer =

[ AlertInfo2 ]
path = /config/Setting/Setting.cfg
Text =
Ringer =

[ AlertInfo3 ]
path = /config/Setting/Setting.cfg
Text =
Ringer =

[ AlertInfo4 ]
path = /config/Setting/Setting.cfg
Text =
Ringer =

[ AlertInfo5 ]
path = /config/Setting/Setting.cfg
Text =
Ringer =

[ AlertInfo6 ]
path = /config/Setting/Setting.cfg
Text =
Ringer =

[ AlertInfo7 ]
path = /config/Setting/Setting.cfg
Text =
Ringer =

[ AlertInfo8 ]
path = /config/Setting/Setting.cfg
Text =
Ringer =

[ AlertInfo9 ]
path = /config/Setting/Setting.cfg
Text =
Ringer =

[ AlwaysFWD ]
path = /config/Features/Forward.cfg
Enable = 0
Target =
On_Code =
Off_Code =

[ BusyFWD ]
path = /config/Features/Forward.cfg
Enable = 0
Target =
On_Code =
Off_Code =

[ TimeoutFWD ]
path = /config/Features/Forward.cfg
Enable = 0
Target =
Timeout = 10
On_Code =
Off_Code =

[ Features ]
path = /config/Features/Phone.cfg
Call_Waiting = 1
Hotlinenumber =
BusyToneDelay =
LCD_Logo =
DND_Code =
Refuse_Code =
DND_On_Code =
DND_Off_Code =
ButtonSoundOn = 1

[ AutoRedial ]
path = /config/Features/Phone.cfg
EnableRedial = 0
RedialInterval = 10
RedialTimes = 10

[ PoundSend ]
path = /config/Features/Phone.cfg
#Set # key or * key as send. #:1 and *:2
Enable = 1

[ Emergency ]
path = /config/Features/Phone.cfg
Num =

[ memory1 ]
path = /config/vpPhone/vpPhone.ini
#Line means the line taken in use.0 stands for auto,1 stands for line1...except for one condition when type is blf(DKtype:16),0 stands for line1,1 stands for line2...
#DKtype defines the type of the key,ranging from 0 to 17
#DKtype 0:N/A           1:Conference    2:Forward           3:Transfer
#DKtype 4:Hold          5:DND           6:Redial            7:Call Return
#DKtype 8:SMS           9:Call Pickup   10:Call Park        11:DTMF
#DKtype 12:Voicemail    13:SpeedDial    14:Intercom         15:Line(for line key only)
#DKtype 16:BLF          17:URL          18:Group Listening              19:Public Hold
#DKtype 20:Private Hold 21:Shared Line  22:XML PhoneBook

#Set Memory key1
type =
Line =
Value =
PickupValue =
DKtype =

[ memory2 ]
path = /config/vpPhone/vpPhone.ini
#Set Memory key2
type =
Line =
Value =
PickupValue =
DKtype =

[ memory3 ]
path = /config/vpPhone/vpPhone.ini
#Set Memory key3
type =
Line =
Value =
PickupValue =
DKtype =

[ memory4 ]
path = /config/vpPhone/vpPhone.ini
#Set Memory key4
type =
Line =
Value =
PickupValue =
DKtype =

[ memory5 ]
path = /config/vpPhone/vpPhone.ini
#Set Memory key5
type =
Line =
Value =
PickupValue =
DKtype =

[ memory6 ]
path = /config/vpPhone/vpPhone.ini
#Set Memory key6
type =
Line =
Value =
PickupValue =
DKtype =

[ memory7 ]
path = /config/vpPhone/vpPhone.ini
#Set Memory key7
type =
Line =
Value =
PickupValue =
DKtype =

[ memory8 ]
path = /config/vpPhone/vpPhone.ini
#Set Memory key8
type =
Line =
Value =
PickupValue =
DKtype =

[ memory9 ]
path = /config/vpPhone/vpPhone.ini
#Set Memory key9
type =
Line =
Value =
PickupValue =
DKtype =

[ memory10 ]
path = /config/vpPhone/vpPhone.ini
#Set Memory key10
type =
Line =
Value =
PickupValue =
DKtype =

[ memory11 ]
path = /config/vpPhone/vpPhone.ini
#from memory11 to memory 16 are settings for 6 line keys of T28
#DKtype value is the same as it is defined for memory keys.Except for one that the line keys cannot be set to blf(DKtype:16).
#Set line key1
DKtype =
Line =
Value =

[ memory12 ]
path = /config/vpPhone/vpPhone.ini
#Set line key2
DKtype =
Line =
Value =

[ memory13 ]
path = /config/vpPhone/vpPhone.ini
#Set line key2
DKtype =
Line =
Value =

[ memory14 ]
path = /config/vpPhone/vpPhone.ini
#Set line key2
DKtype =
Line =
Value =

[ memory15 ]
path = /config/vpPhone/vpPhone.ini
#Set line key2
DKtype =
Line =
Value =

[ memory16 ]
path = /config/vpPhone/vpPhone.ini
#Set line key2
DKtype =
Line =
Value =

[ Profile ]
path = /config/vpm.cfg
VAD = 0
CNG = 1
ECHO = 1
SIDE_TONE = -3

[ Jitter ]
path = /config/vpm.cfg
Adaptive = 1
Min = 0
Max = 300
Nominal = 120

[ Message ]
path = /config/Features/Message.cfg
#Set voicemail number for each account
VoiceNumber0 =
VoiceNumber1 =
VoiceNumber2 =
VoiceNumber3 =
VoiceNumber4 =
VoiceNumber5 =

[ Country ]
path = /config/voip/tone.ini
#The tones are defined by countries.If Country = Custom,the customized values will be used.
Country =

[ Tone Param ]
path = /config/voip/tone.ini
dial =
ring =
busy =
congestion =
callwaiting =
dialrecall =
record =
info =
stutter =
message =
autoanswer =

[ Default ]
path = /config/voip/tone.ini
dial = 1
ring = 1
busy = 1
congestion = 1
callwaiting = 1
dialrecall = 1
record = 1
info = 1
stutter = 1
message = 1
autoanswer = 1

[ AreaCode ]
path = /config/DialRule/areacode.cfg
code =
minlen =
maxlen =

[ BlockOut ]
path = /config/DialRule/BlockOut.cfg
#Set Block Out number.
1 =
2 =
3 =
4 =
5 =
6 =
7 =
8 =
9 =
10 =

[ RemotePhoneBook0 ]
path = /config/Setting/Setting.cfg
URL =
Name =

[ RemotePhoneBook1 ]
path = /config/Setting/Setting.cfg
URL =
Name =

[ RemotePhoneBook2 ]
path = /config/Setting/Setting.cfg
URL =
Name =

[ RemotePhoneBook3 ]
path = /config/Setting/Setting.cfg
URL =
Name =

[ RemotePhoneBook4 ]
path = /config/Setting/Setting.cfg
URL =
Name =

[ Webserver Type ]
path = /config/Advanced/Advanced.cfg
WebType =

[ Key0 ]
Path = /config/vpPhone/Ext38_00000000000001.cfg
DKtype =
Line =
Value =
type =
PickupValue =

[ Key1 ]
Path = /config/vpPhone/Ext38_00000000000001.cfg
DKtype =
Line =
Value =
type =
PickupValue =

[ Key0 ]
Path = /config/vpPhone/Ext38_00000000000002.cfg
DKtype =
Line =
Value =
type =
PickupValue =

[ Key1 ]
Path = /config/vpPhone/Ext38_00000000000002.cfg
DKtype =
Line =
Value =
type =
PickupValue =
После создания и заполнения конфигурационных файлов переходим к настройке Autoprovision в телефоне. Для этого установите Custom Option Type=IP Address (Способ запроса=IP-адрес) и ниже укажите его. Если вы используете другие протоколы для автоконфигурации укажите имя и пароль при надобности. 
Unable to render embedded object: File (pic.png) not found.


перезагружаем телефон и смотрим логи.

tail -f /var/log/messages
если все сделано правильно, вы должны увидеть

Jun  9 12:11:49 pbx xinetd[9236]: START: tftp pid=9241 from=192.168.0.36
Jun  9 12:11:49 pbx in.tftpd[9242]: RRQ from 188.72.105.36 filename y000000000004.cfg
Jun  9 12:11:56 pbx in.tftpd[9249]: RRQ from 188.72.105.36 filename y000000000004.cfg
Jun  9 12:12:04 pbx in.tftpd[9256]: RRQ from 188.72.105.36 filename 00156511e1ce.cfg
Jun  9 12:12:11 pbx in.tftpd[9260]: RRQ from 188.72.105.36 filename 00156511e1ce.cfg
Jun  9 12:27:11 pbx xinetd[9236]: EXIT: tftp status=0 pid=9241 duration=922(sec)