From bdb4ee50cd9c0636a92adbedb054f5cff291d32f Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Sat, 18 Sep 2021 16:29:28 -0600 Subject: [PATCH] Use a loop in the yeastar ta200 template. --- .../provision/yeastar/ta200/cfg{$mac}.xml | 78 ++++--------------- 1 file changed, 15 insertions(+), 63 deletions(-) diff --git a/resources/templates/provision/yeastar/ta200/cfg{$mac}.xml b/resources/templates/provision/yeastar/ta200/cfg{$mac}.xml index b66666243a..049f337a67 100644 --- a/resources/templates/provision/yeastar/ta200/cfg{$mac}.xml +++ b/resources/templates/provision/yeastar/ta200/cfg{$mac}.xml @@ -45,9 +45,11 @@ - - - 1 + +{assign var=x value=0} +{foreach $lines as $row} + + {$x+1} up 1 @@ -65,11 +67,11 @@ 40 1 - {$user_id_1} - {$auth_id_1} + {$row.user_id} + {$row.auth_id} - {$user_password_1} + {$row.password} no none 1 @@ -97,59 +99,9 @@ yes no - - - 2 - up - 2 - - 1000 - 6000 - yes - no - 30 - no - yes - yes - number - - 40 - 40 - 2 - - {$user_id_2} - {$auth_id_2} - - - {$user_password_2} - no - none - 2 - no - - no - - 2 - disable - bell - 120 - 120 - no - no - yes - 300 - default - ring - bell - no - 12khz - 2000 - 2000 - 500 - - yes - no - + + {assign var=x value=$x+1} +{/foreach} @@ -157,8 +109,8 @@ SIP VoIPServer1 - {$server_address_1} - 5060 + {$account.1.server_address} + {$account.1.sip_port} udp portregister no @@ -196,8 +148,8 @@ SIP VoIPServer2 - {$server_address_2} - 5060 + {$account.2.server_address} + {$account.2.sip_port} udp portregister no