vonage-php-sdk-core icon indicating copy to clipboard operation
vonage-php-sdk-core copied to clipboard

Can not get voiceStatusCallback from api

Open marphi opened this issue 3 years ago • 0 comments

Can not fetch Number::getWebhook(Number::WEBHOOK_VOICE_STATUS)

Some time ago I've noticed similar issue #271. After solving this issue there is no option to fetch the set value.

I've notice that endpoints GET https://rest.nexmo.com/account/numbers?size=100&index=1&page_index=1&api_key=<api_key>&api_secret=<secret>

returns response with data like:

    {
      "country": "PL",
      "msisdn": "xxxx",
      "type": "mobile-lvn",
      "features": [
        "VOICE"
      ],
      "voiceCallbackType": "tel",
      "voiceCallbackValue": "xxxx",
      "voiceStatusCallbackUrl": "https://example.org/..."
    },

voiceStatusCallbackUrl is the problem. Number::hasWebhook(Number::WEBHOOK_VOICE_STATUS) always returns false.

Number::getWebhook(Number::WEBHOOK_VOICE_STATUS) expects column name voiceStatusCallback, which is changed in #271, becouse api to create/update number expects voiceStatusCallback.

IMHO it could be a "backend" issue, serialization/deseriazliation on create/update endpoints have to expect the same field name as on fetch numbers endpoints.

marphi avatar Sep 09 '22 10:09 marphi