首页 文章

RingCentral传真API中缺少传真“from”和“callerId”参数

提问于
浏览
1

我一直在尝试使用RingCentral API发送传真,但无法指定 From 传真电话号码来发送传真 . 它只使用公司传真号码发送传真 . 我无法找到使用号码传真的选项 . 我使用以下终点发送传真:

https://platform.ringcentral.com/restapi/v1.0/account/:accountId/extension/:extensionId/fax

1 回答

  • 1

    在RingCentral系统中, From (或发送)传真号码是传真呼叫者ID值 . 您可以更新此扩展以用于传真,但该值在发送传真API本身中不可用 . 要在每次发送的基础上更改此设置,您可以在每个传真请求之前更新呼叫者ID值 .

    您可以使用以下两种方法更新传真来电显示:

    两者都在下面描述 . 如果这对您有用,请告诉我 .

    1) Updating the Fax Caller ID

    要更新传真呼叫者ID,请调用 PUT extension/caller-id endpoints 并使用您感兴趣的号码的电话号码ID更新 callerIdcallerId . 您可以通过调用下一节中显示的 extension/phone-number 来获取此列表 .

    PUT /restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-id
    Authorization: Bearer {accessToken}
    Content-Type: application/json
    
    {
      "byFeature": [
        {
          "feature": "FaxNumber",
          "callerId": {
            "phoneInfo": {
              "id": 33333333
            }
          }
        }
      ]
    }
    

    有关更多信息,请参阅API参考:https://developer.ringcentral.com/api-docs/latest/index.html#!#RefUpdateCallerId

    1.1) Listing Your Available Caller ID Numbers

    要获取可以使用的数字列表,请调用 GET extension/phone-number endpoints :

    GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/phone-number
    Authorization: Bearer {accessToken}
    

    在您的JSON响应中,您将在 records 属性中包含电话号码列表 . 您可以使用的数字将具有以下属性值:

    • features 属性将具有 CallerId

    • type 属性将设置为 VoiceFaxFaxOnly

    以下是显示一个数字的JSON响应的摘录 . 你应该有更多的数字和一个 paging 对象 .

    {
      "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/phone-number?page=1&perPage=100",
      "records": [
        {
          "id": 33333333,
          "phoneNumber": "+16505550100",
          "paymentType": "Local",
          "location": "Belmont, CA",
          "type": "VoiceFax",
          "usageType": "DirectNumber",
          "status": "Normal",
          "country": {
            "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/dictionary/country/1",
            "id": "1",
            "name": "United States"
          },
          "features": [
            "SmsSender",
            "CallerId",
            "MmsSender"
          ]
        }
      ]
    }
    

    有关更多信息,请参阅API参考:https://developer.ringcentral.com/api-docs/latest/index.html#!#RefUserPhoneNumbers.html

    1.2) Reading The Fax Caller ID Value

    RingCentral支持多个来电显示值 . 要读取扩展的值,请对 extension/caller-id endpoints 进行以下API调用:

    GET /restapi/v1.0/account/{accountId}/extension/{extensionId}/caller-id
    Authorization: Bearer {accessToken}
    

    您将收到如下所示的响应,其中包含 byFeature 属性中的一组呼叫者ID值 . 查找 feature 属性设置为 FaxNumber 的功能 . 我只在下面显示 FaxNumber 功能来电显示,但该数组包含以下功能: CallFlipFaxNumber ,_ RingMeRingOutMobileAppAlternate .

    {
      "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/11111111/extension/22222222/caller-id",
      "byFeature": [
        {
          "feature": "FaxNumber",
          "callerId": {
            "type": "PhoneNumber",
            "phoneInfo": {
              "uri": "https://platform.devtest.ringcentral.com/restapi/v1.0/account/11111111/phone-number/33333333",
              "id": "33333333",
              "phoneNumber": "+16505550100"
            }
          }
        }
      ]
    }
    

    有关更多信息,请参阅API参考:https://developer.ringcentral.com/api-docs/latest/index.html#!#RefGetCallerId

    2) Using the Online Account Portal

    您还可以在以下位置更改在线帐户门户中的来电显示值:

    Settings > Outbound Calls > Caller ID > By Feature > Fax Number

    此知识库文章中提供了更多内容:

    https://success.ringcentral.com/articles/RC_Knowledge_Article/3614

相关问题