Jump to content

Sebastian Dreier

Most Valued User
  • Content Count

    71
  • Joined

  • Last visited

  • Days Won

    13

Sebastian Dreier last won the day on March 2

Sebastian Dreier had the most liked content!

Community Reputation

13 Good

About Sebastian Dreier

  • Rank
    Advanced Member

Contact Methods

  • Website URL
    www.awacon-solutions.com

Profile Information

  • Gender
    Male
  • Location
    Beckum

Recent Profile Visitors

1,393 profile views
  1. Hello CHBT, the following command should do it: Get-IpPbxUser | Set-IpPbxUserPhoneLogin -EnableAutoLogin:$false If you need help regarding Swyx PowerShell Script Development feel free to contact me at anytime: sebastian.dreier@awacons.com. My company Awacon Solutions UG is also offering a wide range of services for the SwyxWare IpPbx solution. Kind regards Sebastian Dreier
  2. Hallo Get_r3kt_by_Me, um einen "Call Routing" Benutzer zu erstellen, welcher keine Lizenz benötigt, brauchst du nur einen "normalen" Benutzer zu deaktivien/sperren: # Connect to the SwyxWare Server via Windows Authentication Connect-IpPbx # Create a new user entry $userEntry = New-IpPbxUser -UserName "CallRoutingUser1" # Disable/Lock the user to make it a call routing user $userEntry.Locked = $true # Add the new user to the database Add-IpPbxUser -UserEntry $userEntry # IMPORTANT: Don't forget to disconnect # Releases memory on the SwyxWare server Disconnect-IpPbx
  3. Hallo Patrick, das Swyx Powershell Modul beinhaltet bereits eine umfangreiche Import/Export Funktionalität. Schau dir mal die folgenden zwei Commandlets (inkl. Parametern) an: Export-IpPbxData Import-IpPbxData Vielleicht kannst du auf diese Commandlets in deinen Wizards zurückgreifen und damit mehr Funktionalität abdecken. Sollte dir dabei irgendeine Funktion fehlen oder solltest du auf Fehler stoßen, so melde dich einfach bei mir. Mit freundlichem Gruß Sebastian Dreier
  4. Hallo Sebastian,

    ich bin noch immer auf der Suche nach einer Lösung, den Tastenstandard für alle Tln zu ändern.

    Kannst du mir weiterhelfen?

     

    Hallo,

    mit welchen Befehl kann ich die Tastenbelegung auf alle Tln einer Gruppe schreiben?

    Für alle 50 Tln möchte ich einen neuen Tastenstandard vergeben (Funktionstasten nicht Namenstasten), z.B. für alle Tln der "Konfig-Grp".

     

    Gruß awado

  5. Hallo Marius, ich kann das Problem bei mir nicht nachstellen. Daher habe ich für dich ein spezielles Demo App gebaut, welches definitiv funktioniert. Dieses findest du im Anhang dieser Nachricht (inkl. Source Code). Ich wünsche dir viel Erfolg. Kind regards Sebastian Dreier SwyxCdsDemoApp.7z
  6. Hello Marius, the group member information is available as property on every UserEntry: var cdsLib = new CDSLib(); var userList = cdsLib.GetUsers("%"); for (var userEntry in userList) { // userEntry.MembershipEntryCollection } Important performance note Do not call the "GetUsers" method too often in a row. It is far better to get all the users in one collection and to work on that. Kind regards Sebastian Dreier
  7. Hello Marius, quickly create a sample class that should fit your needs: using SWConfigDataClientLib; using SWConfigDataClientLib.Data; using SWConfigDataClientLib.Proxies.Admin; using SWConfigDataClientLib.Proxies.Users; using System; namespace IpPbx.Samples.Shared { public class CDSLib { /// <summary> /// The CDS Client LibManager is the central class of the CDS Client API. /// It contains methods to address the server and to authenticate users. /// You use LibManager to create instances of classes for retrieval and /// manipulation of IpPbx configuration items. The LibManager should be the /// first class to instantiate. It checks the configuration and initiates /// the tracing of the client application. /// </summary> private LibManager libManager; /// <summary> /// Initializes a new instance of the <see cref="CDSLib" /> class. /// </summary> /// <param name="userName">Username (SwyxIt Login)</param> /// <param name="password">Password (SwyxIt Login)</param> /// <param name="serverName">SwyxServer Address (FQDN or IP)</param> public CDSLib(string userName = "", string password = "", string serverName = "") { Init(userName, password, serverName); } /// <summary> /// Initialisation /// </summary> /// <param name="userName">Username (SwyxIt Login)</param> /// <param name="password">Password (SwyxIt Login)</param> /// <param name="serverAddress">SwyxServer Address (FQDN or IP)</param> private void Init(string userName, string password, string serverAddress) { // Check if server address is empty if (string.IsNullOrWhiteSpace(serverAddress) || serverAddress.Equals("localhost", StringComparison.InvariantCultureIgnoreCase)) { serverAddress = "127.0.0.1"; } // Set default authentication mode to trusted SProxyObject.AuthenticationMode authenticationMode = SProxyObject.AuthenticationMode.Trusted; if (serverAddress == "127.0.0.1") { authenticationMode = SProxyObject.AuthenticationMode.TrustedLocal; } // If username and password are available the authentication // mode must be changed to UsernamePassword if (!string.IsNullOrWhiteSpace(userName) && !string.IsNullOrWhiteSpace(password)) { authenticationMode = SProxyObject.AuthenticationMode.UsernamePassword; } // Create and configure new LibManager object libManager = new LibManager() { BaseProtocol = SProxyObject.BaseProtocol.TCP, Username = userName, Password = password, WSBaseUrl = serverAddress, AuthenticationMode = authenticationMode }; } /// <summary> /// Returns a collection of ippbx users filtered by name /// </summary> /// <param name="nameFilter">Name of the IpPbx user your are /// searching for (SQL Wildcards e.g. "%" can be used here)</param> public UserPrimaryCollection GetUsers(string nameFilter) { // Get UserEnum object from LibManager UserEnum userEnum = libManager.GetUserEnum(); try { userEnum.ExecuteNameFilter(nameFilter, new OrderByList()); return userEnum.PrimaryCollection; } catch (Exception) { // Add your tracing here throw; } finally { // IMPORTANT // If you free resources here you will NOT be able // to save changes anymore. Every UserEntry has a // reference to his parent UserEnum to save changes. // If the Enum is released the reference will be broken. // PERFORMANCE NOTE // For "read-only" purposes the AdminFacade should be // used because it is MUCH faster and lightweight. /* Free resources if (userEnum != null) { userEnum.Clear(); userEnum.FreeForReuse(); } */ } } /// <summary> /// Returns all users in one collection (READ ONLY -> BETTER PERFORMANCE) /// </summary> /// <param name="includeUserFileSize">If true the size of the user files in the database is calculated and added</param> public UserAdminView1EntrySortableCollection GetUserView(bool includeUserFileSize) { var adminFacade = libManager.GetAdminFacade(); try { return adminFacade.GetUserAdminView1(includeUserFileSize, out UserDeviceSmallMap userDeviceSmallMap).CreateSortableFilterCollection(); } catch (Exception) { // Add your tracing here throw; } } /// <summary> /// Returns a collection of IpPbx groups filtered by name /// </summary> /// <param name="nameFilter">Name of the IpPbx group your are /// searching for (SQL Wildcards e.g. "%" can be used here)</param> public SWConfigDataClientLib.Proxies.Groups.GroupPrimaryCollection GetGroups(string nameFilter) { // Get enum object from LibManager var groupEnum = libManager.GetGroupEnum(); try { groupEnum.ExecuteNameFilter(nameFilter, new OrderByList()); return groupEnum.PrimaryCollection; } catch (Exception) { // Add your tracing here throw; } finally { // IMPORTANT // If you free resources here you will NOT be able // to save changes anymore. Every entry has a // reference to his parent UserEnum to save changes. // If the Enum is released the reference will be broken. /* Free resources if (groupEnum != null) { groupEnum.Clear(); groupEnum.FreeForReuse(); } */ } } /// <summary> /// Returns all users in one collection (READ ONLY -> BETTER PERFORMANCE) /// </summary> public GroupAdminView1EntrySortableCollection GetGroupView() { var adminFacade = libManager.GetAdminFacade(); try { return adminFacade.GetGroupAdminView1().CreateSortableFilterCollection(); } catch (Exception) { // Add your tracing here throw; } } } } Kind regards Sebastian Dreier
  8. Hallo in33dhelp, ja es gibt hierfür das folgende Commandlet: # Adds a windows domain account to IpPbx user "Sebastian" Add-IpPbxUserWindowsAccount -UserName "Sebastian" -NTAccount "MYDOMAIN\sebastian" # Adds a windows domain account to IpPbx user "Sebastian" by SID Add-IpPbxUserWindowsAccount -UserName "Sebastian" -NTAccount "S-1-5-21-1866771598-1400282655-2479265699-500" -ContainsSID
  9. Hallo Manny, das Verhalten ist sogar logisch. Du musst natürlich sicherstellen, dass die Zielbenutzer nicht weniger Leitungstasten haben als der Quellbenutzer: # Connect via Windows Authentication Connect-IpPbx # Get source user entry and user data $sourceUser = Get-IpPbxUser -UserName "Sebastian" $sourceUserData = Get-IpPbxUserData -UserEntry $sourceUser # Get target user entry and user data $targetUser = Get-IpPbxUser -UserName "Inneke" $targetUserData = Get-IpPbxUserData -UserEntry $targetUser # Check Line Keys of target user if ($targetUserData.m_iNumberOfLineKeys -lt $sourceUserData.m_iNumberOfLineKeys) { Set-IpPbxUserLineKeyCount -UserEntry $targetUser -Count $sourceUserData.m_iNumberOfLineKeys } # THE HARD WAY -> JUST SET THE LINE KEY AMOUNT WITHOUT ANY CHECK # Set-IpPbxUserLineKeyCount -UserEntry $targetUser -Count $sourceUserData.m_iNumberOfLineKeys # Receive updated target user data $targetUserData = Get-IpPbxUserData -UserEntry $targetUser # Copy Phone Settings $targetUserData.m_iNumberOfPhoneSettings = $sourceUserData.m_iNumberOfPhoneSettings $targetUserData.m_PhoneSettings = $sourceUserData.m_PhoneSettings # Save changes Set-IpPbxUserData -UserEntry $targetUser -UserData $targetUserData # IMPORTANT # Do not forget to disconnect # This releases memory on the IpPbx server Disconnect-IpPbx Kind regards Sebastian Dreier
  10. Hallo Manny, du darfst bei dem folgenden Befehl $user nicht in " setzen: Set-IpPbxUserData -UserEntry $user -UserData $userData Des Weiteren rate ich dir dringend dazu nicht einzelne sondern alle Phone Settings zu kopieren. Andernfalls könnte dies zu kuriosen Effekten führen. Hier mein Vorschlag: # Connect via Windows Authentication Connect-IpPbx # Get source user data $sourceUserData = Get-IpPbxUserData -UserName "Sebastian" # Get target user and user data $targetUser = Get-IpPbxUser -UserName "Inneke" $targetUserData = Get-IpPbxUserData -UserEntry $targetUser # Copy Phone Settings $targetUserData.m_iNumberOfPhoneSettings = $sourceUserData.m_iNumberOfPhoneSettings $targetUserData.m_PhoneSettings = $sourceUserData.m_PhoneSettings # Save changes Set-IpPbxUserData -UserEntry $targetUser -UserData $targetUserData # Cleanup Disconnect-IpPbx Kind regards Sebastian Dreier
  11. Hallo Manny, du kannst das Call Routing von einem Benutzer auf andere kopieren, allerdings musst du oder der Benutzer diese Regeln manuell aktivieren. Connect-IpPbx $sourceUser = Get-IpPbxUser -UserName "Sebastian" -ReadOnly $targetUser = Get-IpPbxUser -UserName "Inneke" -ReadOnly Copy-IpPbxUserCallRouting -SourceUserEntry $sourceUser -TargetUserEntry $targetUser -Overwrite Disconnect-IpPbx Kind regards Sebastian Dreier
  12. Hello Jörg, the method "FreeForReuse" is a Swyx implementation to release resource on the IpPbx Server. The Dispose method is just the normal C# IDispose implementation and has no effect on the IpPbx Server. I highly recommend to call the "Clear" and "FreeForReuse" method for every Enum object. For LibManager and Facade objects only the "FreeForReuse" method should be called. Examples: // LIB MANAGER INIT var libManager = new LibManager() { BaseProtocol = SProxyObject.BaseProtocol.TCP, Username = "Username", Password = "Password", WSBaseUrl = "ServerAddress", AuthenticationMode = SProxyObject.AuthenticationMode.UsernamePassword }; var adminFacade = libManager.GetAdminFacade(); // SOME FACADE METHODS CALLS adminFacade.FreeForReuse(); adminFacade = null; var userEnum = this.libManager.GetUserEnum(); // SOME ENUM METHODS CALLS userEnum.Clear(); userEnum.FreeForReuse(); userEnum = null; // LIB MANAGER CLEANUP libManager.FreeForReuse(); libManager = null;
  13. Hallo Herr Baumgardt, die Tatsache, dass mein Powershell Code bei Ihnen nicht funktioniert bereitet mir etwas Sorgen. Dies deutet möglicherweise daraufhin, dass das UserData Objekt des Template Benutzers "AAA_Muster-Benutzer" korrupt ist. Folglich rate ich Ihnen diesen Benutzer einmal neu anzulegen und meinen Code noch einmal zu testen. P.S.: Ich habe meinen Code mit einer SwyxWare 11.20 getestet. Welche Version ist bei Ihnen im Einsatz? Kind regards Sebastian Dreier
  14. Hallo Herr Baumgardt, ich habe den Code soeben noch einmal etwas verändert und erfolgreich auf einer meiner VMs getestet. Bitte prüfen Sie einmal, ob dieser auch bei Ihnen funktioniert. $templateUserName = "AAA_Muster-Benutzer" $newUserName = "TestUser1" $newUserComment = "Test Comment" $newUserInternalNumber = "444" $newUserPublicNumber = "+492525123444" $newUserWindowsAccount = "vm-dreier09\Administrator" # Get user data from template user $templateUserData = Get-IpPbxUserData -Username $templateUserName # Create new user New-IpPbxUser -UserName $newUserName -Comment $newUserComment | Add-IpPbxUser -AddToEveryoneGroup # Set user data from template user Set-IpPbxUserData -UserName $newUserName -UserData $templateUserData # Add internal and public number New-IpPbxInternalNumber -Number $newUserInternalNumber | Add-IpPbxInternalNumberToUser -UserName $newUserName New-IpPbxPublicNumber -PublicNumber $newUserPublicNumber | Add-IpPbxPublicNumber -InternalNumber $newUserInternalNumber # Get new user as UserEntry object $newUserEntry = Get-IpPbxUser -UserName $newUserName # Change line key count Set-IpPbxUserLineKeyCount -UserEntry $newUserEntry -Count 4 # Update speeddial key count Set-IpPbxSpeedDialKeyCount -UserEntry $newUserEntry -SpeedDialKeyCount 250 # Add NT Account for Windows Authentication Add-IpPbxUserWindowsAccount -UserEntry $newUserEntry -NTAccount $newUserWindowsAccount # Remove all existing fax forwardings # Get-IpPbxFaxForwarding -UserEntry $newUserEntry | Remove-IpPbxFaxForwarding # Save changes Update-IpPbxUser -UserEntry $newUserEntry
  15. Hallo Herr Baumgardt, mit dem folgenden Code sollte es funktionieren (nicht getestet): <INVALID CODE REMOVED>
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and have taken note of our Privacy Policy.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.