VoIP Zoo - Provisioning

Introduction


Once management approved an experiment to introduce 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 they would be useful to someone. So…

Initial data


Asterisk is selected and deployed as IP-PBX. The phone fleet consists of Cisco 7906g, Panasonic UT-KX123B, Grandstream GXP1400 and Dlink DPH-150S (E) / F3, Yealink T19 and T21 devices. This scatter is due to the fact that as part 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


To simplify and unify the process of setting up new devices as much as possible. All phones should be time synchronized, 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 configuration of phones, the so-called Provisioning. Actually, my implementation of this wonderful function will be discussed.

Configure tftpd, dhcpd


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

No specific configuration for tftp was required. Installed regular tftpd and placed all the necessary files in its root directory.
The settings files are placed in directories in accordance with the phone manufacturer. True, the device from Cisco never reached its folder; I had to store it in the root.

In order to tell phones the location of the tftp server, I used option-66. In addition, I 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 a dhcp request.

Snippet dhcpd.conf
# Указываем необходимые опции 
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 shared pool. Otherwise, they did not want to go to their "paddling 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 headed for the settings on the tftp server they set. It remains only to place them there.

Cisco 7906


These devices went to me in the factory packaging. I had to change it to make friends with asterisk. But this is a different story. In a specific case, to configure the device, according to the instructions, I created the SEPAABBCCDDEEFF.cnf.xml file 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 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>D-M-Y</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>
 <cnfJoinEnabled>true</cnfJoinEnabled>
 <callForwardURI>x-cisco-serviceuri-cfwdall</callForwardURI>
 <callPickupURI>x-cisco-serviceuri-pickup</callPickupURI>
 <callPickupListURI>x-cisco-serviceuri-opickup</callPickupListURI>
 <callPickupGroupURI>x-cisco-serviceuri-gpickup</callPickupGroupURI>
 <meetMeServiceURI>x-cisco-serviceuri-meetme</meetMeServiceURI>
 <abbreviatedDialURI>x-cisco-serviceuri-abbrdial</abbreviatedDialURI>
 <rfc2543Hold>false</rfc2543Hold>
 <callHoldRingback>2</callHoldRingback>
 <localCfwdEnable>true</localCfwdEnable>
 <semiAttendedTransfer>true</semiAttendedTransfer>
 <anonymousCallBlock>2</anonymousCallBlock>
 <callerIdBlocking>2</callerIdBlocking>
 <dndControl>0</dndControl>
 <remoteCcEnable>true</remoteCcEnable>
 <retainForwardInformation>false</retainForwardInformation>
 </sipCallFeatures>
 <sipStack>
 <sipInviteRetx>6</sipInviteRetx>
 <sipRetx>10</sipRetx>
 <timerInviteExpires>180</timerInviteExpires>
 <timerRegisterExpires>3600</timerRegisterExpires>
 <timerRegisterDelta>5</timerRegisterDelta>
 <timerKeepAliveExpires>120</timerKeepAliveExpires>
 <timerSubscribeExpires>120</timerSubscribeExpires>
 <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</transferOnhookEnabled>
 <enableVad>false</enableVad>
 <preferredCodec>none</preferredCodec>
 <dtmfAvtPayload>101</dtmfAvtPayload>
 <dtmfDbLevel>3</dtmfDbLevel>
<dtmfOutofBand>avt</dtmfOutofBand>
 <kpml>3</kpml>
 <alwaysUsePrimeLine>false</alwaysUsePrimeLine>
 <alwaysUsePrimeLineVoiceMail>false</alwaysUsePrimeLineVoiceMail>
 <phoneLabel>Cisco Phone</phoneLabel>
 <stutterMsgWaiting>2</stutterMsgWaiting>
 <callStats>false</callStats>
 <offhookToFirstDigitTimer>15000</offhookToFirstDigitTimer>
<silentPeriodBetweenCallWaitingBursts>10</silentPeriodBetweenCallWaitingBursts>
 <disableLocalSpeedDialConfig>true</disableLocalSpeedDialConfig>
 <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>
 <callerNumber>true</callerNumber>
 <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>
 <dscpForAudio>184</dscpForAudio>
 <ringSettingBusyStationPolicy>0</ringSettingBusyStationPolicy>
 <dialTemplate>dialplan.xml</dialTemplate>
 </sipProfile>
<commonProfile>
 <phonePassword>*0#</phonePassword>
 <backgroundImageAccess>true</backgroundImageAccess>
 <callLogBlfEnabled>2</callLogBlfEnabled>
 </commonProfile>
<loadInformation></loadInformation>
<vendorConfig>
 <disableSpeaker>false</disableSpeaker>
 <disableSpeakerAndHeadset>false</disableSpeakerAndHeadset>
 <forwardingDelay>1</forwardingDelay>
 <pcPort>0</pcPort>
 <settingsAccess>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>
 <recordingToneLocalVolume>100</recordingToneLocalVolume>
 <recordingToneRemoteVolume>50</recordingToneRemoteVolume>
 <recordingToneDuration></recordingToneDuration>
 <displayOnWhenIncomingCall>0</displayOnWhenIncomingCall>
 <rtcp>0</rtcp>
 <moreKeyReversionTimer>5</moreKeyReversionTimer>
 <autoCallSelect>1</autoCallSelect>
 <logServer>10.1.1.50</logServer>
 <g722CodecSupport>0</g722CodecSupport>
 <headsetWidebandUIControl>0</headsetWidebandUIControl>
 <handsetWidebandUIControl>0</handsetWidebandUIControl>
 <headsetWidebandEnable>0</headsetWidebandEnable>
 <handsetWidebandEnable>0</handsetWidebandEnable>
 <peerFirmwareSharing>0</peerFirmwareSharing>
 <enableCdpSwPort>1</enableCdpSwPort>
 <enableCdpPcPort>1</enableCdpPcPort>
 </vendorConfig>
