How to call and send audioFile by sip and nodejs?

355 views
Skip to first unread message

Иван Вольнов

unread,
Apr 28, 2021, 8:18:49 AM4/28/21
to JsSIP

Hi my SIP operator does not support WebSockets and WebRTC. And all the data that have given me this:

username: +790434344334
pass: dsfsfdsff
two ports: 5060, 8080
Transport: UDP, TCP

is there any nodejs library in the world that is capable of doing this simple thing:

nodejs index.js:
```js
import SipClient from 'supet-node-sip-library-without-websockers'

const client = new SipClient({
  domain: "sbc.megafon.ru",
  username: "+790434344334",
  pass: "dsfsfdsff"
})

client.on("ready", ( )=> {

  const callSession = client.call("911")

  callSession.inputAudioStream // mp3 stream
  callSession.outputAudioStream // mp3 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")

})
```


Really no one in the entire history of mankind wrote such basic things? I understand sip legacy protocol and all that. But how do you do basic things like this with node.js?

Iñaki Baz Castillo

unread,
Apr 28, 2021, 8:20:40 AM4/28/21
to jssip
> Really no one in the entire history of mankind wrote such basic things?

You can be the first one.
> --
> You received this message because you are subscribed to the Google Groups "JsSIP" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to jssip+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jssip/47b08ccf-6873-49ef-b114-1347f62024a9n%40googlegroups.com.



--
Iñaki Baz Castillo
<i...@aliax.net>
Message has been deleted
Message has been deleted
Message has been deleted

lee lwando

unread,
Apr 28, 2021, 12:35:20 PM4/28/21
to js...@googlegroups.com
I am trying to implement the same. 

Anyone with an idea on how this can be implemented ? 

Reply all
Reply to author
Forward
0 new messages