Skip to content

Commit

Permalink
добавил в шаблон Панасоника до 8 учетных записей
Browse files Browse the repository at this point in the history
  • Loading branch information
antirek committed Mar 19, 2019
1 parent 116ae66 commit 068be1e
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 3 deletions.
4 changes: 2 additions & 2 deletions provision/api-routes/device/{key}/{file}.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ module.exports = (Device, RequestLog) => {
if (device && device.token) {
log.token = device.token;
}

return ruleVerification(device, requestInfo);
})
.then((device) => {
const t = template(device);
console.log('vendor', device.vendor);
console.log('config template', t);
log.status = 'OK';

res.status(200).type('application/xml').send(t);
})
.catch((err) => {
Expand Down
2 changes: 1 addition & 1 deletion provision/api-routes/token/{token}/{file}.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module.exports = (Device, RequestLog) => {
.then((device) => {
console.log('db find:', strip(device));
if (!device) return Promise.reject(new Error('no device'));

return ruleVerification(device, requestInfo);
})
.then((device) => {
Expand Down
52 changes: 52 additions & 0 deletions provision/vendors/panasonic/default.sys
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,56 @@ REG_EXPIRE_TIME_4="150"
SIP_DETECT_SSAF_4="Y"
RTCP_ENABLE_4="Y"
CW_ENABLE_4="N"
<!-- @endif -->

<!-- @ifdef ACCOUNT5 -->
## account 5
SIP_RGSTR_ADDR_5="{{account_5_sip_register}}"
SIP_PRXY_ADDR_5="{{account_5_sip_register}}"
PHONE_NUMBER_5="{{account_5_sip_name}}"
SIP_AUTHID_5="{{account_5_sip_auth}}"
SIP_PASS_5="{{account_5_sip_password}}"
REG_EXPIRE_TIME_5="150"
SIP_DETECT_SSAF_5="Y"
RTCP_ENABLE_5="Y"
CW_ENABLE_5="N"
<!-- @endif -->

<!-- @ifdef ACCOUNT6 -->
## account 6
SIP_RGSTR_ADDR_6="{{account_6_sip_register}}"
SIP_PRXY_ADDR_6="{{account_6_sip_register}}"
PHONE_NUMBER_6="{{account_6_sip_name}}"
SIP_AUTHID_6="{{account_6_sip_auth}}"
SIP_PASS_6="{{account_6_sip_password}}"
REG_EXPIRE_TIME_6="150"
SIP_DETECT_SSAF_6="Y"
RTCP_ENABLE_6="Y"
CW_ENABLE_6="N"
<!-- @endif -->

<!-- @ifdef ACCOUNT7 -->
## account 7
SIP_RGSTR_ADDR_7="{{account_7_sip_register}}"
SIP_PRXY_ADDR_7="{{account_7_sip_register}}"
PHONE_NUMBER_7="{{account_7_sip_name}}"
SIP_AUTHID_7="{{account_7_sip_auth}}"
SIP_PASS_7="{{account_7_sip_password}}"
REG_EXPIRE_TIME_7="150"
SIP_DETECT_SSAF_7="Y"
RTCP_ENABLE_7="Y"
CW_ENABLE_7="N"
<!-- @endif -->

<!-- @ifdef ACCOUNT8 -->
## account 8
SIP_RGSTR_ADDR_8="{{account_8_sip_register}}"
SIP_PRXY_ADDR_8="{{account_8_sip_register}}"
PHONE_NUMBER_8="{{account_8_sip_name}}"
SIP_AUTHID_8="{{account_8_sip_auth}}"
SIP_PASS_8="{{account_8_sip_password}}"
REG_EXPIRE_TIME_8="150"
SIP_DETECT_SSAF_8="Y"
RTCP_ENABLE_8="Y"
CW_ENABLE_8="N"
<!-- @endif -->

0 comments on commit 068be1e

Please sign in to comment.