📜 ⬆️ ⬇️

VoIP Zoo - Provisioning

Introduction


Once the management approved the experiment on the implementation of IP telephony in our office. Since my experience in this area was scanty, the task aroused great interest in me and I plunged into the study of various aspects of the issue. At the end of the dive, I decided to share the acquired knowledge - in the hope that it would be useful to someone. So…

Initial data


Asterisk is selected and deployed as an IP PBX. The park of phones consists of Cisco 7906g, Panasonic UT-KX123B, Grandstream GXP1400 and Dlink DPH-150S (E) / F3, Yealink T19 and T21 devices. This variation is due to the fact that in the framework of the experiment it was decided to try a little bit of everything in order to form an opinion on the price / quality / convenience ratio.

Task


Maximally simplify and unify the process of setting up new devices. All phones must be synchronized in time, have a phone book loaded from the server and provide access to the settings for the administrator.
')
The solution to this problem is simple - to implement automatic phone configuration, the so-called. Provisioning. Actually, my implementation of this remarkable function will be discussed.

Configure tftpd, dhcpd


To distribute the settings to the phones, I chose tftp as a universal option, supported by all platforms, easy to configure and manage.

No specific configuration for tftp was required. I installed a regular tftpd and placed all the necessary files in its root directory.
Files with settings placed in directories in accordance with the manufacturer of the phone. True, the device from Cisco has not reached into its folder, I had to keep it in the root.

In order to indicate to the telephones the location of the tftp server, I used option-66. In addition, he divided them into separate classes by manufacturer. Each class received its own address segment and an individual folder for configuration files. By the way, the devices from D-link had to be calculated by MAC addresses, since they do not provide information about the manufacturer in the dhcp request.

Dhcpd.conf fragment
  # Specify the necessary options 
 option option-66 code 66 = text;

 class "panasonic" {
	 match if substring (option vendor-class-identifier, 0.9) = "Panasonic";
	 option option-66 "10.1.1.50/panasonic/";
 }
 class "cisco" {
	 match if substring (option vendor-class-identifier, 0.36) = "Cisco Systems, Inc. IP Phone CP-7906";
	 option option-66 "10.1.1.50/cisco/";
 }

 class "grandstream" {
  match if substring (option vendor-class-identifier, 0.11) = "Grandstream";
  option option-66 "10.1.1.50/grandstream/";
 }

 class "dlink" {
	 match if (binary-to-ascii (16,8, ":", substring (hardware, 1,4)) = "c8: d3: a3: 8d") or
	 (binary-to-ascii (16.8, ":", substring (hardware, 1,4)) = "90: 94: e4: 72");
	 option option-66 "10.1.1.50/dlink/";
 }

 class "yealink" {
                 match if substring (option vendor-class-identifier, 0,7) = "Yealink";
                 option option-66 "10.1.1.50/yealink/";
         }



Phones had to be forcibly excluded from the common pool. Otherwise, they didn’t want to go to their “splash pool”.
Subnet Settings Example
 subnet 10.1.1.0 netmask 255.255.255.0 {
         option routers 10.1.1.1;
         pool {
                 deny members of "cisco";
                 deny members of "panasonic";
                 deny members of "dlink";
                 range 10.1.1.230 10.1.1.240;
         }
         pool {
                 allow members of "cisco";
                 range 10.1.1.65 10.1.1.69;
         }
         pool {
                 allow members of "panasonic";
                 range 10.1.1.60 10.1.1.64;
         }
         pool {
                 allow members of "dlink";
                 range 10.1.1.55 10.1.1.59;
         }
 }


After restarting all the services involved, the phones confidently went over the settings to the tftp-server they set. It remains only to place them there.

Cisco 7906


These devices I got in the original packaging. I had to change it to make friends with asterisk. But this is a separate story. In the specific case for setting up the device, I, according to the instructions, created the file SEPAABBCCDDEEFF.cnf.xml in the root of the tftp server. Where AABBCCDDEEFF is the MAC address of the machine.

