fix generation of voip-passwords file
authorMartin Zobel-Helas <zobel@debian.org>
Tue, 19 Feb 2013 19:58:59 +0000 (20:58 +0100)
committerMartin Zobel-Helas <zobel@debian.org>
Tue, 19 Feb 2013 19:58:59 +0000 (20:58 +0100)
Signed-off-by: Martin Zobel-Helas <zobel@debian.org>
ud-generate

index 21d8baa..955757e 100755 (executable)
@@ -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)))