Skip to content

Instantly share code, notes, and snippets.

@davehorton
davehorton / error.log
Created October 14, 2022 11:35
errors trying to start **-connect-spa on M1 mac
$ npm start
> @nextiva/nextiva-connect-spa@1.49.0-dev 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/core@1.0.1
==> amazon-ebs: npm WARN Found: @opentelemetry/api@1.1.0
==> 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
@davehorton
davehorton / gist:8edbdb8d37475ac116b53f416a44a00d
Created June 16, 2022 18:55
rtpengine log using 'subscribe request'
Jun 16 18:46:24 ip-10-0-224-48 rtpengine[792]: INFO: [55b3ce70fcf98a1e6d90d9bd0e596090@0.0.0.0]: [control] Received command 'offer' from 127.0.0.1:49643
Jun 16 18:46:24 ip-10-0-224-48 rtpengine[792]: DEBUG: [55b3ce70fcf98a1e6d90d9bd0e596090@0.0.0.0]: [control] Dump for 'offer' from 127.0.0.1:49643: { "DTLS": "off", "ICE": "remove", "SDES": "off", "call-id": "55b3ce70fcf98a1e6d90d9bd0e596090@0.0.0.0", "command": "offer", "direction": [ "public", "private" ], "flags": [ "media handover", "port latching" ], "from-tag": "95088639_c3356d0b_a94a28fa-9ce7-4f1b-89f1-ea8d653e3d13", "replace": [ "origin", "session-connection" ], "rtcp-mux": [ "accept" ], "sdp": "v=0#015#012o=root 466011880 466011880 IN IP4 172.18.139.214#015#012s=Twilio Media Gateway#015#012c=IN IP4 34 ...
Jun 16 18:46:24 ip-10-0-224-48 rtpengine[792]: DEBUG: [55b3ce70fcf98a1e6d90d9bd0e596090@0.0.0.0]: ... .203.251.131#015#012t=0 0#015#012m=audio 12806 RTP/AVP 0 8 101#015#012a=rtpmap:0 PCMU/8000#015#012a=rtpmap:8 PCMA/8000#015#012a=rtpmap:101 telephone
@davehorton
davehorton / auto-assign-eip.sh
Created May 23, 2022 15:13
auto-assign EIP
#!/bin/bash
TIMEOUT=20
PAUSE=5
aws_get_instance_id() {
instance_id=$( (curl http://169.254.169.254/latest/meta-data/instance-id) )
if [ -n "$instance_id" ]; then return 0; else return 1; fi
}
Compiled with warnings.
Failed to parse source map: 'webpack://antd/./components/config-provider/style/index.less' URL is not supported
Failed to parse source map: 'webpack://antd/./components/icon/style/index.less' URL is not supported
Failed to parse source map: 'webpack://antd/./components/locale-provider/style/index.less' URL is not supported
Failed to parse source map: 'webpack://antd/./components/time-picker/style/index.less' URL is not supported
module.exports = {
apps : [
{
name: 'jambonz-webapp',
script: 'npm',
cwd: '/home/admin/apps/jambonz-webapp',
args: 'run serve'
},
{
name: 'jambonz-smpp-esme',