From: Martin Zobel-Helas Date: Tue, 19 Feb 2013 19:58:59 +0000 (+0100) Subject: fix generation of voip-passwords file X-Git-Tag: userdir-ldap-0.3.85~57 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=b73b4a9e229a805c32bf21e337e347666ec0b1a3 fix generation of voip-passwords file Signed-off-by: Martin Zobel-Helas --- diff --git a/ud-generate b/ud-generate index 21d8baa..955757e 100755 --- a/ud-generate +++ b/ud-generate @@ -407,8 +407,7 @@ def GenVoipPassword(accounts, File): F = open(File, "w", 0600) os.umask(OldMask) - root = Element('domain') - root.attrib['name'] = "$${sip_profile}" + root = Element('include') for a in accounts: if not 'voipPassword' in a: continue @@ -424,6 +423,12 @@ def GenVoipPassword(accounts, File): params.append(param) param.attrib['name'] = "a1-hash" param.attrib['value'] = "%s" % (Pass) + variables = Element('variables') + user.append(variables) + variable = Element('variable') + variable.attrib['name'] = "toll_allow" + variable.attrib['value'] = "domestic,international,local" + variables.append(variable) F.write("%s" % (prettify(root)))