0
votes

I'm building a webapp where the user can call a cell phone (GSM) directly.

I use sipjs in the browser, connected through Oversip as a sip proxy. I'm using a sip trunk delivered by a GSM service provider in Norway.

I get no problem during registration. I've tried two different ways of calling (sending an invite).

  1. Send invite without SDP. When using this option, the call goes through. my phone is ringing, and I can answer the call. I get no audio, though. The error I after accepting the call is:

    sip.inviteclientcontext | invalid SDP

    sip.inviteclientcontext | Failed to set remote offer sdp: Called with SDP without DTLS fingerprint.

  2. The other way was sending an invite with SDP. Now I get 'SIP/2.0 513 Message To Big' after sending invite. The call is not going through at all.

Is it possible to manipulate the SDP before sending an invite? I think my service provider only accept audio, but webRTC is also sending a lot of meta data. I have also tried JSSIP and Sipml5, but get the same result.

1

1 Answers

0
votes

The real problem is that the INVITE message sent to the SIP trunk is too large. Seems like oversip doesn't transform it enough to be usable over UDP leaving lot's of WebRTC specific things in the message.

The obvious solution for this is to let oversip to connect to the SIP trunk via TCP. From the SIP RFC:

If a request is within 200 bytes of the path MTU, or if it is larger than 1300 bytes and the path MTU is unknown, the request MUST be sent using an RFC 2914 [43] congestion controlled transport protocol, such as TCP

If TCP is not accepted by your SIP trunk then you should try to tweak the messages sent by oversip or use another WebRTC to SIP gateway which can handle these situations correctly/automatically.