About setting up phones from Cisco has been written more than once, so I'll just leave the working file with the settings.
Settings for cisco
 <? xml version = "1.0" encoding = "UTF-8"?> <device xsi: type = "axl: XIPPhone" ctiid = "94"> <fullConfig> true </ fullConfig> <deviceprotocol> SIP </ deviceProtocol> <sshUserId> root </ sshUserId> <sshPassword> ADMIN_PWD </ sshPassword> <devicePool> <dateTimeSetting> <dateTemplate> DMY </ dateTemplate> <timeZone> Central Pacific Standard Time </ timeZone> <ntps> <ntp> <name> 10.1.1.4 </ name> <ntpMode> Unicast </ ntpMode> </ ntp> </ ntps> </ dateTimeSetting> <callManagerGroup> <members> <member priority = "0"> <callManager> <name> 10.1.1.50 </ name> <ports> <ethernetPhonePort> 2000 </ ethernetPhonePort> <sipPort> 5060 </ sipPort> <securedSipPort> 5061 </ securedSipPort> </ ports> <processNodeName> 10.1.1.50 </ processNodeName> </ callManager> / member> </ members> </ callManagerGroup> <srstInfo> <srstOption> Disable </ srstOption> </ srstInfo> <connectionMonitorDuration> 120 </ connectionMonitorDuration> </ devicePool> <sipProfile> <sipCallFeatures> <cnfhst in anti-ioin> <sipCallFonerDo>> <sipCallFoatures> <sipCallFo> cnfJoinEnabled> <callForwardURI> x-cisco-serviceuri-cfwdall </ callForwardURI> <cal  lPickupURI> x-cisco-serviceuri-pickup </ callPickupURI> x-cisco-serviceuri-opickup </ i> <callPickupListURI> <callPickupGroupURI> x-cisco-serviceuri-gpickup </ callPickupURI> x-cisco-serviceuri-gpickup </ callPickupURI> meetme </ meetMeServiceURI> <<abbreviatedDialURI> x-cisco-serviceuri-abbrdial. > <> anonymCallBlock> 2 </ anonymousCallBlock> <callerIdBlocking> 2 </ caltIdBlocking> <dndControl> 0 </ dndControl> <remoteCcEnable> true </ remoteCcEnable> <retainForwardInformation> false </ retainForwardInformation> </ sipEcable> <retainForwardInformation> false </ retainForwardInformation> </ sipEcable> <retainForwardInformation> > 6 </ timerSubscr  ibeExpires> <timerSubscribeDelta> 5 </ timerSubscribeDelta> <timerT1> 500 </ timerT1> <timerT2> 4000 </ timerT2> <maxRedirects> 70 </ maxRedirects> <remotePartyID> true </ remotePartyID> <userInfo> None </ userInfo> </ sipStack> <autoAnswerTimer> 1 </ autoAnswerTimer> <autoAnswerAltBehavior> false </ autoAnswerAltBehavior> <autoAnswerOverride> true </ autoAnswerOverride> <transferOnhookEnabled> false </ transferOnhokEnabled> / <> preferred copper optics <phone>  ig> <poundEndOfDial> false </ poundEndOfDial> <startMediaPort> 16384 </ startMediaPort> <stopMediaPort> 32766 </ stopMediaPort> <sipLines> <line button = "1" lineIndex = "1"> <featureID> 9 </ featureID> <proxy> 10.1.1.50 </ proxy> <port> 5060 </ port> <autoAnswer> <autoAnswerEnabled> 2 </ autoAnswerEnabled> </ autoAnswer> <callWaiting> 3 </ callWaiting> <sharedLine> false </ sharedLine> < messageWaitingLampPolicy> 3 </ messageWaitingLampPolicy> <messagesNumber> </ messagesNumber> <ringSettingIdle> 4 </ ringSettingIdle> <ringSettingActive> 5 </ ringSettingActive> <forwardCallInfoDisplay> <callerName> true </ callerName> <> <> <callCallInfoDisplay> <callerName> true </ callerName> <> <> redirectedNumber> false </ redirectedNumber> <dialedNumber> true </ dialedNumber> </ forwardCallInfoDisplay> <featureLabel> </ featureLabel> <displayName> User # 103 </ displayName> <name> 103 </ name> <authName> 103 << authName> <authPassword> SIP_PWD </ authPassword> </ line> </ sipLines> <externalNumberMask> $ num </ externalNumberMask> <voipControlPort> 5060 </ voipControlPort> <dscpAAudio> 184 </ dscpForAudio  > <ringSettingBusyStationPolicy> 0 </ ringSettingBusyStationPolicy> <dialTemplate> dialplan.xml </ dialTemplate> </ sipProfile> <commonProfile> <phonePassword> * 0 #> callLogBlfEnabled> </ commonProfile> <loadInformation> </ loadInformation> <vendorConfig> <disableSpeaker> false </ disableSpeaker> <disableSpeakerAndHeadset> false </ disableSpeakerAndHeadset> <forwardingDelay> 1 </ forwardingDelay <<<>> <> </ div> <> </ RTI>> 1 </ /> </ s>> </ /> / </ /> / etc / 1> </ forwardSeakerAndHeadset> > 1 </ settingsAccess> <garp> 0 </ garp> <voiceVlanAccess> 0 </ voiceVlanAccess> <videoCapability> 0 </ videoCapability> <autoSelectLineEnable> 1 </ autoSelectLineEnable> <webAccess> 0 </ webAccess> <daysDisplayNotActive> 1 , 7 </ daysDisplayNotActive> <displayOnTime> 09:00 </ displayOnTime> <displayOnDuration> 12:00 </ displayOnDuration> <displayIdleTimeout> 01:00 </ displayIdleTimeout> <spanToPCPort> 1 </ spanToPCPort> <loggingDisplay> 2 < loggingDisplay> <loadServer> 10.1.1.50 </ loadServer> <recordingTone> 0 </ recordingTone> <reco  rdingToneLocalVolume> 100 <objekt> objekt </ hands <userLocale> <name> Russian_Russian_Federation </ name> <langCode> en_US </ langCode> <version> </ version> <winCharSet> utf-8 </ winCharSet> </ userLocale> <networkLocale> </ networkLocale> <networkLocaleInf  o> <name> </ name> <version> </ version> </ networkLocaleInfo> <deviceSecurityMode> 1 </ deviceSecurityMode> <idleTimeout> 0 </ idleTimeout> <authenticationURL> </ authenticationURL> <directoryURL> http: // 10.1.1.50/provisioning/cisco-services.xml </ directoryURL> <idleURL> </ idleURL> <informationURL> </ informationURL> <messagesURL> </ messagesURL> <proxyServerURL> </ proxyServerURL> <servicesURL> http: // 10.1.1.a.kz 0 </ singleButtonBarge> <capfAuthMode> 0 </ capfAuthMode> <capfList> <capf> <phonePort> 3804 </ phonePort> <! - <processNodeName> 10.1.1.50 </ processNodeName> -> </ capf> </ capfList> <certHash> </ certHash> <encrConfig> false </ encrConfig> <advertiseG722Codec> 1 </ advertiseG722Codec> </ device> 



