PUT api/2.0/crm/voip/numbers/{numberId}/settings This function requires authentication

Description

Updates the settings of the phone number with the ID specified in the request.

Parameters
Name Description Type Example
numberId
sent in url
Phone number ID string some text
greeting
sent in body
New first greeting that callers hear when they call to this phone number string some text
holdUp
sent in body
New music on hold that callers hear when they are placed in the waiting queue string some text
wait
sent in body
New URL to which the customer is redirected to the voice mail service when the waiting timeout is exceeded string some text
voiceMail
sent in body
New message that callers hear when the waiting queue length or max waiting time is exceeded and the callers are able to leave a voicemail message string some text
workingHours
sent in body
New phone number working hours ASC.VoipService.WorkingHours
allowOutgoingCalls
sent in body
Defines if a phone number allows making the outgoing calls or not
optional
Bool value true
record
sent in body
Defines if the phone number allows recording the calls or not
optional
Bool value true
alias
sent in body
New phone number alias string some text
Example
PUT api/2.0/crm/voip/numbers/%22some+text%22/settings
Host: yourportal.onlyoffice.com
Content-Type: application/json
Accept: application/json

{
  "greeting": "some text",
  "holdUp": "some text",
  "wait": "some text",
  "voiceMail": "some text",
  "workingHours": {
    "Enabled": true,
    "From": "2020-12-22T04:11:57.0469085+00:00",
    "To": "2020-12-22T04:11:57.0469085+00:00"
  },
  "allowOutgoingCalls": true,
  "record": true,
  "alias": "some text"
}
Returns

Updated phone number settings

Example Response

application/json

{
  "status": 0,
  "response": {
    "Id": "id",
    "Number": "Number",
    "Alias": "Alias",
    "Settings": {
      "VoiceUrl": "VoiceUrl",
      "Name": "Name",
      "Operators": [
        {
          "Id": "92eb52c8-bb93-4caf-87fb-46ea11530899",
          "Answer": 1,
          "ClientID": "ClientID",
          "Record": true,
          "TimeOut": 1,
          "Status": 1,
          "AllowOutgoingCalls": true,
          "PostFix": "PostFix",
          "PhoneNumber": "PhoneNumber",
          "RedirectToNumber": "RedirectToNumber"
        }
      ],
      "Queue": {
        "Id": "id",
        "Name": "Name",
        "Size": 123,
        "WaitUrl": "WaitUrl",
        "WaitTime": 4
      },
      "Caller": {
        "Id": "92eb52c8-bb93-4caf-87fb-46ea11530899",
        "Answer": 1,
        "ClientID": "ClientID",
        "Record": true,
        "TimeOut": 1,
        "Status": 1,
        "AllowOutgoingCalls": true,
        "PostFix": "PostFix",
        "PhoneNumber": "PhoneNumber",
        "RedirectToNumber": "RedirectToNumber"
      },
      "WorkingHours": {
        "Enabled": true,
        "From": "2020-12-22T04:11:57.0469085+00:00",
        "To": "2020-12-22T04:11:57.0469085+00:00"
      },
      "VoiceMail": "VoiceMail",
      "GreetingAudio": "GreetingAudio",
      "HoldAudio": "HoldAudio",
      "AllowOutgoingCalls": true,
      "Pause": true,
      "Record": true
    },
    "Caller": {
      "Id": "92eb52c8-bb93-4caf-87fb-46ea11530899",
      "Answer": 1,
      "ClientID": "ClientID",
      "Record": true,
      "TimeOut": 1,
      "Status": 1,
      "AllowOutgoingCalls": true,
      "PostFix": "PostFix",
      "PhoneNumber": "PhoneNumber",
      "RedirectToNumber": "RedirectToNumber"
    }
  }
}

text/xml

<result>
  <status>0</status>
  <response>
    <Id>id</Id>
    <Number>Number</Number>
    <Alias>Alias</Alias>
    <Settings>
      <VoiceUrl>VoiceUrl</VoiceUrl>
      <Name>Name</Name>
      <Operators>
        <Id>92eb52c8-bb93-4caf-87fb-46ea11530899</Id>
        <Answer>1</Answer>
        <ClientID>ClientID</ClientID>
        <Record>True</Record>
        <TimeOut>1</TimeOut>
        <Status>1</Status>
        <AllowOutgoingCalls>True</AllowOutgoingCalls>
        <PostFix>PostFix</PostFix>
        <PhoneNumber>PhoneNumber</PhoneNumber>
        <RedirectToNumber>RedirectToNumber</RedirectToNumber>
      </Operators>
      <Queue>
        <Id>id</Id>
        <Name>Name</Name>
        <Size>123</Size>
        <WaitUrl>WaitUrl</WaitUrl>
        <WaitTime>4</WaitTime>
      </Queue>
      <Caller>
        <Id>92eb52c8-bb93-4caf-87fb-46ea11530899</Id>
        <Answer>1</Answer>
        <ClientID>ClientID</ClientID>
        <Record>True</Record>
        <TimeOut>1</TimeOut>
        <Status>1</Status>
        <AllowOutgoingCalls>True</AllowOutgoingCalls>
        <PostFix>PostFix</PostFix>
        <PhoneNumber>PhoneNumber</PhoneNumber>
        <RedirectToNumber>RedirectToNumber</RedirectToNumber>
      </Caller>
      <WorkingHours>
        <Enabled>True</Enabled>
        <From>2020-12-22T04:11:57.0469085+00:00</From>
        <To>2020-12-22T04:11:57.0469085+00:00</To>
      </WorkingHours>
      <VoiceMail>VoiceMail</VoiceMail>
      <GreetingAudio>GreetingAudio</GreetingAudio>
      <HoldAudio>HoldAudio</HoldAudio>
      <AllowOutgoingCalls>True</AllowOutgoingCalls>
      <Pause>True</Pause>
      <Record>True</Record>
    </Settings>
    <Caller>
      <Id>92eb52c8-bb93-4caf-87fb-46ea11530899</Id>
      <Answer>1</Answer>
      <ClientID>ClientID</ClientID>
      <Record>True</Record>
      <TimeOut>1</TimeOut>
      <Status>1</Status>
      <AllowOutgoingCalls>True</AllowOutgoingCalls>
      <PostFix>PostFix</PostFix>
      <PhoneNumber>PhoneNumber</PhoneNumber>
      <RedirectToNumber>RedirectToNumber</RedirectToNumber>
    </Caller>
  </response>
</result>