From 37fe9f4edca34ffaaa1a421d5c7dcb7d1f4a7446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Luis=20Mill=C3=A1n?= Date: Fri, 1 Feb 2013 11:01:36 +0100 Subject: [PATCH] Fix #54. Allow configuration.uri username start with 'sip' --- src/UA.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/UA.js b/src/UA.js index 7d48a0426..73ddceb85 100644 --- a/src/UA.js +++ b/src/UA.js @@ -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; @@ -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;