D-Link DPH-150S / F3


If you only have to buy a phone in this series, be careful, auto-tuning is supported only on 150S / F3 devices. On the 150S / F2 device, which fell into my hands, I did not find such functionality.

The configuration file can be either in xml format or plain text. For xml there is one requirement: the tag must be at the beginning of the line, otherwise the parser will ignore it and the value of the corresponding parameter will not change.

To configure the phone uses two files. f0D00580000.cfg - to store the settings of all the phones and 00112233aabb.cfg (MAC address in lowercase) for individual settings. Individual settings naturally take precedence.

A full set of settings has more than a thousand lines, so as not to clutter an article, I will describe the minimum sufficient set of settings.

The root node VOIP_CONFIG_FILE and the version node nested in it are required . Settings will be applied only if the file version is higher than the current settings in the device. You can find out this value through the phone's .web interface in the maintenance section (system management). For phones with factory settings in both cases, this is 2.0002. In addition, the version of the individual file must be larger than the version of the shared file.

The first is a common configuration file for all phones. In fact, it stores all settings, an individual file will be responsible only for the phone number and the inscription on the screen.

In the two blocks below, the time zone and time synchronization parameters are set, the initial port for the RTP and the network bridge between the WAN and LAN connectors of the device are turned on.

Fragment number 1
 <GLOBAL_CONFIG_MODULE>
 <WAN_Mode> DHCP </ WAN_Mode>
 <Default_Protocol> 2 </ Default_Protocol>
 <Enable_DHCP> 1 </ Enable_DHCP>
 <DHCP_Auto_DNS> 1 </ DHCP_Auto_DNS>
 <DHCP_Auto_Time> 0 </ DHCP_Auto_Time>
 <Host_Name> VOIP </ Host_Name>
 <RTP_Initial_Port> 10000 </ RTP_Initial_Port>
 <RTP_Port_Quantity> 200 </ RTP_Port_Quantity>
 <SNTP_Server> 10.1.1.4 </ SNTP_Server>
 <Enable_SNTP> 1 </ Enable_SNTP>
 <Time_Zone> 71 </ Time_Zone>
 <Time_Zone_Name> UCT_011 </ Time_Zone_Name>
 <Enable_DST> 0 </ Enable_DST>
 <SNTP_Timeout> 60 </ SNTP_Timeout>
 <Default_UI> 12 </ Default_UI>
 <MTU_Length> 1500 </ MTU_Length>
 </ GLOBAL_CONFIG_MODULE>
 <LAN_CONFIG_MODULE>
 <Enable_Bridge_Mode> 1 </ Enable_Bridge_Mode>
 <Enable_Port_Mirror> 1 </ Enable_Port_Mirror>
 </ LAN_CONFIG_MODULE>


