Sip.js: Missing UA's options on SIP.WebRTC.Simple

Created on 12 Feb 2018  ·  5Comments  ·  Source: onsip/SIP.js

The server configuration guide for Asterisk sugests adding two parameters to UA's configuration:

hackIpInContact: true and
hackWssInTransport: true if using WSS.

And it works with SIP.UA but has no effect on SIP.WebRTC.Simple UA's configuration.

Can this options be added to SIP.WebRTC.Simple?

https://github.com/onsip/SIP.js/blob/3fbdab582d2cd138156768339ea4b4e0714393b1/src/WebRTC/Simple.js#L76-L89

Or if has no side effects, can all the SIP.UA configuration be made editable through the ua option in SIP.WebRTC.Simple?

var uaFixedOptions = {
  register: true,
  sessionDescriptionHandlerFactoryOptions: sessionDescriptionHandlerFactoryOptions,
};

var uaOptions = Object.assign({}, uaFixedOptions, this.options.ua);

this.ua = new SIP.UA(uaOptions);
Simple interop wontfix

Most helpful comment

I have updated our Asterisk Guide and these options are no longer needed to work with recent versions of Asterisk. I am going to close this as we do not wish to add these options to the Simple layer.

All 5 comments

I will add some sort of Asterisk config option to Simple. The idea behind Simple is that it should be used to get started and that if you need to do advanced configuration you move to the full SIP.js API. So I am somewhat against just exposing a full blown UA configuration.

@seanbright I'm testing with Asterisk 13.19.0. I've tried without this options and all incoming calls fail with this error:

ERROR[10695][C-000000f1]: chan_sip.c:4267 __sip_reliable_xmit: Serious Network Trouble; __sip_xmit returns error for pkt data

Unless i set hackWssInTransport: true

I use Simple with Asterisk 15.2.1 and it works without hackWssInTransport or hackIpInContact.

I have updated our Asterisk Guide and these options are no longer needed to work with recent versions of Asterisk. I am going to close this as we do not wish to add these options to the Simple layer.

Got the same issue with Asterisk 16 and 0.14 version of sipjs. No reasons and solutions over the whole internet found. So one way for me to make a fork and modify UA.js with this option manualy to continue use Simple.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Juli0GT picture Juli0GT  ·  5Comments

raphaelhovsepyan picture raphaelhovsepyan  ·  6Comments

josephfrazier picture josephfrazier  ·  26Comments

slavikbialik picture slavikbialik  ·  7Comments

DenisButCheR picture DenisButCheR  ·  7Comments