Integrate Yeastar P-Series PBX System with Microsoft Teams

This topic describes how to integrate Yeastar P-Series PBX System with Microsoft Teams via Yeastar for Microsoft Teams App.

Overview

By associating Teams users with SIP extensions of the Yeastar P-Series PBX System, the Teams App will work as a softphone that is registered to the PBX, and you can achieve the followings:
  • Make and receive calls directly from the Teams App.
  • Keep your existing phone numbers, SIP phones, and any SIP devices.
  • Enjoy advanced PBX features including IVR, call queue, call routing, call recording, and so on.

This topic introduces the integration between Yeastar P-Series PBX System and Microsoft Teams based on the following configurations:

  • The Yeastar P-Series PBX System is behind a router and has a public IP address 110.80.36.162.
  • The Yeastar P-Series PBX System is deployed in the local network 192.168.6.0/255.255.255.0.

Requirements

Microsoft 365
  • Get admin access to Microsoft 365 admin center.
  • Your Microsoft service must meet the following requirements:
    Microsoft 365 version Requirements
    Microsoft 365 Business Basic

    Any one of the followings is required:

    • "Common Area Phone" license
    • “Phone System" license
    • "Microsoft 365 Business Voice" add-on
    Note: Not all of them are available in all the countries, buy any one of them according to your country or region.
    Microsoft 365 Business Standard
    Microsoft 365 Business Premium
    Office 365 E1
    Office 365 E3
    Microsoft 365 E3
    Office 365 E5 No additional requirements.
    Microsoft 365 E5
Yeastar for Microsoft Teams App
Purchase the Yeastar for Microsoft Teams license by your Microsoft 365 admin account; Activate the license when you receive an activation email.
Yeastar P-Series PBX System
Get admin access to Yeastar P-Series PBX System.

1. Configure Yeastar P-Series PBX System

Step1. Configure port forwarding & NAT

To ensure that Microsoft Teams can communicate with Yeastar P-Series PBX System, you need to forward relevant ports on your router and configure NAT on your PBX.

  1. Configure port forwarding on the router that is connected to your PBX.
    1. Log in to the PBX web interface, go to PBX Settings > SIP Settings > General > Basic, check the SIP UDP port and RTP ports.

    2. Log in to your router, forward the SIP UDP port and RTP ports.

      In this scenario, configure the port forwarding as follows:

      Port External port Internal port
      SIP 5566 UDP 5060 UDP
      RTP 10000-12000 UDP 10000-12000 UDP
  2. Configure NAT on your PBX.
    1. On PBX web interface, go to System > Network > Public IP and Ports.
    2. In the Public IP (NAT) section, complete the following configurations:
      • Public IP (NAT): Turn on this option.
      • NAT Type: Select Public IP Address .
      • Public IP Address: Enter 110.80.36.162.
      • Local Network Identification: Add all your local network. This setting will allow all your local devices to communicate with the PBX by the local IP address instead of passing through the router.

        In this scenario, add 192.168.6.0/255.255.255.0.

      • NAT Mode: Select a SIP NAT mode. In this scenario, select Yes.

        The PBX will use NAT and ignore the address information in the SIP/SDP headers and reply to the sender's IP address and port.

    3. In the Public Ports section, complete the following setting:
      • External SIP UDP Port: Enter 5566.
    4. Click Save and Apply.

Step2. Create a SIP extension

  1. Go to Extension and Trunk > Extension, click Add and select Add.
  2. In the Basic section, select SIP Extension from the drop-down list of Extension Type.
  3. In the User Information section, configure user information as follows:
    • First Name: Enter the user's first name.
    • Last Name: Enter the user's last name.
    • Email Address: Leave it blank or configure it as needed.
    • Mobile Number: Leave it blank or configure it as needed.
    • User Password: Retain default value or configure it as needed.
    • User Role: Retain default value or configure it as needed.
  4. In the Extension Information section, configure extension information as follows:
    • Extension Number: Enter a desired extension number.
    • Caller ID: Retain default value or configure it as needed.
    • Registration Name: Retain default value or configure it as needed.
    • Registration Password: Retain default value or configure it as needed.
    • Concurrent Registrations: Select a value from the drop-down list. This option defines how many SIP phones are allowed to register with the extension. The maximum number of concurrent registrations is 3.
  5. Click Advanced tab, unselect the checkbox of Qualify.

  6. Click Security tab, select the checkbox of Allow Remote Registration.

  7. Click Save and Apply.
    Note: The following SIP credentials are required when you configure Teams users on the configuration portal.
    • Extension number
    • Registration name
    • Registration password

2. Integrate Yeastar P-Series PBX System and Microsoft Teams

Log in to the configuration portal by your Microsoft 365 admin account to integrate Yeastar P-Series PBX System and Microsoft Teams.

Step1. Check your tenant