Actually the names of configuration parameters are sufficiently “speaking” in order not to describe them in detail.
SIP for one line
 <SIP_CONFIG_MODULE>
 <SIP__Port> 5060 </ SIP__Port>
 <SIP_Line_List>
 <SIP_Line_List_Entry>
 <Id> sip1 </ id>
 <Register_Addr> 10.1.1.50 </ Register_Addr>
 <Register_Port> 5060 </ Register_Port>
 <Register_TTL> 3600 </ Register_TTL>
 <Enable_Reg> 1 </ Enable_Reg>
 <Proxy_Addr> 10.1.1.50 </ Proxy_Addr>
 <DTMF_Mode> 1 </ DTMF_Mode>
 <DTMF_Info_Mode> 0 </ DTMF_Info_Mode>
 <VoiceCodecMap> G711A, G711U, G722 </ VoiceCodecMap>
 </ SIP_Line_List_Entry>
 </ SIP_Line_List>
 </ SIP_CONFIG_MODULE>


Remote control settings
 <MMI_CONFIG_MODULE>
 <Telnet_Port> 23 </ Telnet_Port>
 <Web_Port> 80 </ Web_Port>
 <Web_Server_Type> 0 </ Web_Server_Type>
 <Https_Web_Port> 443 </ Https_Web_Port>
 <Remote_Control> 1 </ Remote_Control>
 <Enable_MMI_Filter> 0 </ Enable_MMI_Filter>
 <Telnet_Prompt> </ Telnet_Prompt>
 <MMI_Filter>
 <MMI_Filter_Entry>
 <Id> item1 </ id>
 <First_IP> 10.1.1.152 </ First_IP>
 <End_IP> 10.1.1.160 </ End_IP>
 </ MMI_Filter_Entry>
 </ MMI_Filter>
 <MMI_Account>
 <MMI_Account_Entry>
 <ID> Account1 </ ID>
 <Name> admin </ Name>
 <Password> ADMIN_PWD </ Password>
 <Level> 10 </ Level>
 </ MMI_Account_Entry>
 <MMI_Account_Entry>
 <ID> Account2 </ ID>
 <Name> guest </ name>
 <Password> GUEST_PWD </ Password>
 <Level> 5 </ Level>
 </ MMI_Account_Entry>
 </ MMI_Account>
 </ MMI_CONFIG_MODULE>


Phone settings
 <PHONE_CONFIG_MODULE>
 <Menu_Password> 123 </ Menu_Password>
 <KeyLock_Password> 123 </ KeyLock_Password>
 <Fast_Keylock_Code> </ Fast_Keylock_Code>
 <Enable_KeyLock> 0 </ Enable_KeyLock>
 <Emergency_Call> 112 </ Emergency_Call>
 <LCD_Title> Company </ LCD_Title>
 <LCD_Constrast> 5 </ LCD_Constrast>
 <LCD_Luminance> 1 </ LCD_Luminance>
 <Backlight_Off_Time> 30 </ Backlight_Off_Time>
 <Enable_Power_LED> 0 </ Enable_Power_LED>
 <Time_Display_Style> 0 </ Time_Display_Style>
 <Enable_TimeDisplay> 1 </ Enable_TimeDisplay>
 <Alarm__Clock> 0,, 1 </ Alarm__Clock>
 <Date_Display_Style> 0 </ Date_Display_Style>
 <Date_Separator> 0 </ Date_Separator>
 <Enable_Pre-Dial> 1 </ Enable_Pre-Dial>
 <Xml_PhoneBook>
 <Xml_PhoneBook_Entry>
 <ID> XML-PBook1 </ ID>
 <Name> Phonebook </ Name>
 <Addr> http://10.1.1.50/provisioning/dlink-phonebook.xml </ Addr>
 <Auth>: </ auth>
 <Policy> 0 </ Policy>
 <Sipline> 0 </ Sipline>
 </ Xml_PhoneBook_Entry>
 </ Xml_PhoneBook>
 <Phonebook_Groups> friend, home, work, business, classmate, colleague </ Phonebook_Groups>
 </ PHONE_CONFIG_MODULE>


