Swap a new DDI number for the existing User
- OSS/BSS Answers
- App Model - Organization Management
- App Model - Communication Apps Answers
- License Model - Organization Management
-
License Model - CPaaS Solution Answers
Phone System - Admin Guide Phone System - End-user Guide Mobile App Desktop App Web Phone Auto Attendant - Admin Guide Developer Hub - Admin Guide Microsoft Teams Operator Connect - Admin Guide Microsoft Teams Direct Routing - Admin Guide Contact Center - Supervisor Guide Contact Center - Agent Guide Omni-Channel SIP Trunk CPaaS - SIP Trunk CPaaS Fax Contact Dashboard Campaign File Explorer
- Integrations Answers
- Updated Regulations
- Ideas Portal
Table of Contents
There are cases when you want to change a different number for your agents.
In that cases, you can swap your agent's number for a new one.
In order to do so, please follow the steps below:
1. Swap a new number for User on the CPaaS Portal
You need to un-assign the current number and assign a new number for User:
- Go to Manage Organization, choose the Licenses tab
- Find the account that you want to change the number
- Click on Assigned Numbers - Manage
- Remove the existing Number
- Assign the new Number
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2022/04/22/5472b9b2-9a94-4250-b05c-d99a639aad63/f8675ca1-1b6e-4e3e-86b4-fe7398efbf52.gif)
2. Link the MS Team account with the new DDI number
Once you finish the above steps, the system will automatically update the new DDI number on the Microsoft Teams tab.
- Go to Application Settings > choose the Microsoft Teams tab
- Check if the new number is assigned to the MS Teams account correctly
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2022/04/22/54b4c011-919a-447c-809d-1abd0aa1a4ac/4fb9de8d-44e2-4a8d-8e4b-417aec5ae26c.png)
3. Generate PowerShell Script
To generate the Powershell Script:
- On the Microsoft Teams tab, click on the 3 dots icon
- Choose View Script
- Select Copy Script
**Check the next step to know which lines are needed to copy.
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2022/04/22/9b9eefc5-4490-4c4e-a064-3d3fcdf09a88/719e17d4-497f-4191-8f0d-1b6b58591372.gif)
4. Run Powershell
Note:
Users must be familiar with Microsoft Powershell script commands to execute the changes without affecting other commands. If unsure please approach a Microsoft certified expert.
Step 1: Open the PowerShell:
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2021/09/14/5b01739a-98fa-4e03-ad2e-c1c2c48977d8/ebfcc77c-92ee-4392-b172-222ec05ab608.jpeg)
Step 2: Paste the generated Power Shell script for swapping new DDI Number:
You should run the following command:
- Start Power Shell as Administrator (or with Administrator Privileges)
Install-Module -Name MicrosoftTeams -RequiredVersion 2.3.1
Import-Module MicrosoftTeams -RequiredVersion 2.3.1
$credential = Get-Credential
Connect-MicrosoftTeams -Credential $credential
- Remove the existing Number from the current User:
Set-CsUser -Identity <UserID>@<DomainID> -OnPremLineURI $null
- Map the new Number to the User:
Set-CsUser -identity "<UserID>@<DomainID>" -EnterpriseVoiceEnabled $true -HostedVoicemail $true -OnPremlineURI tel:+<New DDI Number>
Grant-CsTeamsCallingPolicy -PolicyName AllowCalling -Identity “<UserID>@<DomainID>”
Grant-CsOnlineVoiceRoutingPolicy -Identity <UserID>@<DomainID> -PolicyName B3
![](https://d2x3xhvgiqkx42.cloudfront.net/c94ab348-5fb1-4c1d-89b1-fa79e3e916d0/81ec6e6f-2b1b-45dc-9193-b23c4a10d966/2021/09/14/417b9826-2b6b-4887-b4c0-e23b4e7c05f6/6aeff616-1692-42ac-9473-27684ee198d9.png)