jambonz / jambonz-webapp

A simple provisioning web app for jambonz
MIT License
5 stars 21 forks source link

Adding Speech Provider results in "HTTP/1.1 500 Internal Server Error" #435

Closed bencarrasco closed 4 months ago

bencarrasco commented 4 months ago

All other areas of the Web App appear to work except when adding a speech service provider.

It was installed using docker compose from "jambonz-infrastructure".

FYI:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 5d870cb827f9 portainer/agent:2.19.3 "./agent" About an hour ago Up About an hour 0.0.0.0:9001->9001/tcp, :::9001->9001/tcp portainer_agent b4b528da559e docker_webapp "/entrypoint.sh" 2 hours ago Up 2 hours 0.0.0.0:3001->3001/tcp, :::3001->3001/tcp docker_webapp_1 aa6ed69887b1 jambonz/feature-server:latest "docker-entrypoint.s…" 2 hours ago Up 2 hours docker_feature-server_1 ab34aa276b07 jambonz/sbc-registrar:latest "docker-entrypoint.s…" 2 hours ago Up 2 hours docker_registrar_1 26223c006eec jambonz/sbc-outbound:latest "docker-entrypoint.s…" 2 hours ago Up 2 hours docker_sbc-outbound_1 4d32f01e4847 jambonz/sbc-inbound:latest "docker-entrypoint.s…" 2 hours ago Up 2 hours docker_sbc-inbound_1 2d12a672407b jambonz/sbc-call-router:latest "docker-entrypoint.s…" 2 hours ago Up 2 hours docker_call-router_1 8270f7e32628 jambonz/api-server:latest "docker-entrypoint.s…" 2 hours ago Up 2 hours 0.0.0.0:3000->3000/tcp, :::3000->3000/tcp docker_api-server_1 6f0ec7e646f1 drachtio/drachtio-server:latest "/entrypoint.sh drac…" 2 hours ago Up 2 hours 0.0.0.0:5060->5060/tcp, 0.0.0.0:5060->5060/udp, :::5060->5060/tcp, :::5060->5060/udp docker_drachtio-sbc_1 9c881b7da633 docker_mysql "docker-entrypoint.s…" 2 hours ago Up 2 hours (healthy) 33060/tcp, 0.0.0.0:3360->3306/tcp, :::3360->3306/tcp docker_mysql_1 402f61198c06 drachtio/rtpengine:jambonz-test "/entrypoint.sh rtpe…" 2 hours ago Up 2 hours 22222/udp, 0.0.0.0:40000-40100->40000-40100/udp, :::40000-40100->40000-40100/udp docker_rtpengine_1 52119366ea42 drachtio/drachtio-server:latest "/entrypoint.sh drac…" 2 hours ago Up 2 hours docker_drachtio-fs_1 75325e1ac30a redis:alpine "docker-entrypoint.s…" 2 hours ago Up 2 hours 0.0.0.0:16379->6379/tcp, :::16379->6379/tcp docker_redis_1 6f4b9fbab3d3 influxdb:1.8 "/entrypoint.sh infl…" 2 hours ago Up 2 hours 0.0.0.0:8086->8086/tcp, :::8086->8086/tcp docker_influxdb_1 33b1347ad898 drachtio/drachtio-freeswitch-mrf:0.4.27 "/entrypoint.sh free…" 2 hours ago Up 2 hours 0.0.0.0:8022->8021/tcp, :::8022->8021/tcp docker_freeswitch_1

See request below.

POST /v1/ServiceProviders/REDACTED/SpeechCredentials HTTP/1.1 Accept: / Accept-Encoding: gzip, deflate Accept-Language: en-US,en;q=0.9 Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzY29wZSI6ImFkbWluIiwicGVybWlzc2lvbnMiOlsiVklFV19PTkxZIiwiUFJPVklTSU9OX1NFUlZJQ0VTIiwiUFJPVklTSU9OX1VTRVJTIl0sInVzZXJfc2lkIjoiYTlmNTU5OWMtMDM3ZC00NTJkLWEwZTYtYWZmODI5MWQ4NzM3IiwiaWF0IjoxNzE2MjM0Nzk1LCJleHAiOjE3MTYyMzgzOTV9.B54WLm9EFrl7_RI5XzX8wEuTWV866tqiudJ-FrvciB8 Connection: keep-alive Content-Length: 409 Content-Type: application/json Host: 10.0.102.108:3000 Origin: http://10.0.102.108:3001 Referer: http://10.0.102.108:3001/ User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 Edg/124.0.0.0

{ "vendor": "microsoft", "account_sid": null, "service_provider_sid": "REDACTED", "use_for_tts": 1, "use_for_stt": 1, "region": "eastus", "use_custom_tts": 0, "custom_tts_endpoint": null, "use_custom_stt": 0, "custom_stt_endpoint": null, "service_key": null, "access_key_id": null, "secret_access_key": null, "api_key": "REDACTED", "client_id": null, "secret": null, "riva_server_uri": null }

bencarrasco commented 4 months ago

I searched through the repo and noticed that the schema had changed slightly and I assume the docker build images weren't updated to reflect it. I updated the speech_credentials table schema using the following SQL ALTER ABLE to add the missing field:

ALTER TABLE speech_credentials ADD COLUMN label VARCHAR(64);