Git Product home page Git Product logo

Comments (12)

jmillan avatar jmillan commented on June 26, 2024

@iwanbk, you can specifiy the full ws uri in the demo web. No need to modify the code for that.

Please, specify the full string of the ws uri within the demo web: ws://my.domain.com:4062

from jssip.

iwanbk avatar iwanbk commented on June 26, 2024

@jmillan
Hi, i modify the code because i thought it failed because jssip automatically convert ws://my.domain.com:4062 to ws://my.domain.com:4062/ (add a trailing slash).
And just realized that it still works with kamailio even with trailing slash.

Btw, have you tested jssip with webrtc2sip?

from jssip.

ibc avatar ibc commented on June 26, 2024

@iwanbk The URI ws://my.domain.com:4062/ is 100% valid, so if webrtc2sip fails to parse it there is a bug in webrtc2sip, not in JsSIP ;)

from jssip.

ibc avatar ibc commented on June 26, 2024

Closing the issue since it's not a bug in JsSIP but in a 3rd party server.

from jssip.

iwanbk avatar iwanbk commented on June 26, 2024

@ibc
Sorry if i was not clear.
Even with ws://my.domain.com:4062 (without trailing slash), it is not work.
You can see again my javascript console message, there is no trailing slash.

from jssip.

iwanbk avatar iwanbk commented on June 26, 2024

This is error message from webrtc2sip
WARNING | 20121017-110236.991 | repro | RESIP:TRANSPORT | 140109811562240 | ConnectionBase.cxx:320 | Malformed Content-Length in connection-based transport. Not much we can do to fix this. SipMessage::Exception Missing header Content-Length @ SipMessage.cxx:1371
WARNING | 20121017-110238.024 | repro | RESIP:TRANSPORT | 140109811562240 | ConnectionBase.cxx:320 | Malformed Content-Length in connection-based transport. Not much we can do to fix this. SipMessage::Exception Missing header Content-Length @ SipMessage.cxx:1371

from jssip.

ibc avatar ibc commented on June 26, 2024

JsSIP does not add a Content-Length header since it's not mandatory (WebSocket it's a message boundary transport). See http://tools.ietf.org/html/draft-ietf-sipcore-sip-websocket-04#section-5.1

5.1.  General

Each SIP message MUST be carried within a single WebSocket message,
and a WebSocket message MUST NOT contain more than one SIP message.
Because the WebSocket transport preserves message boundaries, the use
of the Content-Length header in SIP messages is optional when they
are transported using the WebSocket sub-protocol.

So it's a bug in webrtc2sip server.

from jssip.

jmillan avatar jmillan commented on June 26, 2024

Yeah,

As per section 5.1 in http://tools.ietf.org/html/draft-ietf-sipcore-sip-websocket-04, the Content-Length header in a SIP message is optional when using WebSocket as transport. It is hence a bug in webrtc2sip, which should respect a SIP message without such a header.

from jssip.

ibc avatar ibc commented on June 26, 2024

I've reported the bug in webrtc2sip server: http://code.google.com/p/webrtc2sip/issues/detail?id=5

Please follow it ;)

from jssip.

saghul avatar saghul commented on June 26, 2024

@jmillan Even if it's optional, does it hurt to send it? If it helps I'd be all for it.

from jssip.

ibc avatar ibc commented on June 26, 2024

JsSIP master now adds always a Content-Lenght header (regardless it's not mandatory). Let's make happy buggy servers from 3rd parties.

from jssip.

saghul avatar saghul commented on June 26, 2024

🍰

from jssip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.