versatica/JsSIP — pull request #199 by shimaore (2014-02-19 10:32:55+00:00)
Title: Properly handle unknwon media-types in INFO

Send a 415 Unsupported Media Type response if an INFO message contains an unknown media-type.

I noticed this during interop with FreeSwitch. FreeSwitch sends an INFO message:

INFO sip:trnrph3g@8ovnkn8jm6fs.invalid;transport=ws;ob SIP/2.0
Via: SIP/2.0/WS 127.0.0.1:8060;branch=z9hG4bKe5S382rp2N4ta
Max-Forwards: 70
From: ;tag=jFvKFSK4pHQ2F
To: ;tag=rk0p55l0lt
Call-ID: 9tkif8fahbk1guksim84
CSeq: 56066404 INFO
Contact:
User-Agent: websocket server
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, NOTIFY
Supported: timer, precondition, path, replaces
Content-Type: application/media_control+xml
Content-Length: 175

but the code in JsSIP is not set to reply to it -- FreeSwitch keeps sending the INFO message.

I'm not sure what the interaction with WebRTC should be -- a 415 response with `Accept: application/dtmf-relay` looks like the appropriate way to handle this for now.