Vonage/vonage-java-sdk

Cant create Call object from Json

kiamesdavies opened this issue · 1 comments

Consider this simple json

{
                "to": [
                    {
                        "type": "phone",
                        "number": "{phoneNumber}"
                    }
                ],
                "from": {
                    "type": "phone",
                    "number": "447441442936"
                },
                "ncco": [
                    {
                        "action": "talk",
                        "text": "There's need to verify your voice, please say Never forget tomorrow is a new day after the tone ",
                        "language": "en-US",
                        "style": 10
                    },
                    {
                        "action": "record",
                        "eventUrl": [
                            "http://voice1.yellowfin.npe:9087/callback/verify/{userId}"
                        ],
                        "endOnKey": "#",
                        "timeOut": 5,
                        "beepStart": true
                    },
                    {
                        "action": "talk",
                        "text": "Thank you, good bye",
                        "language": "en-US",
                        "style": 10
                    }
                ]
            }

Doing Call.fromJson(json) will cause an exception as the the Ncco Action SubType is not properly defined in the call object

Thank you for reporting. This is addressed in #400.