VoIP Zoo – Provisioning

Entry

Once the management approved an 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 my acquired knowledge - in the hope that it will be useful to someone. So…

Initial data

Asterisk was selected and deployed as an IP PBX. The fleet 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 as part of the experiment, it was decided to try a little bit of everything in order to form an opinion about the price / quality / convenience ratio.

Task

Simplify and unify the process of setting up new devices as much as possible. All phones must be synchronized in time, have a phone book loaded from the server and provide access to 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.

Setting up 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 necessary files in its root directory.
The files with the settings are placed in directories in accordance with the phone manufacturer. True, the device from Cisco did not get into its folder, it had to be stored in the root.

In order to point the phones to 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, 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 snippet

# Specify the required 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 general 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 involved services, the phones confidently went for the settings to the tftp server they were supposed to. It remains only to place them there.

Cisco 7906

These devices came 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, I, according to the instructions, created the SEPAABBCCDDEEFF.cnf.xml file in the root of the tftp server. Where AABBCCDDEEFF is the machine's MAC address.

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>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 are just about to purchase 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. 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.

Two files are used to set up the phone. f0D00580000.cfg for all phone settings and 00112233aabb.cfg (lowercase MAC address) for individual settings. Individual settings naturally take precedence.

The 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.

Root node is required VOIP_CONFIG_FILE and nested node version. The settings will only be applied if the file version is higher than the current settings in the machine. You can find out this value through the .web interface of the phone in the maintenance section (system management). For phones with factory settings in both cases it is 2.0002. Also, the version of the individual file must be greater than the version of the shared file.

First I will give a file with a common configuration for all phones. In fact, it stores all the settings, an individual file will only be responsible for the phone number and the inscription on the screen.

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

Fragment №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 sufficiently "speaking" 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 set of parameters common to 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 a configuration file is 120 KB. Regardless of the number of files, their total size must not exceed 120 KB.
The configuration file consists of a set of lines that are subject to the following conditions:

  • The first line is always the comment line, which includes the following sequence of characters (44 bytes):
    # Panasonic SIP Phone Standard Format File #
    Hexadecimal representation of the given sequence:
    23 20 50F 61E 6 61 73 6 6 69 63 20 53 49F 50E 20 50 68 6 6 65E 20 53 74 61 6 64 61F 72 64D 20 46 6 72 6 61 C 74 20 46
    To prevent accidental change of the set character sequence, it is recommended to start the configuration file with the line:
    # Panasonic SIP Phone Standard Format File # DO NOT CHANGE THIS LINE!
  • Configuration files must end with an empty line.
  • Each line must end with " ".
  • The maximum length of a string is 537 bytes, including the sequence " "
  • The following lines are ignored:
    • strings that exceed the 537 byte limit;
    • empty lines;
    • comment lines beginning with "#";
  • Each parameter string is written in the form XXX="yyy" (XXX: parameter name, yyy: its value). The value must be enclosed in double quotes.
  • Splitting the parameter string into multiple lines is not allowed. This will result in an error processing the configuration file and, as a result, an initialization failure.
  • The values ​​of some parameters must be specified separately for each line. The parameter with the "_1" suffix in the name is the parameter for line 1; "_2" is for line 2, etc.
  • The maximum length of the parameter name is 32 characters.
  • The maximum length of the parameter value is 500 characters, excluding double quote characters.
  • No spaces are allowed in the string unless the value includes a space character.
  • Some parameter values ​​can be specified as "empty" to set the parameter to an empty value.
  • The parameters are specified in no particular order.
  • If the same parameter is specified more than once in the configuration file, 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 control server in Panasonic phones is extremely inconvenient. In this parameter, the phone is significantly inferior to the rest.
When the machine is turned on for the first time (or after a factory reset), it tries to load a so-called product file (in this case, KX-UT123RU.cfg), which should contain paths to other 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"

The phone will then display a message that provisioning was successful and wait until it reboots. And after the reboot, it will start processing the configuration files assigned to it.

It is recommended to specify general settings for all phones in the master.cfg file. As in the case of Dlink, I will specify only a few parameters. The names of other parameters and their values ​​can be found in the documentation on the manufacturer's website.
master.cfg################################################## ##########
#SystemSettings#
################################################## ##########
## 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=""

Traditionally, only the subscriber's settings remain in the device's individual configuration file.
aabbccddeeff.cfgDISPLAY_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 a single xml file called 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 common file will not work. Another feature of Grandstream's configuration is parameter naming. All of them are numbered and designated as P###. For example:

P1650 - responsible for the web interface for managing 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 come in any order. Lines starting with # are treated as comments.

If the settings are presented in xml format, they must be nested in the node , which in turn must be embedded in . All parameters are written as corresponding tags with the parameter value inside.
Setting example

1.0 8 1 1 SIP_PWD User#271 1 271 270 109 ADMIN_PWD USER_PWD en 270 35/grandstream 109 TZc-35 36 109 http://36/provisioning/grandstream thirty

Yealink T19 and T21

Devices of these models support individual configuration files for devices and common ones for models. In my case, I had to place the general parameters in the y000000000031.cfg and y000000000034.cfg files, respectively. The 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 parameter names 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 = English
#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 = User998
#Configure the username and password for register authentication.
account.1.auth_name = 998
account.1.password = 998
#Configure the register username.
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 the new devices to the network. It all came down to finding out the MAC address of the phone and generating a configuration file from a template.

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

Thank you for attention.

Source: habr.com

Add a comment