After successfully working for few days in the sandbox, my app stopped working.
My app uses PHP and cURL to call RC APIs and has both read presence and read account permissions. App uses OAuth 2.0 Authorization Code Flow.
It registers a webhook passing the following filter
/restapi/v1.0/account/~/extension/xxxxxx/presence?detailedTelephonyState=true
/restapi/v1.0/account/~/extension/xxxxxx/presence/line/presence?detailedTelephonyState=true
/restapi/v1.0/account/~/extension/xxxxxx/message-store
and the following parameters
$post = array (
"eventFilters" => $filter,
"deliveryMode" => array(
"transportType" => "WebHook",
"address" => "https://myserver.com/rc/subscription.php?guid=6e39c7b7-8241-49d9-9164-07c0c9367ab9"
)
to
https://platform.devtest.ringcentral.com/restapi/v1.0/subscription
I see my hook - subscription.php - being called first time during registration passing VALIDATION-TOKEN that is then returned back. The subscription returns success with a valid subscription id.
Here is a typical successful return from the registration API:
{ "uri" : "https://platform.devtest.ringcentral.com/restapi/v1.0/subscription/2ef8978e-82c1-4077-b335-03399984b...;,
"id" : "2ef8978e-82c1-4077-b335-03399984b47e",
"creationTime" : "2016-10-22T07:19:59.295Z",
"status" : "Active",
"eventFilters" : [ "/restapi/v1.0/account/144905004/extension/144905004/presence?detailedTelephonyState=true", "/restapi/v1.0/account/144905004/extension/144905004/presence/line/presence?detailedTelephonyState=true", "/restapi/v1.0/account/144905004/extension/146030004/presence?detailedTelephonyState=true", "/restapi/v1.0/account/144905004/extension/146030004/message-store", "/restapi/v1.0/account/144905004/extension/146031004/message-store", "/restapi/v1.0/account/144905004/extension/146032004/message-store", "/restapi/v1.0/account/144905004/extension/144905004/message-store", "/restapi/v1.0/account/144905004/extension/146032004/presence?detailedTelephonyState=true", "/restapi/v1.0/account/144905004/extension/146031004/presence?detailedTelephonyState=true" ],
"expirationTime" : "2016-10-29T07:19:59.295Z",
"expiresIn" : 604799,
"deliveryMode" : {
"transportType" : "WebHook",
"encryption" : false,
"address" : "https://myserver.com/rc/subscription.php?guid=6e39c7b7-8241-49d9-9164-07c0c9367ab9";
}
}
When I test the subscription by calling the phone (RingCentral softphone is running) , the softphone pops up but the webhook is not called.
All direct calls to RC API work. I am able to get account info, extensions, etc.
It was working for few days. I am pulling my hair out!
How to debug this?
Any help would be greatly appreciated.