sip-media-negotiation
БесплатноБез исполняемых скриптовНе проверенUse when handling SDP offer/answer, codec negotiation, media capabilities, and RTP session setup in SIP applications.
от TheBushidoCollective★ 202 звезды на GitHubОб этом скилле
SIP Media Negotiation
Master Session Description Protocol (SDP) offer/answer model, codec negotiation, and media session establishment for building robust VoIP applications with optimal media handling.
Understanding SDP and Media Negotiation
SDP (RFC 4566) is used in SIP to describe multimedia sessions. The SDP offer/answer model (RFC 3264) enables endpoints to negotiate media capabilities, codecs, and transport parameters.
SDP Structure and Syntax
Basic SDP Message
v=0
o=alice 2890844526 2890844527 IN IP4 atlanta.example.com
s=VoIP Call
c=IN IP4 192.0.2.1
t=0 0
m=audio 49170 RTP/AVP 0 8 97
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:97 iLBC/8000
a=ptime:20
a=maxptime:150
a=sendrecv
SDP Line Meanings
v= Protocol version (always 0)
o= Origin (username, session-id, session-version, network-type, address-type, address)
s= Session name
c= Connection information
t= Timing (start-time stop-time, 0 0 means permanent)
m= Media description (media, port, protocol, formats)
a= Attribute (codec mappings, parameters, direction)
SDP Parser Implementation
Complete SDP Parser
interface SdpOrigin {
username: string;
sessionId: string;
sessionVersion: string;
netType: string;
addrType: string;
address: string;
}
interface SdpConnection {
netType: string;
addrType: string;
address: string;
ttl?: number;
addressCount?: number;
}
interface SdpMedia {
media: string;
port: number;
portCount?: number;
protocol: string;
formats: string[];
attributes: Map<string, string[]>;
connection?: SdpConnection;
bandwidth?: Map<string, number>;
}
interface SdpSession {
version: number;
origin: SdpOrigin;
sessionName: string;
sessionInfo?: string;
uri?: string;
email?: string;
phone?: string;
connection?: SdpConnection;
bandwidth?: Map<string, number>;
timing: { start: number; stop: number }[];
attributes: Map<string, string[]>;
media: SdpMedia[];
}
class SdpParser {
static parse(sdp: string): SdpSession {
const lines = sdp.trim().split(/\r?\n/);
const session: Partial<SdpSession> = {
attributes: new Map(),
timing: [],
media: []
};
let currentMedia: SdpMedia | null = null;
for (const line of lines) {
const type = line.charAt(0);
const value = line.substring(2);
switch (type) {
case 'v':
session.version = parseInt(value);
break;
case 'o':
session.origin = this.parseOrigin(value);
break;
case 's':
session.sessionName = value;
break;
case 'i':
if (currentMedia) {
currentMedia.attributes.set('title', [value]);
} else {
session.sessionInfo = value;
}
break;
case 'u':
session.uri = value;
break;
case 'e':
session.email = value;
break;
case 'p':
session.phone = value;
break;
case 'c':
const connection = this.parseConnection(value);
if (currentMedia) {
currentMedia.connection = connection;
} else {
session.connection = connection;
}
break;
case 'b':
const [bwType, bandwidth] = value.split(':');
const bwValue = parseInt(bandwidth);
if (currentMedia) {
if (!currentMedia.bandwidth) {
currentMedia.bandwidth = new Map();
}
currentMedia.bandwidth.set(bwType, bwValue);
} else {
if (!session.bandwidth) {
session.bandwidth = new Map();
}
session.bandwidth.set(bwType, bwValue);
}
break;
case 't':
const [start, stop] = value.split(' ').map(Number);
session.timing!.push({ start, stop });
break;
case 'm':
if (currentMedia) {
session.media!.push(currentMedia);
}
currentMedia = this.parseMedia(value);
break;
case 'a':
const [attrName, attrValue] = this.parseAttribute(value);
if (currentMedia) {
if (!currentMedia.attributes.has(attrName)) {
currentMedia.attributes.set(attrName, []);
}
currentMedia.attributes.get(attrName)!.push(attrValue || '');
} else {
if (!session.attributes!.has(attrName)) {
session.attributes!.set(attrName, []);
}
session.attributes!.get(attrName)!.push(attrValue || '');
}
break;
}
}
if (currentMedia) {
session.media!.push(currentMedia);
}
return session as SdpSession;
}
private static parseOrigin(value: string): SdpOrigin {
const parts = value.split(' ');
return {
username: parts[0],
sessionId: parts[1],
sessionVersion: parts[2],
netTyp
Установить sip-media-negotiation в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadFAQ
Что делает скилл sip-media-negotiation?
Use when handling SDP offer/answer, codec negotiation, media capabilities, and RTP session setup in SIP applications.
Как установить скилл sip-media-negotiation?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл sip-media-negotiation запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic