Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing UA's options on SIP.WebRTC.Simple #513

Closed
diegoteixeir4 opened this issue Feb 12, 2018 · 5 comments
Closed

Missing UA's options on SIP.WebRTC.Simple #513

diegoteixeir4 opened this issue Feb 12, 2018 · 5 comments

Comments

@diegoteixeir4
Copy link

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?

this.ua = new SIP.UA({
// User Configurable Options
wsServers: this.options.ua.wsServers,
uri: this.options.ua.uri,
authorizationUser: this.options.ua.authorizationUser,
password: this.options.ua.password,
displayName: this.options.ua.displayName,
// Undocumented "Advanced" Options
traceSip: this.options.ua.traceSip,
userAgentString: this.options.ua.userAgentString,
// Fixed Options
register: true,
sessionDescriptionHandlerFactoryOptions: sessionDescriptionHandlerFactoryOptions,
});

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);
@egreenmachine
Copy link
Collaborator

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.

@diegoteixeir4
Copy link
Author

@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

@egreenmachine egreenmachine self-assigned this Apr 17, 2018
@Hativ
Copy link

Hativ commented Apr 27, 2018

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

@egreenmachine
Copy link
Collaborator

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.

@bigbn
Copy link

bigbn commented Jan 20, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants