News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
Errors when trying to put a call on hold
Tags: rest api
Feb 29, 2020 at 6:40am   •   7 replies  •  0 likes
Chady Boutros

When i try to put an answered call from our external 'Yealink' phone on hold i get an error in guzzle.
this is what my api call looks like and i am logged into the platform as all my other calls are working. Im using this https://developers.ringcentral.com/api-reference/Call-Control/holdCallParty as my reference and was also confused as to why this call never needed the extension. Ive tried the call with both the account and extension and got the same error.

And The Errors I am getting when running this. Also keep in mind we have successfully recieved the incoming webhook call and i store the telephonySessionId. Also I have implemented delete call session and this is successful ==> https://developers.ringcentral.com/api-reference/Call-Control/deleteCallSession


I Underlined the strange things that popped out to me. Almost looks like it's not swapping in the accountId.

Thanks For your help.

7 Answers
answered on Mar 4, 2020 at 7:44pm  

I threw this in there just to make the call work and ended up with a valid error from the ringcentral api

Now im stuck with this.

:D fun times.

Thanks for your time.


 0
answered on Mar 4, 2020 at 7:38pm  

So i dug deeper and put some logs in the ringcentral Client.php, here they are.

When i run this code i get this for the output.

The Constructor for a GuzzleHttp Request does not take an array for the body.

eventually this array ends up here and this is where the exception is thrown.


Im going to try checking ahead of time if its an array and just pass in an empty string.

Thanks for your time.


 0
answered on Mar 4, 2020 at 6:46pm  

Yes same error as above, here is the same exception being thrown. I printed out the path being used from the post call too. The overall exception is being thrown from guzzle and not ringcentral.
Here is the php code calling site as well.

Thank you, any help is greatly appreciated.


 0
answered on Mar 1, 2020 at 10:06am  

Add the "/" to the beginning of your $path

$path = '/account/~/telephony ...'



 0
answered on Mar 7, 2020 at 5:37am  

Hi, i can confirm that removing the empty array did work for us. Now we are just stuck on the device error.

thank you for your time.


 0
answered on Mar 5, 2020 at 9:34am  

Now I pay closer attention to your first code sample, why do you pass an empty array to the post request that does not take any body?

Simply remove it.

$path = "/account/accountId/telephony/sessions/[telephonySessionId]/parties/[partyId]/hold";
  try{
      $resp = $platform->post($path);
      ...
  }catch (ApiException $ex){
      print_r("error");
      print_r($ex->getMessage());
  }



 0
answered on Mar 3, 2020 at 8:33pm  

I implemented that solution, but it made no difference. The outside phone does not respond. I can't answer, or hold. Am I doing this wrong?


 0
answered on Mar 4, 2020 at 7:17pm  

I dug deeper and put some logs into the ringcentral Client.php as seen here :

When this code ran and parsed the passed in properties it spit this out and i think you can see where the problem is.


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us