Check if your Microsoft 365 tenant is ready for the integration.

  1. On the top navigation bar, click Getting Started tab.
  2. On the Prerequisites page, click Check My Tenant.

  3. In the pop-up window, select your Microsoft 365 admin account.

    The configuration portal starts checking your Microsoft 365 tenant.

  4. If your tenant is ready, click Next to set up PBX service.

Step2. Set up PBX service

  1. On the PBX/Trunk page, click PBX tab.
  2. Set up PBX service.

    • Start by selecting your PBX from the available templates: Select Yeastar P-series VoIP PBX.
    • Country: Select your country.
    • SIP Domain: Enter the public IP address of your PBX. In this scenario, enter 110.80.36.162.
    • SIP Proxy: Enter the public IP address and external SIP port of your PBX. In this scenario, enter 110.80.36.162:5566.
    • Authentication Type: Select Registration.
    • Protocol: Select the protocol of which SIP port you have forwarded. In this scenario, select UDP.
  3. Click Add PBX.

    A green checkmark prompting "Service successfully enabled" appears. It automatically enters into Teams page to synchronize Yeastar P-Series PBX System with Microsoft 365.

Step3. Synchronize Yeastar P-Series PBX System with Microsoft 365

  1. Click Sync Now - Changes Queued to synchronize Yeastar P-Series PBX System with Microsoft 365.

    It takes several minutes to proceed with the synchronization.

  2. After the synchronization completes, click Next to associate Teams users with SIP extensions.

Step4. Associate a Microsoft Teams user with a SIP extension

To ensure that users can make and receive calls on Microsoft Teams using the PBX phone service, you need to associate Microsoft Teams users with SIP extensions.
  1. On the Users page, complete the followings:

    • Select a User: Select a Teams user from the drop-down list.
      Note: Make sure the selected user has the required licenses of both Microsoft and Yeastar for Microsoft Teams, or the user can NOT make or receive calls.
    • Phone Number: Set the user's phone number.
    • SIP Username: Enter the extension's Extension Number.
    • Auth Username: Enter the extension's Registration Name.
    • Password: Enter the extension's Registration password.
  2. Click Add User and Sync.

    A green checkmark prompting "Service user successfully added" appears.

    If the user is successfully associated with the PBX, the Registration status shows .

Result

After integrating Yeastar P-Series PBX System with Microsoft Teams, Teams users can make and receive internal calls from the PBX extensions.

  • To allow Teams users to make outbound calls through PBX's trunk, you need to configure dial plans in Microsoft Teams.
  • To allow Teams users to receive inbound calls through PBX's trunk, you need to make sure at least an inbound route is configured to reach the extensions that are associated with the Teams users.

Configure Dial Plans in Microsoft Teams

Background information

Microsoft Teams generates a dial plan rule named "Call2Teams" after you integrate Yeastar P-Series PBX System with Microsoft Teams. The default rule with the pattern ^([\*\#][\*\#\d]+|[1-9]\d{0,5})$ only allows Teams users to dial numbers with maximum 6 digits, and start with digit 1-9.

Procedure

To allow Teams users to make outbound calls to any numbers, you need to set up a normalization rule, and move the rule to the top as follows.

  1. Log in to Microsoft Teams admin center.
  2. In the left navigation bar, click Voice > Dial plans.
  3. Click the default dial plan Global (Org-wide default).
  4. In the Normalization rules section, click +Add to add a dial plan rule.
  5. On the Add new rule page, set the rule.
    1. In the Name field, set a name for the rule.
    2. Optional: In the Description field, add a note to the rule.
    3. Select Advanced.
    4. Go to If condition > The number dialed matches this regular expression, enter ^(\d*)$.

      Teams users can make outbound calls to any numbers.

    5. Go to Then do this > Translate the number based on this regular expression, enter $1, which means no translation, Microsoft Teams will send the dialed number out without any modification.
    6. Go to Test this rule > Enter a phone number to test, enter a phone number and click Test to test if the number matches the pattern.
    7. Click Save.
  6. Change the rule's priority.
    Note: Microsoft Teams traverses the list of normalization rules from the top down, and uses the first rule that matches the dialed number. Move the rule to the top, or users may fail to call out.
    1. In the column, click the desired rule.
    2. On the menu bar, click Move up to move the rule to the top.

    3. Click Save.

Result

Teams users can dial external numbers according to the dial pattern of PBX's outbound route.

Test phone calls on Microsoft Teams

After the integration, you can test phone calls on Microsoft Teams.

Make a call

  1. On the left navigation bar, click Calls.
  2. Click Make a call.
  3. On the dialpad, enter a desired number.
    Note: Make sure the dialed number matches at least one outbound route on Yeastar P-Series PBX System. For example, there is an outbound route on the PBX as follows. In this case, you need to dial 915880123489 in order to reach 15880123489.

  4. Click Call.

Receive a call

When a call reaches a user's extension number, the user will receive a pop-up notification of an incoming call, and the user can decide whether to answer the call or not.