question

Pavel Lebedev avatar image
Pavel Lebedev asked Phong Vu answered

RingCentral Terminating PubNub SMS Subscription (PHP)

I tried and failed to find manual on RC PHP SDK. In my application I need to create pubnub subscription, send SMS and wait for the answer for 3 seconds, then terminate the subscription whether answer is received or not...

I tried

$subscription->setKeepPolling(false);

and

$subscription->remove();

but they all result in throwing an error. Is there a peaceful way to do this? And how can I create subscription for a limited period of time?


Thanks

sms and text messagingsubscriptionpubnub
1 |3000

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

1 Answer

Phong Vu avatar image
Phong Vu answered

Are you seeing this error?

"Uncaught Error: Cannot use object of type PubNub\Models\Consumer\PubSub\PNMessageResult as array"

If so, update your RingCentral PHP SSDK to get the latest version.

$ php composer.phar require ringcentral/ringcentral-php

If it was not this error, print out the error and share it here.

1 |3000

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

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys