Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allocate_tls_tpfactory allowing creation transport using the same port #104

Open
MayamaTakeshi opened this issue Jun 6, 2024 · 1 comment

Comments

@MayamaTakeshi
Copy link
Owner

This code:

    const t1 = sip.transport.create({address: "127.0.0.1", type: 'tls'})
    const t2 = sip.transport.create({address: "127.0.0.1", type: 'tls'})

    console.log("t1", t1)
    console.log("t2", t2)

resulted in:

t1 { id: 0, address: '127.0.0.1', port: 6060 }
t2 { id: 1, address: '127.0.0.1', port: 6060 }

Need to check if this also happens with tcp.

@MayamaTakeshi
Copy link
Owner Author

I checked tcp and there is no problem. This code:

    t1 = sip.transport.create({address: "127.0.0.1", port: 6060, type: 'tcp'})
    t2 = sip.transport.create({address: "127.0.0.1", port: 6060, type: 'tcp'})

fails as expected:

allocate_tcp_tpfactory ipaddr=127.0.0.1 port=6060
allocate_tcp_tpfactory ipaddr=127.0.0.1 port=6060
status=120098
Error: Unable to start TCP transport
    at Object.create (/home/takeshi/src/git/MayamaTakeshi/sip-lab/index.js:42:38)
    at test (/home/takeshi/src/git/MayamaTakeshi/sip-lab/t:20:24)
    at Object.<anonymous> (/home/takeshi/src/git/MayamaTakeshi/sip-lab/t:405:1)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant