Skip to content

Commit

Permalink
Fix #54. Allow configuration.uri username start with 'sip'
Browse files Browse the repository at this point in the history
  • Loading branch information
jmillan committed Feb 1, 2013
1 parent 6f4b067 commit 37fe9f4
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/UA.js
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,8 @@ JsSIP.UA.prototype.loadConfig = function(configuration) {
//for this instance.
settings.jssip_id = Math.random().toString(36).substr(2, 5);

uri = JsSIP.grammar.parse(settings.uri, 'lazy_uri');
uri = JsSIP.Utils.createURI(settings.uri);
settings.from_uri = uri.toAor();

settings.user = uri.user;
settings.domain = uri.host;
Expand All @@ -718,9 +719,6 @@ JsSIP.UA.prototype.loadConfig = function(configuration) {
settings.authorization_user = settings.user;
}

// Create the From uri
settings.from_uri = (uri.scheme ? '':'sip:') + settings.uri;

// User no_answer_timeout
settings.no_answer_timeout = settings.no_answer_timeout * 1000;

Expand Down

0 comments on commit 37fe9f4

Please sign in to comment.