[英]How to call so SIP from nodejs?
I've tried about 20 libraries, but none of them can do the basic thing "make a call".我已经尝试了大约 20 个库,但没有一个可以做基本的事情“打电话”。
Hi my SIP operator does not support WebSockets and WebRTC.您好,我的 SIP 运营商不支持 WebSockets 和 WebRTC。 And all the data that have given me this:
所有给我的数据:
username: +790434344334 pass: dsfsfdsff domain: sbc.megafon.ru two ports: 5060, 8080 Transport: UDP, TCP用户名:+790434344334 传递:dsfsfdsff 域:sbc.megafon.ru 两个端口:5060、8080 传输:UDP、TCP
is there any nodejs library in the world that is capable of doing this simple thing:世界上是否有任何 nodejs 库能够做这个简单的事情:
nodejs index.js: nodejs index.js:
import SipClient from 'super-node-sip-library-without-websockers'
const client = new SipClient({
domain: "sbc.megafon.ru",
username: "+790434344334",
pass: "dsfsfdsff"
})
const callSession = client.call("911")
callSession.inputAudioStream // audio stream
callSession.outputAudioStream // audio stream
// play sound
const localMp3FileStream = require('./localAudioFileStream.js')
localMp3FileStream.pipe(callSession.outputAudioStream) // connect local audio file to output stream
// send sms
callSession.sms("Sms text")
In other words, i just need to receive a nodeReadableStream from the SIP network with the sound of the voice that the person speaks to the phone, as well as send a nodeWritableStream to the SIP network with the sounds that I want换句话说,我只需要从 SIP 网络接收一个 nodeReadableStream 以及该人对电话说话的声音,以及将 nodeWritableStream 发送到 SIP 网络以及我想要的声音
Is it really impossible to make SIP calls with node js?用node js打SIP真的不可能吗?
username: +790434344334 pass: dsfsfdsff domain: sbc.megafon.ru two ports: 5060, 8080 Transport: UDP, TCP
用户名:+790434344334 传递:dsfsfdsff 域:sbc.megafon.ru 两个端口:5060、8080 传输:UDP、TCP
With this registration information, you can use a sip phone;有了这个注册信息,你就可以使用sip phone; among all possibilities you try linphone and make incoming/outgoing basic calls from/to your smartphone or any other.
在所有可能性中,您尝试使用 linphone 并从/向您的智能手机或任何其他设备拨打/拨打基本电话。
is there any nodejs library in the world that is capable of doing this simple thing: ... Is it really impossible to make SIP calls with node js?
世界上是否有任何 nodejs 库能够做这个简单的事情:......真的不可能用 node js 进行 SIP 调用吗?
It is not so simple, a full stack SIP with node JS is a big thing, I do not think that it is available.没那么简单,带节点 JS 的全栈 SIP 是件大事,我不认为它可用。 However a practical approach is to do a kind of proxying , you may try to find a proxy sip, on github the first one is
然而一个实用的方法是做一种代理,你可以尝试找到一个代理 sip,在 github 第一个是
https://github.com/drachtio/drachtio-rtpengine-webrtcproxy.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.