@babblevoice/babble-drachtio-callmanager 3.6.3 → 3.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/call.js +14 -4
- package/package.json +1 -1
package/lib/call.js
CHANGED
|
@@ -779,7 +779,9 @@ class call {
|
|
|
779
779
|
*/
|
|
780
780
|
get destination() {
|
|
781
781
|
if( undefined !== this.referingtouri ) {
|
|
782
|
-
|
|
782
|
+
const parsed = parseuri( this.referingtouri )
|
|
783
|
+
parsed.user = decodeURIComponent( parsed.user )
|
|
784
|
+
return parsed
|
|
783
785
|
}
|
|
784
786
|
|
|
785
787
|
return this.contact
|
|
@@ -791,10 +793,14 @@ class call {
|
|
|
791
793
|
*/
|
|
792
794
|
get contact() {
|
|
793
795
|
if( "uac" == this.type ) {
|
|
794
|
-
|
|
796
|
+
const parsed = parseuri( this.options.contact )
|
|
797
|
+
parsed.user = decodeURIComponent( parsed.user )
|
|
798
|
+
return parsed
|
|
795
799
|
}
|
|
796
800
|
|
|
797
|
-
|
|
801
|
+
const parsed = parseuri( this._req.msg.uri )
|
|
802
|
+
parsed.user = decodeURIComponent( parsed.user )
|
|
803
|
+
return parsed
|
|
798
804
|
}
|
|
799
805
|
|
|
800
806
|
/*
|
|
@@ -3450,10 +3456,14 @@ class call {
|
|
|
3450
3456
|
if( !options.contact && !options.entity ) return false
|
|
3451
3457
|
|
|
3452
3458
|
/* If we don't have a contact we need to look up the entity */
|
|
3453
|
-
if(
|
|
3459
|
+
if( !options.contact || "string" !== typeof options.contact ) {
|
|
3454
3460
|
return await call.#callcontactfornewuac( options, callbacks )
|
|
3455
3461
|
}
|
|
3456
3462
|
|
|
3463
|
+
/* Ensure user part is uriencoded */
|
|
3464
|
+
const contactparts = options.contact.split( "@" )
|
|
3465
|
+
options.contact = encodeURIComponent( contactparts[ 0 ] ) + "@" + contactparts[ 1 ]
|
|
3466
|
+
|
|
3457
3467
|
const newcall = new call()
|
|
3458
3468
|
newcall.type = "uac"
|
|
3459
3469
|
|