<versionStamp>1143565489-a3cbf294-7526-4c29-8791-c4fce4ce4c37</versionStamp>
<userLocale>
 <name>Russian_Russian_Federation</name>
 <langCode>ru_RU</langCode>
 <version></version>
 <winCharSet>utf-8</winCharSet>
 </userLocale>
<networkLocale></networkLocale>
 <networkLocaleInfo>
 <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.50/provisioning/cisco-services.xml</servicesURL>
 <dscpForSCCPPhoneConfig>96</dscpForSCCPPhoneConfig>
 <dscpForSCCPPhoneServices>0</dscpForSCCPPhoneServices>
 <dscpForCm2Dvce>96</dscpForCm2Dvce>
 <transportLayerProtocol>2</transportLayerProtocol>
 <singleButtonBarge>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 of this series, be careful, auto-tuning is supported only in 150S / F3 devices. On the device 150S / F2, which fell into my hands, I did not find such functionality.

The configuration file can be either in xml format or plain text. There is one requirement for xml: 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.

Two files are used to set up the phone. f0D00580000.cfg - for storing the settings of all phones and 00112233aabb.cfg (MAC address in lower case) for individual settings. Individual settings, of course, have a higher priority.

A full set of settings has more than a thousand lines, so as not to clutter up the 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. 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 file with a common configuration for all phones. In fact, it stores all the 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 RTP, and the network bridge between the WAN and LAN connectors of the device is turned on.

Fragment No. 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 the configuration parameters are "talking" enough 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 “by default”. Now any Dlink phone connected to the network will immediately accept a common set of parameters for all. To set individual parameters for the device, you need a separate file. It only needs to specify the necessary settings for an 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 way. 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.
The configuration file consists of a set of lines that are subject to the following conditions:

  • The first is always a comment line, including the following sequence of characters (44 bytes):
    # Panasonic SIP Phone Standard Format File #
    Hexadecimal representation of this sequence:
    23 20 50 61 6E 61 73 6F 6E 69 63 20 53 49 50 20 50 68 6F 6E 65 20 53 74 61 6E 64 61 72 64 20 46 6F 72 6D 61 74 20 46 69 6C 65 20 23
    To prevent accidentally changing the set character sequence, it is recommended to start the configuration file from the line:
    # Panasonic SIP Phone Standard Format File # DO NOT CHANGE THIS LINE!
  • Configuration files must end with an empty string.
  • Each line must end with the sequence "<CR> <LF>".
  • The maximum string length is 537 bytes, including the sequence "<CR> <LF>"
  • The following lines are ignored:
    • strings that exceed the 537 byte limit;
    • empty lines
    • comment lines beginning with the symbol "#";
  • The line of each parameter is written in the form XXX = “yyy” (XXX: parameter name, yyy: its value). The value must be enclosed in double quotes.
  • Splitting a parameter string into multiple lines is not allowed. This will lead to an error processing the configuration file and, as a result, to initialization failure.
  • The values ​​of some parameters must be indicated separately for each line. The parameter with the suffix "_1" in the name is the parameter for line 1; "_2" - for line 2, etc.
  • The maximum length of the parameter name is 32 characters.
  • The maximum length of the parameter value is 500 characters, with the exception of double quote characters.
  • Spaces in a string are not allowed unless the value includes a space character.
  • The values ​​of some parameters can be indicated “empty” to set the parameter to empty.
  • Parameters are specified in no particular order.
  • If the same parameter is specified in the configuration file more than once, the value specified first is applied.


Such a serious set of requirements for the configuration file frankly upset me. In my opinion, the implementation of interaction with the management server on Panasonic phones is made extremely inconvenient. In this parameter, the phone is significantly inferior to the others.
When you turn on the device for the first time (or after resetting to the factory settings), it tries to download the 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 about the successful completion of preparation and will wait until it is rebooted. And after the reboot, he will begin to process the configuration files set for him.

It is recommended that you specify general settings for all phones in the master.cfg file. As in the case of Dlink, I will indicate only 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 device’s individual 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 for these phones are stored in a single xml file named cfg {mac} .xml. Or in plain text with the name cfg {mac}. This phone only asks for an individual configuration file, so optimizing the settings by moving them to a shared file will not work. Another feature of Grandstream settings is parameter naming. All of them are numbered and are designated as P ###. For example:

P1650 - responsible for the web-based interface for controlling the telephone (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 presented in xml format, they should be embedded in the <config version = ”1”> node, which in turn should be embedded in <gs_provision version = “1”>. All parameters are written in the form of 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>ru</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 a "#". 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_S, Turkish, Portuguese, Spanish, Italian, French, Russian, Deutsch and Czech.
lang.wui = Russian
#Specify the LCD language, the valid values are: 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 remote phonebook. 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 displayed on the LCD screen for account1.
account.1.label = Test phone
#Configure the display name of account1.
account.1.display_name = User 998
#Configure the username and 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 wonderful auto-provision function provided in the phones I mentioned, there were no problems connecting new devices to the network. It all came down to figuring out the MAC address of the phone and generating the configuration file from the template.

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

Thanks for attention.

Also popular now: