Skip to content

Instantly share code, notes, and snippets.

@davehorton
davehorton / gist:7d5553e786c4b07107ffcc34f5ca25ee
Created April 23, 2021 20:35
sip trace of failed reinvite
SIP Trace
*** Initial INVITE to SRTP client (public)
2021-04-23 20:08:39.923590 send 1336 bytes to wss/[96.67.37.126]:41662 at 20:08:39.923509:
INVITE sip:[email protected];transport=ws SIP/2.0^M
Via: SIP/2.0/WSS 54.74.169.84:8443;branch=z9hG4bK6vcFv8avpj8Qe^M
Max-Forwards: 70^M
From: <sip:[email protected]:41662>;tag=Zp1ee8yZU001Q^M
To: <sip:[email protected]:41662>^M
@davehorton
davehorton / file.cpp
Created May 19, 2021 21:08
StartStreamTranscriptionAsync example
Aws::String key(awsAccessKeyId);
Aws::String secret(awsSecretAccessKey);
Aws::Client::ClientConfiguration config;
if (region != nullptr && strlen(region) > 0) config.region = region;
if (*awsAccessKeyId && *awsSecretAccessKey) {
m_client = Aws::MakeUnique<TranscribeStreamingServiceClient>(ALLOC_TAG, AWSCredentials(awsAccessKeyId, awsSecretAccessKey), config);
}
else {
m_client = Aws::MakeUnique<TranscribeStreamingServiceClient>(ALLOC_TAG, config);
GNU gdb (Debian 8.2.1-2+b3) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
@davehorton
davehorton / dialogflow-regional-auth-failure.log
Created August 24, 2021 12:27
grpc trace file showing auth failure invoking dialogflow agent in europe-west1
D0824 11:53:50.239085731 11051 ev_posix.cc:173] Using polling engine: epollex
D0824 11:53:50.246649179 11051 lb_policy_registry.cc:42] registering LB policy factory for "grpclb"
D0824 11:53:50.246670908 11051 lb_policy_registry.cc:42] registering LB policy factory for "priority_experimental"
D0824 11:53:50.247460470 11051 lb_policy_registry.cc:42] registering LB policy factory for "weighted_target_experimental"
D0824 11:53:50.247480970 11051 lb_policy_registry.cc:42] registering LB policy factory for "pick_first"
D0824 11:53:50.247489103 11051 lb_policy_registry.cc:42] registering LB policy factory for "round_robin"
D0824 11:53:50.247492783 11051 lb_policy_registry.cc:42] registering LB policy factory for "ring_hash_experimental"
D0824 11:53:50.247504085 11051 dns_resolver_ares.cc:497] Using ares dns resolver
D0824 11:53:50.248445702 11051 certificate_provider_registry.cc:33] registering certificate provider factory for "file_watcher"
D0824 11:53:50.248462348 11051
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE scenario SYSTEM "sipp.dtd">
<!-- This program is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU General Public License as -->
<!-- published by the Free Software Foundation; either version 2 of the -->
<!-- License, or (at your option) any later version. -->
<!-- -->
<!-- This program is distributed in the hope that it will be useful, -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
@davehorton
davehorton / rtpengine.log
Created October 11, 2021 14:28
rtpengine log with re-offer to drop freeswitch from media path, resulting in no audio
*** call leg A
Oct 11 13:53:58 ip-10-0-0-13 rtpengine[754]: INFO: [99260N2ZhOTI4Njk1NzRjYzVhYmNmMzZkNDljNjhlOGZlNzU]: [control] Received command 'offer' from 127.0.0.1:58403
Oct 11 13:53:58 ip-10-0-0-13 rtpengine[754]: DEBUG: [99260N2ZhOTI4Njk1NzRjYzVhYmNmMzZkNDljNjhlOGZlNzU]: [control] Dump for 'offer' from 127.0.0.1:58403: { "DTLS": "off", "ICE": "remove", "SDES": "off", "call-id": "99260N2ZhOTI4Njk1NzRjYzVhYmNmMzZkNDljNjhlOGZlNzU", "command": "offer", "direction": [ "public", "private" ], "flags": [ "media handover", "port latching" ], "from-tag": "7db6df6f", "replace": [ "origin", "session-connection" ], "rtcp-mux": [ "accept" ], "sdp": "v=0#015#012o=- 1633960438143677 1 IN IP4 192.168.0.111#015#012s=Bria 5 release 5.6.2 stamp 99260#015#012c=IN IP4 192.168.0.111#015#012t=0 0#015#012m=audio 100 ...
Oct 11 13:53:58 ip-10-0-0-13 rtpengine[754]: DEBUG: [99260N2ZhOTI4Njk1NzRjYzVhYmNmMzZkNDljNjhlOGZlNzU]: ... 00 RTP/AVP 0 101#015#012a=rtcp:10001#015#012a=rtpmap:101 telephone-event/8000#015#012a=fmtp:101 0-15#0
@davehorton
davehorton / sbc-sip-daemonset.yaml
Created November 4, 2021 18:46
Daemonset configuration of jambonz sbc sip processing element, which will run in a special NodePool with hostnetwork
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: drachtio-sbc-sip
labels:
app: drachtio-sbc-sip
spec:
selector:
matchLabels:
app: drachtio-sbc-sip
@davehorton
davehorton / fakeserver.js
Created January 18, 2022 19:25
mock for rtpengine
const net = require('net');
const assert = require('assert');
const fs = require('fs');
const data = {
nosplit: fs.readFileSync(`${__dirname}/data/nosplit.txt`),
split1: fs.readFileSync(`${__dirname}/data/split-part1.txt`),
split2: fs.readFileSync(`${__dirname}/data/split-part2.txt`),
combine: fs.readFileSync(`${__dirname}/data/combine.txt`)
};
const debug = require('debug')('rtpengine:test');
@davehorton
davehorton / unit.js
Created January 18, 2022 19:27
add to the bottom of unit.js
// tcp tests
const FakeRtpEngine = require('./fakeserver');
test('tcp - single message', (t) => {
t.plan(1);
const server = new FakeRtpEngine({port: 3457, scenario: 'nosplit'});
const client = new TcpClient('localhost:3457');
client.on('connect', () => {
client.statistics()
.then((res) => {
t.pass();
@davehorton
davehorton / index.js
Last active January 31, 2022 18:07
suggested changes to queue say tasks
class Cognigy extends Task {
constructor(logger, opts) {
super(logger, opts);
...
/* add an array to store queued 'say' tasks */
this.queuedSayTasks = [];
}
/* we already have a method to create a 'say' task */
_makeSayTask(text) {