尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證drachtio signaling resource framework
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
Welcome to the Drachtio Signaling Resource framework (drachtio-srf), the Node.js framework for SIP Server applications.
Please visit drachtio.org for getting started instructions, API documentation, sample apps and more!檢視完整 README ↗Welcome to the Drachtio Signaling Resource framework (drachtio-srf), the Node.js framework for SIP Server applications.
Please visit drachtio.org for getting started instructions, API documentation, sample apps and more!
Example proxy
const Srf = require('drachtio-srf');
const srf = new Srf();
srf.connect({
host: '192.168.32.5',
port: 9022,
secret: 'cymru'
});
srf.invite((req, res) => {
srf.proxyRequest(req, ['sip.example1.com', 'sip.example2.com'], {
recordRoute: true,
followRedirects: true,
provisionalTimeout: '2s'
}).then((results) => {
console.log(JSON.stringify(result));
// {finalStatus: 200, finalResponse:{..}, responses: [..]}
});
});
Example Back-to-back user agent
const Srf = require('drachtio-srf');
const srf = new Srf();
srf.connect({
host: '192.168.32.5',
port: 9022,
secret: 'cymru'
});
const Srf = require('drachtio-srf');
const srf = new Srf();
srf.invite((req, res) => {
srf.createB2BUA('sip:[email protected]', req, res, {localSdpB: req.body})
.then(({uas, uac}) => {
console.log('call connected');
// when one side terminates, hang up the other
uas.on('destroy', () => { uac.destroy(); });
uac.on('destroy', () => { uas.destroy(); });
return;
})
.catch((err) => {
console.log(`call failed to connect: ${err}`);
});
});
Example sending a request (OPTIONS ping)
const Srf = require('drachtio-srf');
const srf = new Srf();
srf.connect({host: '127.0.0.1', port: 9022, secret: 'cymru'});
srf.on('connect', (err, hp) => {
if (err) return console.log(`Error connecting: ${err}`);
console.log(`connected to server listening on ${hp}`);
setInterval(optionsPing, 10000);
});
function optionsPing() {
srf.request('sip:tighthead.drachtio.org', {
method: 'OPTIONS',
headers: {
'Subject': 'OPTIONS Ping'
}
}, (err, req) => {
if (err) return console.log(`Error sending OPTIONS: ${err}`);
req.on('response', (res) => {
console.log(`Response to OPTIONS ping: ${res.status}`);
});
});
}