All other settings will remain “default”. Now, any Dlink phone connected to the network will immediately accept a common set of parameters. To set individual parameters for the device you need a separate file. It only needs to specify the necessary settings for the individual subscriber.
subscriber settings
 <? xml version = "1.0" encoding = "UTF-8"?>
 <VOIP_CONFIG_FILE>
 <version> 2.0006 </ version>
 <SIP_CONFIG_MODULE>
 <SIP_Line_List>
 <SIP_Line_List_Entry>
 <Id> sip1 </ id>
 <Display_Name> User # 117 </ Display_Name>
 <Phone_Number> 117 </ Phone_Number>
 <Register_Port> 5060 </ Register_Port>
 <Register_User> 117 </ Register_User>
 <Register_Pswd> SIP_PWD </ Register_Pswd>
 <Register_TTL> 3600 </ Register_TTL>
 <Enable_Reg> 1 </ Enable_Reg>
 <Proxy_Port> 5060 </ Proxy_Port>
 <Proxy_User> 117 </ Proxy_User>
 <Proxy_Pswd> SIP_PWD </ Proxy_Pswd>
 </ SIP_Line_List_Entry>
 </ SIP_Line_List>
 </ SIP_CONFIG_MODULE>
 </ VOIP_CONFIG_FILE>


Panasonic UT-KX123B


These devices receive settings in a slightly different pattern. The configuration is stored in text files. The maximum size of the configuration file is 120 KB. Regardless of the number of files, their total size should not exceed 120 KB.
A configuration file consists of a set of lines on which the following conditions apply:



Such a serious set of requirements for the configuration file, frankly, upset me. In my opinion, the implementation of interaction with the management server for Panasonic phones is made extremely inconvenient. By this parameter, the phone is significantly inferior to the rest.
When you first turn on the device (or after resetting it to the factory settings), it tries to load a so-called product file (in this case, KX-UT123RU.cfg), which should contain the paths to the rest of the configuration files.
Product file
# Panasonic SIP Phone Standard Format File # DO NOT CHANGE THIS LINE!

CFG_STANDARD_FILE_PATH = "tftp: //10.1.1.50/panasonic/ {mac} .cfg"
CFG_PRODUCT_FILE_PATH = "tftp: //10.1.1.50/panasonic/KX-UT123RU.cfg"
CFG_MASTER_FILE_PATH = "tftp: //10.1.1.50/panasonic/master.cfg"

After that, the phone will display a message on the successful completion of the preparation and will wait until it is rebooted. And after the reboot, it will start processing the configuration files it needs.

In the master.cfg file, it is recommended to specify general settings for all phones. As in the case of Dlink, I will only indicate some parameters. The names of the remaining parameters and their values ​​can be found in the documentation on the manufacturer's website
master.cfg
################################################## ##########
# System Settings #
################################################## ##########
## Login Account Settings
ADMIN_ID = "admin"
ADMIN_PASS = "ADMIN_PWD"
USER_ID = "user"
USER_PASS = "USER_PWD"

## System Time Settings
NTP_ADDR = "10.1.1.4"
TIME_ZONE = "660"
DST_ENABLE = "N"
DST_OFFSET = "60"
DST_START_MONTH = "3"
DST_START_ORDINAL_DAY = "2"
DST_START_DAY_OF_WEEK = "0"
DST_START_TIME = "120"
DST_STOP_MONTH = "10"
DST_STOP_ORDINAL_DAY = "2"
DST_STOP_DAY_OF_WEEK = "0"
DST_STOP_TIME = "120"
LOCAL_TIME_ZONE_POSIX = ""

## Syslog Settings
SYSLOG_ADDR = "10.1.1.50"
SYSLOG_PORT = "514"
SYSLOG_EVENT_SIP = "6"
SYSLOG_EVENT_CFG = "6"
SYSLOG_EVENT_VOIP = "6"
SYSLOG_EVENT_TEL = "6"

## Provisioning Settings
OPTION66_ENABLE = "Y"
OPTION66_REBOOT = "N"
PROVISION_ENABLE = "Y"
CFG_STANDARD_FILE_PATH = "tftp: //10.1.1.50/panasonic/ {mac} .cfg"
CFG_PRODUCT_FILE_PATH = "tftp: //10.1.1.50/panasonic/KX-UT123RU.cfg"
CFG_MASTER_FILE_PATH = "tftp: //10.1.1.50/panasonic/master.cfg"

################################################## ##########
# Network Settings #
################################################## ##########
## IP Settings
CONNECTION_TYPE = "1"
HOST_NAME = "UT123"
DHCP_DNS_ENABLE = "Y"
STATIC_IP_ADDRESS = ""
STATIC_SUBNET = ""
STATIC_GATEWAY = ""
USER_DNS1_ADDR = ""
USER_DNS2_ADDR = ""

## DNS Settings
DNS_QRY_PRLL = "Y"
DNS_PRIORITY = "N"
DNS1_ADDR = "10.1.1.1"
DNS2_ADDR = ""

## HTTP Settings
HTTPD_PORTOPEN_AUTO = "Y"
HTTP_VER = "1"
HTTP_USER_AGENT = "Panasonic_ {MODEL} / {fwver} ({mac})"
HTTP_SSL_VERIFY = "0"
CFG_ROOT_CERTIFICATE_PATH = ""

## XML Application Settings
XML_HTTPD_PORT = "6666"
XMLAPP_ENABLE = "Y"
XMLAPP_USERID = ""
XMLAPP_USERPASS = ""
XMLAPP_START_URL = ""
XMLAPP_INITIAL_URL = ""
XMLAPP_INCOMING_URL = ""
XMLAPP_TALKING_URL = ""
XMLAPP_MAKECALL_URL = ""
XMLAPP_CALLLOG_URL = ""
XMLAPP_IDLING_URL = ""
XMLAPP_LDAP_URL = " 10.1.1.50/provisioning/panasonic-phonebook.xml "
XMLAPP_LDAP_USERID = ""
XMLAPP_LDAP_USERPASS = ""

In the individual device configuration file, by tradition, only the subscriber’s settings remain.
aabbccddeeff.cfg
DISPLAY_NAME_1 = "User # 168"

PHONE_NUMBER_1 = "168"
SIP_URI_1 = "168"
LINE_ENABLE_1 = "Enabled"
PROFILE_ENABLE_1 = "Enabled"
SIP_AUTHID_1 = "168"
SIP_PASS_1 = "SIP_PWD"


Grandstream GXP-1400


The parameters of these phones are stored in one xml file with the name cfg {mac} .xml. Or in a plain text cfg {mac}. This phone asks only for an individual configuration file, so optimizing the settings by bringing them into the general file will not work. Another feature of Grandstream settings is parameter naming. All are numbered and denoted as P ###. For example:

P1650 - is responsible for the web interface to manage the phone (0 - HTTPS, 1 - HTTP)
P47 - SIP server address for connection.

If the configuration is stored in a text file, the parameters do not require any grouping and go in any order. Lines starting with # are treated as comments.

If the settings are in the xml format, they should be nested in the <config version = ”1”> node, which in turn should be nested in <gs_provision version = "1">. All parameters are recorded as corresponding tags with the parameter value inside.
Setup example
 <? xml version = "1.0" encoding = "UTF-8"?>
 <gs_provision version = "1">
   <config version = "1">
     <P271> 1 </ P271>
     <! - Account Name.  Cannot be empty.  ->
     <P270> 109 </ P270>
     <! - SIP User ID ->
     <P35> 109 </ P35>
     <! - Authenticate ID ->
     <P36> 109 </ P36>
     <! - Authenticate password ->
     <P34> SIP_PWD </ P34>
     <! - Display Name (John Doe) ->
     <P3> User # 109 </ P3>
 <! - Common settings ->
         <P207> 10.1.1.50 </ P207>
         <P208> 2 </ P208>
    <P47> 10.1.1.50 </ P47> <! - line 1 sip server ->
    <P401> 0 </ P401> <! - Line 2 disable ->
    <P2> ADMIN_PWD </ P2> <! - admin password ->
    <P196> USER_PWD </ P196> <! - user web console pwd ->
    <P1362> en </ P1362> <! - display lang ->
         <P212> 0 </ P212> <! - Upgrade from TFTP ->
         <P192> 10.1.1.50/grandstream </ P192>
    <P1357> 1 </ P1357> <! - lock configuration via phone (basic only) ->
    <P64> TZc-11 </ P64> <! - timezone ->
    <P30> 10.1.1.4 </ P30> <! - NTP-server ->
         <P330> 1 </ P330> <! - Download PB from HTTP ->
         <P331> http://10.1.1.50/provisioning/grandstream </ P331> <! - phonebook base url ->
         <P333> 30 </ P333> <! - Auto update PB in 30 min ->
   </ config>
 </ gs_provision>


