question

Zachary Hilliker avatar image
Zachary Hilliker asked Phong Vu edited

API to disable 'always ring for 30 seconds before forwarding is completed'?

We have a small call center for incoming calls from doctors and nurses that can contain time sensitive requests. Some users are now working from home and share extensions. The setting 'always ring for at least 30 seconds' ends up causing delays in ringing for the people in the office using the actual phones, but we're unable to turn it off permanently because any time someone logs into the app, the setting turns itself back on automatically. Is there an API that can be used to turn off this setting? If we can get this figured out we can at least have this run on a schedule to turn the setting off for all users, or even set up a task that runs the api call when a user logs into an associated computer.

rest api
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered Phong Vu edited

Are you talking about this "Always ring for at least 30 seconds before forwarding is completed." setting? I am not aware of the fact that the setting turns itself back on automatically. How can I reproduce that? I test on my phone by login and logout and see the setting unchanged. Please show me the sequence how reproduce it. It sounds like a bug.

Regardless, you ask about an API to turn it on and off, if that is the setting, you can call this API to read and update the rule. Sample code in Node JS using RingCentral JS SDK!

async function readCallHandlingRules(){
    console.log("===== readCallHandlingRules ======")
    var endpoint = `/restapi/v1.0/account/~/extension/~/answering-rule/business-hours-rule`
    try{
      var params = {
        view: "Detailed"
      }
      const resp = await rcsdk.get(endpoint, params)
      var jsonObj = await resp.json()
      
      console.log(jsonObj.forwarding.mobileTimeout)
      console.log("=======")
      // toggle value 
      if (jsonObj.forwarding.mobileTimeout){
        changeRuleSetting(false)
      }else{
        changeRuleSetting(true)
      }
    }catch (e){
      console.log(e.message)
    }
}

async function changeRuleSetting(flag){
    console.log("===== changeRuleSetting ======")
    var endpoint = `/restapi/v1.0/account/~/extension/~/answering-rule/business-hours-rule`
    try{
      var params = {
        forwarding: {
          mobileTimeout: flag
        }
      }
      const resp = await rcsdk.put(endpoint, params)
      var jsonObj = await resp.json()
      console.log(jsonObj.forwarding.mobileTimeout)
    }catch (e){
      console.log(e.message)
    }
}
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Zachary Hilliker avatar image
Zachary Hilliker answered

Perfect thank you. And yes that is precisely the setting i'm talking about. I've had a ticket with ringcentral trying to figure out why and stumbled upon a request about this issue. I've noticed all of our extensions at some point had it turned back on despite definitely having turned it off for at least all of our call queue members at various points to fix delays in phone ringing. I tested logging in on the mobile app after reading this specific feature request : Feature request : turning off Always ring for at least 30 seconds before forwarding is completed even if customer is using the RC app mobile - RingCentral Community Forums

But I just manually turned off the setting:

1626208901308.png


Logged into this extension on the mobile app and hit refresh 1626208931946.png


1626208901308.png (29.1 KiB)
1626208931946.png (47.3 KiB)
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys