Skip to content

Instantly share code, notes, and snippets.

@davehorton
davehorton / gist:dc6380feda1a16502f9a13b5cb73acfb
Created October 26, 2022 15:19
jambonz rest API example: adding a carrier
## Add a carrier
POST http://jambonz.one/api/v1/ServiceProviders/2708b1b3-2736-40ea-b502-c53d8396247f/VoipCarriers
Authorization: Bearer <api-key>
{
"name": "test",
"e164_leading_plus": 1,
"application_sid": null,
"account_sid": null,
"requires_register": 1,
@davehorton
davehorton / nuance-tts-voice.json
Last active January 29, 2025 20:14
Nuance TTS languages and voices
[{
"language": "ar-ww",
"name": "Laila",
"model": "standard",
"gender": "female"
}, {
"language": "ar-ww",
"name": "Tarik",
"model": "standard",
"gender": "male"
$ npm run watch
> @nextiva/[email protected] watch /Users/dhorton/beachdog-enterprises/beachdog-networks/git/nextiva/browser-softphone-ui
> webpack --watch --mode=development --config ./config/webpack.config.base.js
src/components/CallAnsweredWidget/components/CallInfo/CallerDisplayName.tsx:2:8 - error TS1259: Module '"/Users/dhorton/beachdog-enterprises/beachdog-networks/git/nextiva/browser-softphone-ui/node_modules/@types/react/index"' can only be default-imported using the 'esModuleInterop' flag
2 import React, { ReactElement, useRef } from 'react';
~~~~~
MacBook-Pro-3:nextiva-connect-spa dhorton$ npm start
> @nextiva/[email protected] start /Users/dhorton/beachdog-enterprises/beachdog-networks/git/nextiva/nextiva-connect-spa
> cross-env NODE_ENV=development webpack serve --config ./config/webpack.dev.js
NEXTIVA We are proxying modules from your env file, Please be sure to run them locally.
<i> [webpack-dev-server] [HPM] Proxy created: /apps/nextiva-connect-analytics/ -> https://connectm4.dev.nextiva.xyz
<i> [webpack-dev-server] [HPM] Proxy created: /apps/nextiva-browser-softphone/ -> http://localhost:3008
<i> [webpack-dev-server] [HPM] Proxy rewrite rule created: "^/apps/nextiva-browser-softphone/" ~> "/"
@davehorton
davehorton / error.log
Created October 14, 2022 11:35
errors trying to start **-connect-spa on M1 mac
$ npm start
> @nextiva/[email protected] start
> cross-env NODE_ENV=development webpack serve --config ./config/webpack.dev.js
CLI for webpack must be installed.
webpack-cli (https://github.com/webpack/webpack-cli)
We will use "npm" to install the CLI via "npm install -D webpack-cli".
Do you want to install 'webpack-cli' (yes/no): yes
@davehorton
davehorton / create-call.js diff
Created August 24, 2022 16:25
diff for create-call test
diff --git a/test/create-call-test.js b/test/create-call-test.js
index b67dcc7..9c6cb80 100644
--- a/test/create-call-test.js
+++ b/test/create-call-test.js
@@ -5,6 +5,8 @@ const clearModule = require('clear-module');
const {provisionCallHook} = require('./utils')
const getJSON = bent('json')
+const waitFor = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
+
@davehorton
davehorton / conference.js diff
Created August 24, 2022 16:24
fix race condition in conference with waitHook
diff --git a/lib/tasks/conference.js b/lib/tasks/conference.js
index 655706f..2132a63 100644
--- a/lib/tasks/conference.js
+++ b/lib/tasks/conference.js
@@ -541,6 +541,9 @@ class Conference extends Task {
}
this.logger.debug(`Conference:_playHook: executing ${tasks.length} tasks`);
+ /* we might have been killed while off fetching waitHook */
+ if (this.killed) return [];
[2022-08-10 04:13:22.554 +0000] ^[[32mINFO^[[39m (1105 on ip-10-0-150-88): ^[[36mretrieved application for incoming call to 323456781^[[39m
callId: "9d54dea0-9305-123b-58af-023fd61c5256"
callSid: "17596a7b-8daa-4a52-aebb-f81e4f728bc6"
accountSid: "9351f46a-678c-43f5-b8a6-d4eb58d131af"
callingNumber: "devE2eTest"
calledNumber: "+323456781"
traceId: "4ceed1ede51ba5dd76a153be798ffdd4"
app: {
"application_sid": "69966565-587d-4c39-aa60-d90595352b9e",
"name": "Voicegateway Endpoint",
==> amazon-ebs: Provisioning with shell script: scripts/install_app.sh
amazon-ebs: building jambonz-feature-server..
==> amazon-ebs: npm WARN ERESOLVE overriding peer dependency
==> amazon-ebs: npm WARN While resolving: @opentelemetry/[email protected]
==> amazon-ebs: npm WARN Found: @opentelemetry/[email protected]
==> amazon-ebs: npm WARN node_modules/@opentelemetry/api
==> amazon-ebs: npm WARN @opentelemetry/api@"^1.1.0" from the root project
==> amazon-ebs: npm WARN 19 more (@opentelemetry/context-async-hooks, ...)
==> amazon-ebs: npm WARN
==> amazon-ebs: npm WARN Could not resolve dependency:
@davehorton
davehorton / vg-feature-server.log
Last active June 18, 2022 22:46
VG log for call where cognigy endpoint is slow to respond
** call arrives
{"level":30, "time": "2022-06-18T12:51:03.034Z","pid":19,"hostname":"feature-server-9dcf465f9-pr6ls","callId":"26ece8dd-69a8-123b-f999-0233a8878144","callSid":"1d7d16b3-6f13-4a16-a75c-cd9e911ed3bb","accountSid":"c75774f0-1102-4491-a6e4-6e5600c7b9b0","callingNumber":"devE2eTest","calledNumber":"+323456781","traceId":"ddee58b67df167c46e6a239cefaf19f8","app":{"application_sid":"f061514b-2b40-4601-9312-c2b37025d1c0","name":"Voicegateway Endpoint","service_provider_sid":null,"account_sid":"c75774f0-1102-4491-a6e4-6e5600c7b9b0","call_hook_sid":"de044e30-3015-477d-b5aa-9fd2e594cbaa","call_status_hook_sid":"1e98e256-b21b-4020-9ed7-df367bf1bbc6","messaging_hook_sid":"69762de1-0d77-4355-95e0-76bfdd0df83f","speech_synthesis_vendor":"microsoft","speech_synthesis_language":"en-US","speech_synthesis_voice":"en-US-JennyNeural","speech_recognizer_vendor":"microsoft","speech_recognizer_language":"en-US","created_at":"2022-04-12T08:48:36.000Z"},"msg":"retrieved application for incoming call to 323456781"}
{"le