voice-client: adapt to ubus object change
authorSukru Senli <sukru.senli@inteno.se>
Sun, 25 Feb 2018 10:40:02 +0000 (11:40 +0100)
committerSukru Senli <sukru.senli@inteno.se>
Sun, 25 Feb 2018 10:40:02 +0000 (11:40 +0100)
plugins/juci-inteno-voice-client/access.json
plugins/juci-inteno-voice-client/src/pages/status-phone.js
plugins/juci-inteno-voice-client/src/pages/voice-call-log.js
plugins/juci-inteno-voice-client/src/widgets/overview.voice.js
plugins/juci-inteno-voice-client/src/widgets/sip-service-provider.js

index ff51029..13f4b4e 100644 (file)
@@ -3,11 +3,9 @@
                "description": "JUCI asterisk module",
                "read": {
                        "ubus": {
-                               "asterisk": [
-                                       "status"
-                               ], 
-                               "asterisk.call_log": [
-                                       "list"
+                               "voice.asterisk": [
+                                       "status",
+                                       "call_log"
                                ],
                                "juci.system": [
                                        "reboot"
index 296586f..4c7889a 100644 (file)
@@ -7,7 +7,7 @@ JUCI.app
                $uci.$sync("voice_client").done(function(){
                        var sipProviders = $uci.voice_client["@sip_service_provider"];
                        var brcmLines = $uci.voice_client["@brcm_line"];
-                       $rpc.$call("asterisk", "status").done(function(data){
+                       $rpc.$call("voice.asterisk", "status").done(function(data){
                                if(data && data.sip){
                                        var accounts = [];
                                        var lines = [];
index 45fd65a..3cd2f2a 100644 (file)
@@ -7,7 +7,7 @@ JUCI.app
        $scope.phoneList = [];
        $scope.call_log = [];
        JUCI.interval.repeat("call_log", 5000, function(done){
-               $rpc.$call("asterisk.call_log", "list").done(function(res){
+               $rpc.$call("voice.asterisk", "call_log").done(function(res){
                        var unique_phones = {};
                        $scope.call_log = res.call_log.map(function(log){
                                var parts = log.time.split(" ");
index 6ff34d7..10d475c 100644 (file)
@@ -32,7 +32,7 @@ JUCI.app
                                }).always(function(){ next(); });
                        },
                        function(next){
-                               $rpc.$call("asterisk", "status").done(function(data){
+                               $rpc.$call("voice.asterisk", "status").done(function(data){
                                        $scope.online = false;
                                        $scope.sipAccounts.map(function(acc){
                                                if(data.sip && data.sip[acc[".name"]]){
index 4dfa9d0..84e59cc 100644 (file)
@@ -15,7 +15,7 @@ JUCI.app
                $scope.$apply();
        });
        JUCI.interval.repeat("voice.sip-service-provicers", 5000, function(done){
-               $rpc.$call("asterisk", "status").done(function(data){
+               $rpc.$call("voice.asterisk", "status").done(function(data){
                        $scope.sipAccStatus = data.sip;
                        updateStatus();
                        $scope.$apply();