Skip to main content

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.

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

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



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?


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.


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.


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.


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



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