From 7afa3746c3d58b6ed480fba8030d47f8375a6d93 Mon Sep 17 00:00:00 2001 From: Doug Bailey Date: Tue, 11 Nov 2008 16:46:17 +0000 Subject: [PATCH] Add LINEKEYS variable to allow for a user to set the number of keys assigned to a line on a polycom phone git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@155934 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- phoneprov/polycom_line.xml | 2 +- res/res_phoneprov.c | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/phoneprov/polycom_line.xml b/phoneprov/polycom_line.xml index 3d66a36859..39c43ff526 100644 --- a/phoneprov/polycom_line.xml +++ b/phoneprov/polycom_line.xml @@ -1 +1 @@ -reg.${LINE}.displayName="${DISPLAY_NAME}" reg.${LINE}.address="${USERNAME}" reg.${LINE}.label="${LABEL}" reg.${LINE}.type="private" reg.${LINE}.thirdPartyName="" reg.${LINE}.auth.userId="${USERNAME}" reg.${LINE}.auth.password="${SECRET}" reg.${LINE}.server.1.address="${SERVER}" reg.${LINE}.server.1.port="${SERVER_PORT}" reg.${LINE}.server.1.transport="DNSnaptr" reg.${LINE}.server.1.expires="300" reg.${LINE}.server.1.register="1" reg.${LINE}.server.1.retryTimeOut="" reg.${LINE}.server.1.retryMaxCount="" reg.${LINE}.server.1.expires.lineSeize="" reg.${LINE}.acd-login-logout="0" reg.${LINE}.acd-agent-available="0" reg.${LINE}.ringType="2" reg.${LINE}.lineKeys="1" reg.${LINE}.callsPerLineKey="1" +reg.${LINE}.displayName="${DISPLAY_NAME}" reg.${LINE}.address="${USERNAME}" reg.${LINE}.label="${LABEL}" reg.${LINE}.type="private" reg.${LINE}.thirdPartyName="" reg.${LINE}.auth.userId="${USERNAME}" reg.${LINE}.auth.password="${SECRET}" reg.${LINE}.server.1.address="${SERVER}" reg.${LINE}.server.1.port="${SERVER_PORT}" reg.${LINE}.server.1.transport="DNSnaptr" reg.${LINE}.server.1.expires="300" reg.${LINE}.server.1.register="1" reg.${LINE}.server.1.retryTimeOut="" reg.${LINE}.server.1.retryMaxCount="" reg.${LINE}.server.1.expires.lineSeize="" reg.${LINE}.acd-login-logout="0" reg.${LINE}.acd-agent-available="0" reg.${LINE}.ringType="2" reg.${LINE}.lineKeys="${LINEKEYS}" reg.${LINE}.callsPerLineKey="1" diff --git a/res/res_phoneprov.c b/res/res_phoneprov.c index 5fcb294666..5646d2d02f 100644 --- a/res/res_phoneprov.c +++ b/res/res_phoneprov.c @@ -80,6 +80,7 @@ enum pp_variables { PP_CALLERID, PP_TIMEZONE, PP_LINENUMBER, + PP_LINEKEYS, PP_VAR_LIST_LENGTH, /* This entry must always be the last in the list */ }; @@ -98,6 +99,7 @@ static const struct pp_variable_lookup { { PP_CALLERID, "cid_number", "CALLERID" }, { PP_TIMEZONE, "timezone", "TIMEZONE" }, { PP_LINENUMBER, "linenumber", "LINE" }, + { PP_LINEKEYS, "linekeys", "LINEKEYS" }, }; /*! \brief structure to hold file data */ @@ -746,6 +748,10 @@ static struct extension *build_extension(struct ast_config *cfg, const char *nam tmp = "1"; } exten->index = atoi(tmp); + } else if (i == PP_LINEKEYS) { + if (!tmp) { + tmp = "1"; + } } if (tmp && (var = ast_var_assign(pp_variable_list[i].template_var, tmp))) {