rtp-session

1.4.0 • Public • Published

rtp-session

A simple RTP (Real-time Transport Protocol) session library.

There is a sample in examples/dtmf_detection that creates two RTP endpoints and transmit DTMF tones over it. To test with it start receiver.js with:

  node receiver.js LOCAL_IP LOCAL_PORT REMOTE_IP REMOTE_PORT

and then start sender.js like this:

  node sender.js LOCAL_IP LOCAL_PORT REMOTE_IP REMOTE_PORT DTMF_STRING

Ex:

$ node receiver.js 127.0.0.1 8890 127.0.0.1 8892
got digit 0
got digit 1
got digit 2
got digit 3
got digit 4
got digit 5
got digit 6
got digit 7
got digit 8
got digit 9
got digit A
got digit B
got digit C
got digit D
$ node sender.js 127.0.0.1 8892 127.0.0.1 8890 0123456789ABCD
tone stream finished

Obs: this is a simple example and actually doesn't do any data encoding (we set payload_type=0 in the example code but we are not actually sending u-law packets).

Package Sidebar

Install

npm i rtp-session

Weekly Downloads

1

Version

1.4.0

License

MIT

Unpacked Size

9.56 kB

Total Files

7

Last publish

Collaborators

  • mayama