Skip to main content
Question

Errors when trying to put a call on hold

  • February 29, 2020
  • 7 replies
  • 1388 views

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 replies

PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • 2393 replies
  • March 1, 2020

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

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



  • Author
  • Participating Frequently
  • 9 replies
  • March 4, 2020

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?


  • Author
  • Participating Frequently
  • 9 replies
  • March 5, 2020

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.


  • Author
  • Participating Frequently
  • 9 replies
  • March 5, 2020

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.


  • Author
  • Participating Frequently
  • 9 replies
  • March 5, 2020

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.


PhongVu
Community Manager
Forum|alt.badge.img
  • Community Manager
  • 2393 replies
  • March 5, 2020

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());
  }



  • Author
  • Participating Frequently
  • 9 replies
  • March 7, 2020

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.


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