mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 01:49:05 +00:00
FS-8966 - [verto_communicator] Ability to cancel dialing while doing speed test
This commit is contained in:
@@ -109,6 +109,7 @@
|
||||
* Call to the number in the $rootScope.dialpadNumber.
|
||||
*/
|
||||
$scope.loading = false;
|
||||
$scope.cancelled = false;
|
||||
$rootScope.call = function(extension) {
|
||||
if (!storage.data.testSpeedJoin || !$rootScope.dialpadNumber) {
|
||||
return call(extension);
|
||||
@@ -116,10 +117,19 @@
|
||||
$scope.loading = true;
|
||||
|
||||
verto.testSpeed(function() {
|
||||
$scope.loading = false;
|
||||
call(extension);
|
||||
if ($scope.cancelled) {
|
||||
$scope.cancelled = false;
|
||||
$scope.loading = false;
|
||||
return;
|
||||
} else {
|
||||
call(extension);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$rootScope.cancel = function() {
|
||||
$scope.cancelled = true;
|
||||
}
|
||||
}
|
||||
]);
|
||||
|
||||
|
Reference in New Issue
Block a user