test: vonage 语音 url

dev/voice
Lei OT 5 months ago
parent ed9d374f5e
commit 1b4233dd62

@ -12,7 +12,6 @@
"dependencies": {
"@dckj/react-better-modal": "^0.1.2",
"@lexical/react": "^0.20.0",
"@vonage/client-sdk": "^2.0.0",
"antd": "^5.22.2",
"dayjs": "^1.11.13",
"dingtalk-jsapi": "^3.0.41",
@ -30,7 +29,7 @@
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.3",
"@vonage/client-sdk": "^2.0.0",
"@vonage/client-sdk": "^1.7.2",
"autoprefixer": "^10.4.20",
"eslint": "^8.45.0",
"eslint-plugin-react": "^7.37.2",

@ -7,8 +7,9 @@ import dayjs from "dayjs";
const callCenterStore = create((set, get) => ({
client: new VonageClient({
region: "AP",
// apiUrl: "https://api-ap-3.vonage.com", websocketUrl: "wss://ws-ap-3.vonage.com"
// region: "AP",
// apiUrl: "https://api-ap-3.vonage.com", websocketUrl: "wss://ws-ap-3.vonage.com",
loggingLevel: 'Verbose',
}),
call_id: 0,
loading: false,

@ -25,7 +25,7 @@ const app_id = '503c548f-cb61-4a3a-8599-cd815680b390';
const api_key = '197c68c9';
const api_secret = 'Aa11be17f298dfd4118bdf23';
const vonageNumber = "12019751815"; //用于通话的号码,今后根据前端提交来做号码切换
const vonageUser = "Highlights"; // user name
const vonageUser = "HighlightsTravel"; // user name
const response = (data) => {
return {
@ -55,7 +55,8 @@ app.get("/voice/answer", (req, res) => {
},
{
action: "record",
eventUrl: [`${req.protocol}://${req.get("host")}/vonage-server/voice/recordings`],
// eventUrl: [`${req.protocol}://${req.get("host")}/vonage-server/voice/recordings`],
eventUrl: [`${req.protocol}://${req.get("host")}/voice/recordings`],
},
{
action: "connect",

Loading…
Cancel
Save