question

Zachary Spath avatar image
Zachary Spath asked Phong Vu commented

Attempt to forward a call in setup sate results in Forbidden "operation is not allowed"

I'm trying to forward a call out of a queue. The call forwarding application works in several ringCentral accounts except for the main customer it was built for.... it works in sandbox and production environments except one.

My app has the Call Control permission, the call state is still in Setup when the forward is sent with the proper payload of extensionNumber.

RingCentral returns operation not allowed / forbidden

Forbidden error happens when the call is in an Answered state but I can't find a reason for the failure.

body={"errors"=>[{"errorCode"=>"TAS-106", "message"=>"Operation is not allowed"}]}

response_headers={"server"=>"nginx", "date"=>"Wed, 26 Jan 2022 05:05:37 GMT", "content-type"=>"application/json", "content-length"=>"123", "connection"=>"close", "x-rate-limit-group"=>"light", "x-rate-limit-limit"=>"50", "x-rate-limit-remaining"=>"49", "x-rate-limit-window"=>"60", "routingkey"=>"SJC01P13", "rcrequestid"=>"99381BLAH6"} @status=403 @reason_phrase="Forbidden"


The one thing I see that stands out is that for this customer queues the calls quickly move from the Setup state to the Proceeding state. Even if we don't send the forward API message, the call still goes into a proceeding state. For some reason this only happens on one environment.


Any help at all would be greatly appreciated.

Zak

rest apicall forwardingwebhooks
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

There are 2 scenario to receive the Forbidden error.

1. A call is in a wrong stage (which is not in this case as you wrote)

2. A call forwarder is not the owner of the call. In your case, it is a call via a call queue, so the owner of the call is the call queue extension (the call queue manager).

So which user is authenticated in your app to forward that call?

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 Spath avatar image
Zachary Spath answered Phong Vu commented

Phong Vu! My call forwarder will never be the owner of the call, this is a server side automatic routing application with password authentication. The user I was using was had the Super Admin role, however... it was not the default Super Admin (with default extension 101). I have spent all week on this with a very frustrated customer, it's finally working. thank you!


3 comments
1 |3000

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

Yes, the only extension that can control other user's call is the main super admin user (not just any super admin). Note that this is for now and can be changed stricter in the future.

0 Likes 0 ·
Dev Team avatar image Dev Team Phong Vu ♦♦ ·

Thanks Phong, Zachary. I had the same thing. The ForwardCall stopped working when I moved from Sandbox to Production. In the Sandbox I was the SuperAdminUser, but in the Production environment our Manager created and was using the account.


I've asked my Manager to create a JWT key for me, so I can set it to our Routing Server.

Yes, we do exactly the same as Zachary, it is a .net core service using WebHooks and Forwarding calls from specific queues.


Summary

We DEFINITELY need ForwardCall to work a server side application. Please don't remove it. We can live with additional permission assignment requirements in the Admin Console etc. But please don't remove it.


Thanks.

0 Likes 0 ·

As I wrote earlier, if it's a call queue, you can use the user name and password of the call queue manager to authenticate your server app, then use that access token to forward incoming calls. Using the main super admin is ok. But that is not an official way to handle call forwarding.

0 Likes 0 ·

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