<templates version="1.26.11">
<template name="@string/do_not_disturb_title" icon="@drawable/dnd" prio="10">
<keyConfiguration>
<lua>
<code><![CDATA[local function createUri(onNotOff, user)
if (onNotOff) then
return "%23%238*211%23"..user --"sip:"..##8*211#..user.."@"..domain
else
return "%23%238*210%23"..user --"sip:"..##8*210#..user.."@"..domain
end
end
local startMe = require "subscription_key"
startMe(identity, "red", "DND", nil, createUri)]]></code>
<params>
<param name="identity" />
</params>
</lua>
</keyConfiguration>
<parameters>
<parameter name="@string/identity" type="identity">
<path>//param[@name="identity"]/value</path>
</parameter>
</parameters>
</template>
<template name="@string/call_forwarding_unconditional_title" icon="@drawable/call_forwarding" prio="10" label="@param-@string/target">
<keyConfiguration>
<lua>
<code><![CDATA[local function check_valid()
if identity == "" or identity == nil or target == "" or target == nil then
return false
end
return true
end
local function createUri(onNotOff, user)
if (onNotOff) then
return "*21*"..target.."%23"..user --"sip:"..*21*..target..#..user.."@"..domain
else
return "%2321%23"..user --"sip:"..#21#..user.."@"..domain
end
end
local startMe = require "subscription_key"
startMe(identity, "green", "CFWDunconditional", check_valid, createUri)]]></code>
<params>
<param name="identity" />
<param name="target" />
</params>
</lua>
</keyConfiguration>
<parameters>
<parameter name="@string/identity" type="identity">
<path>//param[@name="identity"]/value</path>
</parameter>
<parameter name="@string/target" type="text">
<path>//param[@name="target"]/value</path>
</parameter>
</parameters>
</template>
<template name="@string/call_forwarding_busy_title" icon="@drawable/call_forwarding" prio="10" label="@param-@string/target">
<keyConfiguration>
<lua>
<code><![CDATA[local function check_valid()
if identity == "" or identity == nil or target == "" or target == nil then
return false
end
return true
end
local function createUri(onNotOff, user)
if (onNotOff) then
return "*67*"..target.."%23"..user --"sip:"..*67*..target..#..user.."@"..domain
else
return "%2367%23"..user --"sip:"..#67#..user.."@"..domain
end
end
local startMe = require "subscription_key"
startMe(identity, "green", "CFWDwhenBusy", check_valid, createUri)]]></code>
<params>
<param name="identity" />
<param name="target" />
</params>
</lua>
</keyConfiguration>
<parameters>
<parameter name="@string/identity" type="identity">
<path>//param[@name="identity"]/value</path>
</parameter>
<parameter name="@string/target" type="text">
<path>//param[@name="target"]/value</path>
</parameter>
</parameters>
</template>
<template name="@string/call_forwarding_no_response_title" icon="@drawable/call_forwarding" prio="10" label="@param-@string/target">
<keyConfiguration>
<lua>
<code><![CDATA[local function check_valid()
if identity == "" or identity == nil or target == "" or target == nil then
return false
end
return true
end
local function createUri(onNotOff, user)
if (onNotOff) then
return "*61*"..target.."%23"..user --"sip:"..*61*..target..#..user.."@"..domain
else
return "%2361%23"..user --"sip:"..#61#..user.."@"..domain
end
end
local startMe = require "subscription_key"
startMe(identity, "green", "CFWDafterTimeout", check_valid, createUri)]]></code>
<params>
<param name="identity" />
<param name="target" />
</params>
</lua>
</keyConfiguration>
<parameters>
<parameter name="@string/identity" type="identity">
<path>//param[@name="identity"]/value</path>
</parameter>
<parameter name="@string/target" type="text">
<path>//param[@name="target"]/value</path>
</parameter>
</parameters>
</template>
<template name="@string/group_title" icon="@drawable/group" prio="10" label="@param-@string/group">
<keyConfiguration>
<lua>
<code><![CDATA[local function check_valid()
if identity == "" or identity == nil or group== "" or group == nil then
return false
end
return true
end
local function createUri(onNotOff, user)
if (onNotOff) then
return "%23%238*401"..group.."%23"..user --"sip:"..##8*401..group..#..user.."@"..domain
else
return "%23%238*400"..group.."%23"..user --"sip:"..##8*400..group..#..user.."@"..domain
end
end
local startMe = require "subscription_key"
startMe(identity, "green", "groupLoginBothDirections", check_valid, createUri)]]></code>
<params>
<param name="identity" />
<param name="group" />
</params>
</lua>
</keyConfiguration>
<parameters>
<parameter name="@string/identity" type="identity">
<path>//param[@name="identity"]/value</path>
</parameter>
<parameter name="@string/group" type="number">
<path>//param[@name="group"]/value</path>
</parameter>
</parameters>
</template>
<template name="@string/group_incoming_title" icon="@drawable/group" prio="10" label="@param-@string/group">
<keyConfiguration>
<lua>
<code><![CDATA[local function check_valid()
if identity == "" or identity == nil or group== "" or group == nil then
return false
end
return true
end
local function createUri(onNotOff, user)
if (onNotOff) then
return "%23%238*411"..group.."%23"..user --"sip:"..##8*411..group..#..user.."@"..domain
else
return "%23%238*410"..group.."%23"..user --"sip:"..##8*410..group..#..user.."@"..domain
end
end
local startMe = require "subscription_key"
startMe(identity, "green", "groupLoginIncoming", check_valid, createUri)]]></code>
<params>
<param name="identity" />
<param name="group" />
</params>
</lua>
</keyConfiguration>
<parameters>
<parameter name="@string/identity" type="identity">
<path>//param[@name="identity"]/value</path>
</parameter>
<parameter name="@string/group" type="number">
<path>//param[@name="group"]/value</path>
</parameter>
</parameters>
</template>
<template name="@string/group_outgoing_title" icon="@drawable/group" prio="10" label="@param-@string/group">
<keyConfiguration>
<lua>
<code><![CDATA[local function check_valid()
if identity == "" or identity == nil or group== "" or group == nil then
return false
end
return true
end
local function createUri(onNotOff, user)
if (onNotOff) then
return "%23%238*421"..group.."%23"..user --"sip:"..##8*421..group..#..user.."@"..domain
else
return "%23%238*420"..group.."%23"..user --"sip:"..##8*420..group..#..user.."@"..domain
end
end
local startMe = require "subscription_key"
startMe(identity, "green", "groupLoginOutgoing", check_valid, createUri)]]></code>
<params>
<param name="identity" />
<param name="group" />
</params>
</lua>
</keyConfiguration>
<parameters>
<parameter name="@string/identity" type="identity">
<path>//param[@name="identity"]/value</path>
</parameter>
<parameter name="@string/group" type="number">
<path>//param[@name="group"]/value</path>
</parameter>
</parameters>
</template>
<template name="@string/call_forwarding_extern_no_response_title" icon="@drawable/call_forwarding" prio="10" label="@param-@string/target">
<keyConfiguration>
<lua>
<code><![CDATA[local function check_valid()
if identity == "" or identity == nil or target== "" or target == nil or msn == "" or msn == nil then
return false
end
return true
end
local function createUri(onNotOff, user)
if (onNotOff) then
return "%23%2396"..msn.."%23*61*"..target.."%23"..user --"sip:"..##96..msn..#*61*..target..#..user.."@"..domain
else
return "%23%2396"..msn.."%23%2361%23"..user --"sip:"..##96..msn..##61#..user.."@"..domain
end
end
local startMe = require "subscription_key"
startMe(identity, "green", "CFWDafterTimeoutExternal", check_valid, createUri)]]></code>
<params>
<param name="identity" />
<param name="target" />
<param name="msn" />
</params>
</lua>
</keyConfiguration>
<parameters>
<parameter name="@string/identity" type="identity">
<path>//param[@name="identity"]/value</path>
</parameter>
<parameter name="@string/msn" type="text">
<path>//param[@name="msn"]/value</path>
</parameter>
<parameter name="@string/target" type="text">
<path>//param[@name="target"]/value</path>
</parameter>
</parameters>
</template>
<template name="@string/call_forwarding_extern_busy_title" icon="@drawable/call_forwarding" prio="10" label="@param-@string/target">
<keyConfiguration>
<lua>
<code><![CDATA[local function check_valid()
if identity == "" or identity == nil or target== "" or target == nil or msn == "" or msn == nil then
return false
end
return true
end
local function createUri(onNotOff, user)
if (onNotOff) then
return "%23%2396"..msn.."%23*67*"..target.."%23"..user --"sip:"..##96..msn..#*67*..target..#..user.."@"..domain
else
return "%23%2396"..msn.."%23%2367%23"..user --"sip:"..##96..msn..##67#..user.."@"..domain
end
end
local startMe = require "subscription_key"
startMe(identity, "green", "CFWDwhenBusyExternal", check_valid, createUri)]]></code>
<params>
<param name="identity" />
<param name="target" />
<param name="msn" />
</params>
</lua>
</keyConfiguration>
<parameters>
<parameter name="@string/identity" type="identity">
<path>//param[@name="identity"]/value</path>
</parameter>
<parameter name="@string/msn" type="text">
<path>//param[@name="msn"]/value</path>
</parameter>
<parameter name="@string/target" type="text">
<path>//param[@name="target"]/value</path>
</parameter>
</parameters>
</template>
<template name="@string/call_forwarding_extern_unconditional_title" icon="@drawable/call_forwarding" prio="10" label="@param-@string/target">
<keyConfiguration>
<lua>
<code><![CDATA[local function check_valid()
if identity == "" or identity == nil or target== "" or target == nil or msn == "" or msn == nil then
return false
end
return true
end
local function createUri(onNotOff, user)
if (onNotOff) then
return "%23%2396"..msn.."%23*21*"..target.."%23"..user --"sip:"..##96..msn..#*21*..target..#..user.."@"..domain
else
return "%23%2396"..msn.."%23%2321%23"..user --"sip:"..##96..msn..##21#..user.."@"..domain
end
end
local startMe = require "subscription_key"
startMe(identity, "green", "CFWDunconditionalExternal", check_valid, createUri)]]></code>
<params>
<param name="identity" />
<param name="target" />
<param name="msn" />
</params>
</lua>
</keyConfiguration>
<parameters>
<parameter name="@string/identity" type="identity">
<path>//param[@name="identity"]/value</path>
</parameter>
<parameter name="@string/msn" type="text">
<path>//param[@name="msn"]/value</path>
</parameter>
<parameter name="@string/target" type="text">
<path>//param[@name="target"]/value</path>
</parameter>
</parameters>
</template>
<template name="@string/config_activation_title" icon="@drawable/day_or_night" prio="10" label="@param-@string/configuration_id">
<keyConfiguration>
<lua>
<code><![CDATA[local function check_valid()
if identity == "" or identity == nil or konfid== "" or konfid == nil then
return false
end
return true
end
local function createUri(onNotOff, user)
if (onNotOff) then
return "%23%238*81"..konfid.."%23"..user --"sip:"..##8*81..konfid..#..user.."@"..domain
else
return nil
end
end
local startMe = require "subscription_key"
startMe(identity, "green", "ActivateCfg", check_valid, createUri)]]></code>
<params>
<param name="identity" />
<param name="konfid" />
</params>
</lua>
</keyConfiguration>
<parameters>
<parameter name="@string/identity" type="identity">
<path>//param[@name="identity"]/value</path>
</parameter>
<parameter name="@string/configuration_id" type="number">
<path>//param[@name="konfid"]/value</path>
</parameter>
</parameters>
</template>
<template name="@string/relay_title" icon="@drawable/relay" prio="10" label="@param-@string/relay_id">
<keyConfiguration>
<lua>
<code><![CDATA[local valid = false
local active = false
local on = "##8*26"
local function updateLed()
if valid then
if active then
key:setLed( "green", true )
time.sleep("2")
key:setLed( "off")
end
else
key:setLed( "red", true )
end
end
local function check_valid()
if identity == "" or relid == "" then
valid = false
else
valid = true
end
end
function onKeyUp()
if valid then
sip.invite(on..relid.."#",false,identity,true)
active = true
updateLed()
end
end
check_valid()
updateLed()]]></code>
<params>
<param name="identity" />
<param name="relid" />
</params>
</lua>
</keyConfiguration>
<parameters>
<parameter name="@string/identity" type="identity">
<path>//param[@name="identity"]/value</path>
</parameter>
<parameter name="@string/relay_id" type="text">
<path>//param[@name="relid"]/value</path>
</parameter>
</parameters>
</template>
<template name="@string/auto_config_switch" icon="@drawable/day_or_night" prio="10" label="@param-@string/relay_id">
<keyConfiguration>
<lua>
<code><![CDATA[local valid = false
local active = false
local dtmf_sequenz = "##8*26"
local function updateLed()
if valid then
if active then
key:setLed( "green")
else
key:setLed( "off" )
end
else
key:setLed( "red", true )
end
end
local function check_valid()
if identity == "" then
valid = false
else
valid = true
end
end
function onKeyUp()
if active and valid then
sip.invite(dtmf_sequenz..relid.."*0#",false,identity,true)
active = false
updateLed()
elseif valid then
sip.invite(dtmf_sequenz..relid.."*1#",false,identity,true)
active = true
updateLed()
end
end
check_valid()
updateLed()]]></code>
<params>
<param name="identity" />
<param name="relid">
<value>900</value>
</param>
</params>
</lua>
</keyConfiguration>
<parameters>
<parameter name="@string/identity" type="identity">
<path>//param[@name="identity"]/value</path>
</parameter>
<parameter name="@string/relay_id" type="text">
<path>//param[@name="relid"]/value</path>
</parameter>
</parameters>
</template>
</templates>