2 ms·
I remember SIP as being very HTTP-like. Looking at https://tools.ietf.org/html/rfc3261#section-4 https://tools.ietf.org/html/rfc3261#section-4 this seems to be
by Zash 10y ago
I remember SIP as being very HTTP-like.
Looking at https://tools.ietf.org/html/rfc3261#section-4 https://tools.ietf.org/html/rfc3261#section-4 this seems to be accurate.
> SIP is based on an HTTP-like request/response transaction model.
The protocol wire format is basically identical to HTTP with verbs, headers, status codes etc. Different set of verb etc however.
- Arathorn 10y agoSuperficially it's HTTP-like, but just enough to give you a false sense of familiarity. (For context, we spent ~10 years writing commercial SIP stuff before ditching it all in favour of Matrix). You can just about reuse the request/response header & mime parsing stuff (most of which is as much SMTP as HTTP), but the actual stack is completely different - supporting transports on unreliable transports like UDP via three-way handshakes (INVITE -> 200 OK -> ACK), both client->server and server->transactions, different kinds of transactions, registration methods, multiple responses, and all manner of voodoo when it gets to handling all the various types of routing headers. There are two entirely separate abstractions of the stack (ignoring the parsing layer) - the transaction layer (handling those INVITE->200->ACK things that look a bit like HTTP requests but aren't), and then the dialog engine on top that actually the lifecycle of a session (e.g. a phone call). Random anecdote: a few years a large European telco launched a chat/comms service based on RCS (a GSMA set of standards built on SIP, IMS, MSRP etc). We sniffed the wire to see what happened if you sent the three letters "Hi!" from one client to another. Suffice it to say that it involved 85 round trips and and 54 kilobytes of data (all of which was plaintext, comically) - and this ignored the initial SIP registration. In order to send that message it set up about 3 different sessions (one to send the message as SIP MESSAGE, another to do it again by MSRP (including all the MSRP handshakes) in order to include a typing notification, another to receive the read receipt, etc). This is why the world needs standards like XMPP and Matrix as a more internetty and less telcoy alternative ;)