summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--templates/linksysata-template.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/templates/linksysata-template.lua b/templates/linksysata-template.lua
index 6c4c551..3972c33 100644
--- a/templates/linksysata-template.lua
+++ b/templates/linksysata-template.lua
@@ -5,6 +5,13 @@ server=values.device.registrar
web_server=ENV['HTTP_HOST']
moh=values.device.musiconhold
dialpattern="( " .. values.device.digitmap .. " )"
+
+local cid
+if values.reg1.callerid == "" then
+ cid = values.reg1.extension
+else
+ cid = values.reg1.callerid
+end
%>
<% local values = ... %>
@@ -256,7 +263,7 @@ http://<% io.write(web_server) %>/Linksys/$MA.xml
-<Display_Name_1_ ua="na"><%= values.reg1.callerid %></Display_Name_1_>
+<Display_Name_1_ ua="na"><%= cid %></Display_Name_1_>
<User_ID_1_ ua="na"><% io.write(values.reg1.extension) %></User_ID_1_>
<Password_1_ ua="na"><% io.write(values.reg1.password) %></Password_1_>
<Use_Auth_ID_1_ ua="na">No</Use_Auth_ID_1_>