Skip to content

Instantly share code, notes, and snippets.

@rajneeshksoni
rajneeshksoni / gist:a0ec1b2f61f2866a5a1f9cc030c2a79b
Created May 15, 2024 09:59
twili-daily-pstn-sip-both-way
import twilio from "twilio";
const accountSid = "ACCOUNT_SID";
const authToken = "AUTH_TOKEN";
async function wait(second) {
return new Promise((resolve) => {
setTimeout(resolve, second * 1000);
});
}
import twilio from "twilio";
async function wait(second) {
return new Promise((resolve) => {
setTimeout(resolve, second * 1000);
});
}
async function makeCall(event) {
const accountSid = "";
@rajneeshksoni
rajneeshksoni / gist:a9aa49115baedac5eea8c1e9de739be9
Created February 16, 2024 17:16
twilio-sip-pstn-call-start
# start SIP and PSTN call
const accountSid = "";
const authToken = "";
const client = require("twilio")(accountSid, authToken);
client.calls
.create({
url: "WEB_HOOK_URI",
From e0f4089f1bf453811c68e614a86704d40713bbbf Mon Sep 17 00:00:00 2001
From: Sanchayan Maity <sanchayan@asymptotic.io>
Date: Thu, 19 Oct 2023 13:13:32 +0530
Subject: [PATCH] webrtcbin: Fix transceiver matching with FEC decoder for PCMU
When using PCMU, the payload type can be 0. When `rtpbin` requests
FEC decoder and passes a payload type of 0, the check on payload
type in `try_match_transceiver_with_fec_decoder` resulted in the
FEC decoder not being set on the transceiver. This then resulted
in code setting pass through on the `rtpulpfecdec` being bypassed
From 00dd5d443ff11f29489ea8a580803818ad440005 Mon Sep 17 00:00:00 2001
From: Arun Raghavan <arun@asymptotic.io>
Date: Mon, 9 Jan 2023 21:17:27 -0500
Subject: [PATCH 2/3] webrtcbin: Fix default value when SDP direction is unspecified
According to RFC 4566 (section 6), if sendrecv/sendonly/recvonly are not
specified, the default is sendrecv, except for broadcast and H332 conference
types.
---
.../gst-plugins-bad/ext/webrtc/webrtcsdp.c | 26 ++++++++++++++-----
@rajneeshksoni
rajneeshksoni / sip-patch-1
Created December 22, 2023 05:39
sip-patch-1
From 4b0e4fb2f02a29193779c6aa2482329311b813c3 Mon Sep 17 00:00:00 2001
From: Arun Raghavan <arun@asymptotic.io>
Date: Mon, 9 Jan 2023 21:16:48 -0500
Subject: [PATCH 1/3] webrtcbin: Accept SDP without a=mid lines
This should be fine for non-bundle media.
---
subprojects/gst-plugins-bad/ext/webrtc/gstwebrtcbin.c | 4 +---
subprojects/gst-plugins-bad/ext/webrtc/webrtcsdp.c | 7 +++----
2 files changed, 4 insertions(+), 7 deletions(-)
@rajneeshksoni
rajneeshksoni / gst-plugins-bad-webrtc
Created December 21, 2023 18:24
gst-plugins-changes-for-sip
diff --git a/ext/webrtc/gstwebrtcbin.c b/ext/webrtc/gstwebrtcbin.c
index 6a8f722..4ca44ab 100644
--- a/ext/webrtc/gstwebrtcbin.c
+++ b/ext/webrtc/gstwebrtcbin.c
@@ -4415,8 +4415,6 @@ _create_answer_task (GstWebRTCBin * webrtc, const GstStructure * options,
}
mid = gst_sdp_media_get_attribute_val (media, "mid");
- /* XXX: not strictly required but a lot of functionality requires a mid */
- g_assert (mid);