Skip to main content

Swap a new DDI number for the existing User

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:

  1. Go to Manage Organization, choose the Licenses tab
  2. Find the account that you want to change the number
  3. Click on Assigned Numbers - Manage
  4. Remove the existing Number
  5. Assign the new Number

Once you finish the above steps, the system will automatically update the new DDI number on the Microsoft Teamstab.

  1. Go to Application Settings > choose the Microsoft Teams tab
  2. Check if the new number is assigned to the MS Teams account correctly

3. Generate PowerShell Script

To generate the Powershell Script:

  1. On the Microsoft Teams tab, click on the 3 dots icon
  2. Choose View Script
  3. Select Copy Script

**Check the next step to know which lines are needed to copy.

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:

   

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