Configuring PBX Connector and Users

Prev Next

This guide outlines a specific use case for leveraging the ConnecttoTeams API to configure and deploy the ConnecttoTeams Unified App. While the ConnecttoTeams service is also available in other Teams applications tailored to individual services, those apps are outside the scope of this document.

Part I: Enable PBX Service to the Enterprise

If this is a new Enterprise, Create the Enterprise:

Follow the guide in Creating and Registering an Enterprise with Restricted Access. Follow the example which shows PBX as an example value for the services field.  If the enterprise will use several services, supply all services in the services attribute. For example, “PBX”,”SMS” .

If Enterprise is existing with other services enabled, add the PBX service to the Enterprise:

Edit the enterprise to add the PBX to the services attribute.

See the API call details here: Common API Methods > Edit Enterprise.

Part II: Configure PBX Connector Settings

  1. Verify Tenant for Direct Routing

    Verify the Tenant is ready for direct routing. See the API call details here: Common API Methods > Verify Tenant for Direct Routing.

  2. Create Direct Routing

    Configure a direct route for the Enterprise. See the API call details here: Common API Methods > Configure Direct Routing.

  3. Create PBX Location

    Create a PBX Location for the Enterprise. See the API call details here: Common API Methods > Configure PBX.

  4. Create App Template specific to the enterprise

    Configure the Unified App Settings for the Enterprise.

    Introduced in June 2025, the Unified Connector App contains all services (eg. SMS, PBX, Chat and CallApp) that are configured for a given user.  It can be deployed in place of any of the stand-alone apps.

    See the API call details here: Common API Methods > Configure Unified App Settings for Enterprise.

  5. Sync the Unified App

    Synchronizing — deploying and updating the Connector App to the Microsoft org catalog and Teams client of users — takes time. Thus, it is best to carry this step out after configuring a batch of users.

    See the API call details here: Common API Methods > Sync Unified App.

Part III: Configure PBX Users

  1. Get PBX Details

    Get the id of the PBX Location to which the PBX User will be assigned.

    API Endpoint

    Method: POST

    Path: /pbx/getBasicPBXLocationDetailsForEnterprise

    Request Body

    tenantId

    API Response

    On success, the API returns

    [
        {
            "id": 379,
            "canonicalPbxSIPDomain": "canonicalPbxSIPDomain",
            "proxyDomainPort": 0,
            "pbxLocation": "pbxLocation",
            "apiAccessEnabled": false,
            "apiIntegrationEnabled": false,
            "topologyHiding": false,
            "pbxType": "pbxType",
            "pbxLabel": "pbxLabel",
            "presencePackageType": "call-info",
            "callPolicy": {
                "callPolicyName": "callPolicyName",
                "callPolicyCNAM": "callPolicyCNAM",
                "forwardedCallsCallerId": "forwardedCallsCallerId"
            },
            "oldStyleHold": false,
            "metaSwitchSubscriptionCompatibility": false,
            "regExpiresValue": 0,
            "sipWaitForAlegAck": false,
            "enforceCodecsOnInbound": false,
            "rejectCalling": false,
            "acceptsEncodedFeatureCode": false,
            "convertHistoryInfoToDiversion": false,
            "escapeRequestUri": false,
            "enableMWIEvents": false,
            "links": []
        }
    ]

  2. Configure PBX User

    Repeat this for each PBX user to be configured in ConnecttoTeams

    API Method

    Method: POST

    Path: enterprise/configureUser

    Sample Request Body (JSON)

    {
      "pbxCallPolicyInfo": {
        "callPolicyCNAM": "TRANSPARENT",
        "callPolicyName": "Global",
        "forwardedCallsCallerId": "USER_CALLER_ID"
      },
      "authenticationResult": {
        "authenticationResult": {
          "accessToken": "eyJ0eXAiOiJKV1QiLCJub25jZSI6IjdKbXh..............",
          "accessTokenType": "login.microsoftonline.com",
          "expiresOn": 1743285790991831,
          "idToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1..............",
          "multipleResourceRefreshToken": false,
          "userInfo": {
            "displayableId": "[email protected]",
            "identityProvider": "user",
            "tenantId": "<tenantid>"
          }
        }
      },
      "userType": "Service",
      "directRouteId": 806,
      "useTeamsVoicemail": false,
      "password": "<password>",
      "rePassword": "<password>",
      "pbxAuthUserId": "104",
      "pbxLocation": "<pbx location>",
      "pbxUserId": "104",
      "phoneNumber": "14139301634",
      "portalLoginName": "",
      "portalPassword": "",
      "teamsUserId": "[email protected]",
      "useEnterpriseDialPlan": true,
      "tenantID": "<tenant-id>",
      "loginID": "<ent-admin-id>",
      "sipAutoProvisioningEnabled": false,
      "useAudioConferenceVRP": false,
      "userTag": ""
    }

    Required Fields:

    directRouteId

    password

    pbxAuthUserId

    pbxUserId

    phoneNumber

    pbxLocation

    teamUserId

    authenticationResult

    API Response

    On success, the API returns

    200 OK

  3. Sync Teams Users

    The change mentioned in the prior step is applied only to ConnecttoTeams databases and the PBX instance. The change need to be pushed to Microsoft as well so that the Teams User will actually be able to receive and make calls thru the PBX.

    See the API call details here: Common API Methods > Sync Teams Users.