Highlight a phrase and click this icon to search it on Swyx-Forum    Highlight a phrase and click this icon to search it within the Swyx Knowledgebase    Highlight a phrase and click this icon to search it using Goolge    Highlight a phrase and click this icon to search it using Wikipedia

Highlight a phrase and click this icon to search it on Swyx-Forum    Highlight a phrase and click this icon to search it within the Swyx Knowledgebase    Highlight a phrase and click this icon to search it using Goolge    Highlight a phrase and click this icon to search it using Wikipedia

Project Links
Project Team

Sebasian Dreier

Sebastian Dreier
(Project Lead)

Sebasian Dreier

Sebastian Dreier
(Project Lead)
Latest Downloads
Latest Docu Updates
Latest Forum Posts

IpPbx Powershell Module - Forums

 

IpPbx Powershell Module - Forums

 

 
  Forums  Project - IpPbx...  Using IpPbx Pow...  Script to set all currently logged in users to 'auto register'
Previous Previous
 
Next Next
New Post 2/21/2012 8:58 AM
Resolved
User is offline Ruud van Strijp
14 posts
9th Level Poster


Script to set all currently logged in users to 'auto register'  (Netherlands)

Hello,

We have an environement where routing is based on the logged in status of a phone. If someone isn't logged in, the call will go to the next person in the contact path. Because of this, we have the feature 'Automatic Login' of all users disabled; if we don't do this, logged off phones keep automatically logging back on.

This works well in practice, with one issue: If we restart the server, everyone is logged off. So I was wondering, is there a way to run a script (PowerShell or some other way) that temporarily sets all logged in users to Automatically login? Then I can run this script before restarting the server/services, and after everything has been restarted and the users are logged in again, I will run a different script that will disable the checkbox of automatic login again.

This way, the customer won't notice much if we make a full restart of the server. They have a couple of phones for users that work overnight (they run 24/7), so even if I'd restart the server late at night these people would normally be disconnected.

Thanks,

Ruud van Strijp

 
New Post 2/23/2012 9:30 AM
Online now... Sebastian Dreier
266 posts
www.swyx.com
3rd Level Poster








Re: Script to set all currently logged in users to 'auto register'  (Germany)

Hi Ruud,

you can use the following Powershell snippet to enable the Phone AutoLogin for all SwyxWare users:

Import-Module ippbx
Connect-IpPbx -ServerName <ServerAddress>
Get-IpPbxUser | Set-IpPbxUserPhoneLogin -PhoneAutoLogin $true

If you want to disable the AutoLogin just call the last command once again with "$false" instead of "$true".
   


Sebastian Dreier
Swyx Solutions AG
Software Engineer (Server Development Team)
Microsoft Certified Professional Developer
Microsoft Certified IT Professional

View Sebastian Dreier's profile on Xing View Sebastian Dreier's profile on LinkedIn
 
New Post 2/23/2012 3:43 PM
User is offline Ruud van Strijp
14 posts
9th Level Poster


Re: Script to set all currently logged in users to 'auto register'  (Netherlands)

Hello Sebastian,

Thanks very much for your reply!

Is there also a way to only do this for the users that are currently logged in? Else all users will be logged in after I've restarted the server after using this command.
So I'd like to only set the PhoneAutoLogin variable to true for people that are currently logged in.

Thanks,
Ruud

 
New Post 2/23/2012 5:46 PM
Online now... Marcus
222 posts
www.swyx.com
3rd Level Poster




Re: Script to set all currently logged in users to 'auto register'  (Germany)

You can use the current user state:

Import-Module ippbx
Connect-IpPbx -ServerName <ServerAddress>
Get-IpPbxPhonebook | Where-Object {($_.UserStatus -ne [SWConfigDataClientLib.WSUserPhoneBook.PhonebookStatus]::LoggedOff) -and ($_.UserStatus -ne [SWConfigDataClientLib.WSUserPhoneBook.PhonebookStatus]::NoStatus)} | ForEach-Object { Set-IpPbxUserPhoneLogin -UserId $_.UserId -PhoneAutoLogin $true } 

 
New Post 2/24/2012 7:30 AM
User is offline Ruud van Strijp
14 posts
9th Level Poster


Re: Script to set all currently logged in users to 'auto register'  (Netherlands)

 Hey Marcus,

Thank you very much, I will try this as soon as possible!

Ruud van Strijp

 
Previous Previous
 
Next Next
  Forums  Project - IpPbx...  Using IpPbx Pow...  Script to set all currently logged in users to 'auto register'

 

 

 

Forum Policy

The discussion forums at Swyx Forum are dedicated to the discussion of Swyx, SwyxWare and related topics.

For the benefit of the community and to protect the integrity of swyx-form, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial products and non-commercial products which are not directly related to SwyxWare, it's OEM versions.
  2. No Flaming or Trolling.
  3. No Profanity, Racism, or Prejudice.
  4. Furthermore, make sure your posts comply to our Terms of Use.
  5. Newest development in German law defines online forums as journalistic content, making the forum owner and all posters to journalists. With this statement the forum owner declares that neither he nor his users are journalists with all legal consequences.
  6. The German Jugendmedienschutz-Staatsvertrag (JMStV) (Protection of Minors) defines a disclosure of online medias which are not suitable for minors below the age of 18. The Swyx Forum webseite does not provide any such content and underlies therefore not this disclosure. Please see further details including the responsible person for the protection of minors and direct contact data in the Imprint.
  7. The forums are currently unmoderated, meaning all postings will appear immediately after submission. If this turns out not working due to massive abuse all forums will switch to moderated mode, meaning a posting must be approved after submission my a moderator before appearing.
  8. You can use any language you like (except for the project forums) but keep in mind that by using english you will reach the largest audience.
  9. Within the project forums english language is mandatory.

 

Forum Policy

The discussion forums at Swyx Forum are dedicated to the discussion of Swyx, SwyxWare and related topics.

For the benefit of the community and to protect the integrity of swyx-form, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial products and non-commercial products which are not directly related to SwyxWare, it's OEM versions.
  2. No Flaming or Trolling.
  3. No Profanity, Racism, or Prejudice.
  4. Furthermore, make sure your posts comply to our Terms of Use.
  5. Newest development in German law defines online forums as journalistic content, making the forum owner and all posters to journalists. With this statement the forum owner declares that neither he nor his users are journalists with all legal consequences.
  6. The German Jugendmedienschutz-Staatsvertrag (JMStV) (Protection of Minors) defines a disclosure of online medias which are not suitable for minors below the age of 18. The Swyx Forum webseite does not provide any such content and underlies therefore not this disclosure. Please see further details including the responsible person for the protection of minors and direct contact data in the Imprint.
  7. The forums are currently unmoderated, meaning all postings will appear immediately after submission. If this turns out not working due to massive abuse all forums will switch to moderated mode, meaning a posting must be approved after submission my a moderator before appearing.
  8. You can use any language you like (except for the project forums) but keep in mind that by using english you will reach the largest audience.
  9. Within the project forums english language is mandatory.
Sponsors