Giter VIP home page Giter VIP logo

msteams-phonenumbermgmt's Introduction

Teams PSTN phone number management.

A project created to manage assigment of PSTN numbers in Microsoft Teams (Direct routing)

About:

This project is created with a dream to ease the management of phone numbers provided to an organization by an external provider (Telecommunications company's like T-Mobil or TDC). Phone numbers are often provided in an Excel spreadsheet and System administrator in charge needs to assign the number “by hand” and remember to update the spreadsheet.

This project aims to ease that pain by having the phone numbers in a database and Power BI report to display insight in to how the numbers are used and then a couple of PowerShell scripts to assign phone numbers and then a PowerShell script to “clean up” the database.

PowerShell modules in use (needs to be add in the automation account module section):

  • Microsoft Teams
  • SQLServer

Installation / Configuration - Quick and dirty:

Note: You only need to provide the PSTN numbers from your number serie and the country code, you don't need to add the user that is using the number - It can be done automatily by running the DB-Maintenance.ps1

How to:


EnableAndAssignPhoneNumber.ps1:

The PowerShell script will assign the first available phone number (PSTN) it can find in the DB and assign it to the user and then enable the user to use PSTN calling in Teams

There is a function for reserved numbers. Currently if it only looks at the department attribute. Say a user is in "IT" department then if a number is reserved for "IT" then the user will get the first available that is reserved for IT. otherwise the user will get the first available number.

DB-Maintenance.ps1:

This PowerShell script will first look at all users in Teams and add them to the database. After that the script will look up all users in the database in Teams. This is to ensure that the numberserie is always up to date.

ImportPSTNNumbersToDB.ps1

This PowerShell script will import the csv file PhoneNumberImportTemplate.csv in to the SQL table that has been created using CreateTables.sql

Database table struture:

  • PSTNnumber int NOT NULL PRIMARY KEY,
  • UsedBy varchar(255)
  • ReservedFor varchar(255)
  • CountryCode int

To-do / Bug fixes:

  • Update Active Directory OfficePhone attribute with assigned phone number

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.