Skip to content

Instantly share code, notes, and snippets.

@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: [[email protected]]: [control] Received command 'offer' from 127.0.0.1:49643
Jun 16 18:46:24 ip-10-0-224-48 rtpengine[792]: DEBUG: [[email protected]]: [control] Dump for 'offer' from 127.0.0.1:49643: { "DTLS": "off", "ICE": "remove", "SDES": "off", "call-id": "[email protected]", "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: [[email protected]]: ... .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',
<?xml version="1.0" encoding="ISO-8859-1" ?>
<scenario name="Test">
<send>
<![CDATA[
INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0
Via: SIP/2.0/[transport] [local_ip]:[local_port]
Max-Forwards: 70
From: <sip:[email protected]>;tag=[call_number]
root@wcs-icr-db-001:~# curl --verbose https://api-agents.mongodb.com
* Rebuilt URL to: https://api-agents.mongodb.com/
* Hostname was NOT found in DNS cache
* Trying 34.230.213.36...
* Connected to api-agents.mongodb.com (34.230.213.36) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
curl --verbose https://valid-isrgrootx1.letsencrypt.org/
* Hostname was NOT found in DNS cache
* Trying 52.9.173.94...
* Connected to valid-isrgrootx1.letsencrypt.org (52.9.173.94) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
@davehorton
davehorton / rtpengine-stripped-application-params.log
Created March 3, 2022 15:34
rtpengine log with stripped m=application params
Mar 3 15:04:49 ip-10-0-13-72 rtpengine[13461]: DEBUG: [13629fbf-15a6-123b-c7be-12e962f3039b]: [control] Dump for 'answer' from 127.0.0.1:38351: { "DTLS": "off", "ICE": "remove", "SDES": "off", "call-id": "13629fbf-15a6-123b-c7be-12e962f3039b", "command": "answer", "flags": [ "media handover", "port latching" ], "from-tag": "D8HtgDFttry0m", "replace": [ "origin", "session-connection" ], "rtcp-mux": [ "demux" ], "sdp": "v=0#015#012o=root 774306435 774306437 IN IP4 172.18.130.155#015#012s=Twilio Media Gateway#015#012c=IN IP4 34.203.251.166#015#012t=0 0#015#012m=audio 18360 RTP/AVP 0 8 127#015#012a=rtpmap:0 PCMU/8000#015#012a=rtpmap ...
Mar 3 15:04:49 ip-10-0-13-72 rtpengine[13461]: DEBUG: [13629fbf-15a6-123b-c7be-12e962f3039b]: ... :8 PCMA/8000#015#012a=rtpmap:127 telephone-event/8000#015#012a=fmtp:127 0-16#015#012a=ptime:20#015#012a=maxptime:150#015#012a=sendrecv#015#012m=video 0 RTP/AVP 100 113 109 99#015#012m=video 0 RTP/AVP 109 99#015#012m=application 0 RTP/AVP 124#015#012m=application 0 * #015#012", "to
@davehorton
davehorton / say-loop.js
Created February 22, 2022 20:23
app for simple jambonz load test
const router = require('express').Router();
const WebhookResponse = require('@jambonz/node-client').WebhookResponse;
const text = `<speak>
<prosody volume="loud">Hi there,</prosody> and welcome to jambones!
jambones is the <sub alias="seapass">CPaaS</sub> designed with the needs
of communication service providers in mind.
Please hold while we do nothing for a long time, and then drop you.
</speak>`;
router.post('/', (req, res) => {
const {logger} = req.app.locals;
@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) {