Skip to main content
Solved

Unable to forward calls using API


  • New Participant
  • 1 reply

I upgraded to the latest RingCentral PHP SDK to support the JWT auth. Using the same code but modified to authenticate with JWT, it now fails to forward calls when the Webhook is triggered by the incoming call. Session and party IDs are from the Webhook data send by RingCentral.

The following error was thrown. Do you know what is causing this?

[24-Jan-2024 17:45:18 Australia/Sydney] PHP Fatal error: Uncaught GuzzleHttpExceptionClientException: Client error: `POST https://platform.ringcentral.com/restapi/v1.0/account/~/telephony/sessions/s-a0d854f1c5bd0z18d3a37330bz1071d5a0000/parties/p-a0d854f1c5bd0z18d3a37330bz1071d5a0000-2/forward` resulted in a `403 Forbidden` response:

{

"errors" : [

{

"errorCode" : "TAS-106",

"message" : "Operation is not allowed"

}

] (truncated...)

in /var/www/html/ring-central/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113

Stack trace:

#0 /var/www/html/ring-central/vendor/guzzlehttp/guzzle/src/Middleware.php(72): GuzzleHttpExceptionRequestException::create(Object(GuzzleHttpPsr7Request), Object(GuzzleHttpPsr7Response), NULL, Array, NULL)

#1 /var/www/html/ring-central/vendor/guzzlehttp/promises/src/Promise.php(209): GuzzleHttpMiddleware::GuzzleHttp{closure}(Object(GuzzleHttpPsr7Response))

#2 /var/www/html/ring-central/vendor/guzzlehttp/promises/src/Promise.php(158): GuzzleHttpPromisePromise::callHandler(1, Object(Gu in /var/www/html/ring-central/vendor/ringcentral/ringcentral-php/src/Http/Client.php on line 52




Best answer by PhongVu

Make sure the JWT token is generated by the user extension who receives the call. Call forwarding cannot be handled by other (even a super admin user) user extension than the owner of the call.

View original
Did this thread help you find an answer to your question?

2 replies

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • 2340 replies
  • Answer
  • January 24, 2024

Make sure the JWT token is generated by the user extension who receives the call. Call forwarding cannot be handled by other (even a super admin user) user extension than the owner of the call.


  • Author
  • New Participant
  • 1 reply
  • January 24, 2024

Using the token generated by the user that RingCentral used to trigger the Webhook fixes the problem.

Thanks.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings