question

Chady Boutros avatar image
Chady Boutros asked ·

Errors when trying to put a call on hold

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.

apicall controltelephony
1582986919064.png (40.4 KiB)
1582987146925.png (118.8 KiB)
1 |1000 characters needed characters left characters exceeded

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 ·

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

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


Share
1 |1000 characters needed characters left characters exceeded

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

Chady Boutros avatar image
Chady Boutros answered ·

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?

1 comment Share
1 |1000 characters needed characters left characters exceeded

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

What do you mean no difference? Does it still crash with the exception above?

0 Likes 0 · ·
Chady Boutros avatar image
Chady Boutros answered ·

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.


1583376203200.png (68.9 KiB)
1583376387677.png (27.3 KiB)
Share
1 |1000 characters needed characters left characters exceeded

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

Chady Boutros avatar image
Chady Boutros answered ·

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.


1583378872791.png (33.8 KiB)
1583378916309.png (34.7 KiB)
1583378956036.png (84.6 KiB)
1583379145806.png (34.2 KiB)
1583379464256.png (51.4 KiB)
Share
1 |1000 characters needed characters left characters exceeded

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

Chady Boutros avatar image
Chady Boutros answered ·

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.


1583379791292.png (8.6 KiB)
1583379844534.png (33.7 KiB)
Share
1 |1000 characters needed characters left characters exceeded

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 ·

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


3 comments Share
1 |1000 characters needed characters left characters exceeded

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

Thank you for the response. Sometimes, even if I remove that array, I'm still getting that device state error from ring central. Is there anywhere you can point me for this type of error?

0 Likes 0 · ·

You got to tell me what works what does not work. There are many reasons why it returns errors. If removing the empty array works for you, you should confirm that so I would know what's next.

Now, "sometimes" does not help me to diagnose and help you. All in all, the endpoint is very straightforward with just the valid telephonySessionId and the partyId.

0 Likes 0 · ·

I answered your question below. The error code is TAS-102, and it says Incorrect State. I just can't figure this out. I appreciate all your help very much.

0 Likes 0 · ·
Chady Boutros avatar image
Chady Boutros answered ·

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.


1583588216891.png (3.9 KiB)
1 comment Share
1 |1000 characters needed characters left characters exceeded

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

This is a different problem. You should be clear in your answer if the first problem was solved then I could help you faster rather than going back an forth.

With the "Incorrect State error message, it is either the partyId is incorrect (maybe the partiId is of the "customer") or the call is not yet connected. To identify the problem, make sure the call is connected, and also print out all the party ids from that call and try with other party ids.

0 Likes 0 · ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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