Yealink T19 and T21


The devices of these models support individual configuration files for devices and common for models. In my case, I had to place the general parameters in the files y000000000031.cfg and y000000000034.cfg, respectively. Individual configuration files are named according to the MAC address: 00112233aabb.cfg.

Settings for yealinks are stored in text format. Of the mandatory requirements only the presence in the first line of the file version, in the format #! Version: 1.0.0.1.

All parameters are written as parameter = value. Comments must begin with the "#" character. The names of the parameters and their values ​​can be found in the documentation on the manufacturer's website.
General settings
#! version: 1.0.0.1
#Configure the WAN port type; 0-DHCP (default), 1-PPPoE, 2-Static IP Address;
network.internet_port.type = 0
#Configure the PC port type; 0-Router, 1-Bridge (default);
network.bridge_mode = 1
#Configure the access type of the web server; 0-Disabled, 1-HTTP & HTTPS (default), 2-HTTP Only, 3-HTTPS Only;
network.web_server_type = 3
#Configure the maximum local RTP port. It ranges from 0 to 65535, the default value is 11800.
network.port.max_rtpport = 10100
#Configure the minimum local RTP port. It ranges from 0 to 65535, the default value is 11780.
network.port.min_rtpport = 10000
security.user_name.admin = root
security.user_password = root: ADMIN_PWD
security.user_name.user = user
security.user_password = user: USER_PWD
#Specify the web language, the valid values ​​are: English, Chinese, Turkish, Portuguese, Italian, French, Russian, Deutsch and Czech.
lang.wui = Russian
#Specify the LCD language, the English (default), Chinese_S, Chinese_T, German, French, Turkish, Italian, Polish, Spanish and Portuguese.
lang.gui = Russian
#Configure the time zone and time zone name. The time zone ranges from -11 to +12, the default value is +8.
#The default time zone name is China (Beijing).
#Refer to Yealink IP Phones User Guide for more available time zones and time zone names.
local_time.time_zone = +11
local_time.time_zone_name = Vladivostok
#Configure the domain name or the IP address of the NTP server. The default value is cn.pool.ntp.org.
local_time.ntp_server1 = 10.1.1.4
#Configure the logo mode of the LCD screen; 0-Disabled (default), 1-System logo, 2-Custom logo;
phone_setting.lcd_logo.mode = 1
#Configure the access URL and dispaly name of the phonebook remote. X ranges from 1 to 5.
remote_phonebook.data.1.url = 10.1.1.50/provisioning/yealink-phonebook.xml
remote_phonebook.data.1.name = Phonebook
features.remote_phonebook.flash_time = 3600


individual settings
#! version: 1.0.0.1
#Enable or disable the account1, 0-Disabled (default), 1-Enabled;
account.1.enable = 1
#Configure the label for account1.
account.1.label = Test phone
#Configure the display name of account1.
account.1.display_name = User 998
#Configure the username password for register authentication.
account.1.auth_name = 998
account.1.password = 998
#Configure the register user name.
account.1.user_name = 998
#Configure the SIP server address.
account.1.sip_server_host = 10.1.1.50
#Specify the port for the SIP server. The default value is 5060.
account.1.sip_server_port = 5060


As a result, thanks to the remarkable auto-provision feature provided in the phones I mentioned, there were no problems connecting to the network of new devices. It all came down to finding out the phone's MAC address and generating a configuration file using a template.

I hope that you have read to the end and have benefited from reading.

Thanks for attention.

Source: https://habr.com/ru/post/237951/


All Articles