From 3eb81fa09fdc709b506a9e7768a027bd06f2b0e4 Mon Sep 17 00:00:00 2001 From: raxelsen Date: Fri, 15 Dec 2017 14:53:52 +0100 Subject: [PATCH] TT#27768 Implement fax infos and collapsible What has been done: - TT#27769, Conversations: Create custom card component - TT#28200, Conversations: Show page count Change-Id: Ia3765a11d415d62f280cbf95a666bfdc9230b0d4 --- README.md | 65 ++++++----- TESTDATA.md | 28 ++++- src/components/CscConversation.vue | 128 ++++++++++----------- src/components/card/CscCardCollapsible.vue | 100 ++++++++++++++++ src/components/card/CscCollapsible.vue | 44 ------- 5 files changed, 218 insertions(+), 147 deletions(-) create mode 100644 src/components/card/CscCardCollapsible.vue delete mode 100644 src/components/card/CscCollapsible.vue diff --git a/README.md b/README.md index 63e3c9a1..ef9427c2 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,11 @@ First make sure you have Node.js and npm installed, and then install and build t 1. Clone the ngcp-csc-ui repo locally 1. Run npm install - ```npm install``` + `npm install` 1. Build the app for dev - ```npm run dev-build``` + `npm run dev-build` ### Vagrant @@ -23,37 +23,37 @@ To run this app you also need to have a [vagrant-ngcp](https://www.sipwise.org/d 1. Go to your local vagrant-ngcp folder, for example - ```cd ~/Sipwise/mr/vagrant-ngcp``` + `cd ~/Sipwise/mr/vagrant-ngcp` 1. Spin up a new vagrant box - ```./v n pro1``` + `./v n pro1` 1. SSH into vagrant box and become root - ``` + ` ./v s pro1 sudo -s - ``` + ` 1. Edit config.yml - ```vim /etc/ngcp-config/config.yml``` + `vim /etc/ngcp-config/config.yml` 1. Enable csc by finding the the "http_csc:" section of the file, and setting "csc_js_enable:" to yes - ```csc_js_enable: yes``` + `csc_js_enable: yes` 1. Run ngcpcfg apply - ```ngcpcfg apply 'Enable http_csc'``` + `ngcpcfg apply 'Enable http_csc'` 1. Navigate into the vagrant shared local folder (configured via custom_config file in local vagrant-ngcp/users.d/ folder) and execute dev.sh script to set up symlink between local built files and vagrant files served via nginx - ``` + ` cd /usr/local/devel/ngcp-csc-ui/ ./dev.sh - ``` + ` You can now access ngcp-csc-ui in browser by using the url provided by the vagrant script. @@ -63,22 +63,22 @@ You need a pbx subscriber to be able to access the pbx config specific modules i 1. SSH into the vagrant box and become root - ``` + ` ./v s pro1 sudo -s - ``` + ` 1. Edit config.yml - ```vim /etc/ngcp-config/config.yml``` + `vim /etc/ngcp-config/config.yml` 1. Enable csc by finding the "pbx:" section of the file, and setting "enable:" to yes - ```enable: yes``` + `enable: yes` 1. Run ngcpcfg apply - ```ngcpcfg apply 'Enable pbx'``` + `ngcpcfg apply 'Enable pbx'` 1. Log in to ngcp-panel with administrator credentials 1. Go to Settings > Customers @@ -92,40 +92,39 @@ You need a pbx subscriber to be able to access the pbx config specific modules i Now you can log in to csc with one of the normal subscriber you just created. URL for login is the same as for accessing ngcp-panel admin, except with csc suffix and no port specified: -```https:///csc``` +`https:///csc` ### How to add new npm package 1. Remove the package if you've already installed it -`npm remove <--save-dev || --save>` + `npm remove <--save-dev || --save>` 1. Ensure that you have a clean node_modules folder - - ``` + ` rm -R node_modules/ npm install - ``` + ` 1. Remove obsolete shrinkwrap file - - ```rm npm-shrinkwrap.json``` - -1. Install new package(s) - - ```npm install packageA packageB --save-dev``` + + `rm npm-shrinkwrap.json` + +1. Install new package(s) + + `npm install packageA packageB --save-dev` 1. Generate new shrinkwrap file including all dependencies - ```npm shrinkwrap --dev``` - + `npm shrinkwrap --dev` + You should see the following result in console: - - ```wrote npm-shrinkwrap.json``` - + + `wrote npm-shrinkwrap.json` + 1. Add new shrinkwrap file to git - ```git add .``` + `git add .` ## Contributing diff --git a/TESTDATA.md b/TESTDATA.md index b7bbd026..44b60fe4 100644 --- a/TESTDATA.md +++ b/TESTDATA.md @@ -1,3 +1,4 @@ + # CONVERSATIONS MODULE IMPORTANT: This document is meant for internal use at Sipwise, as it requires a vagrant-ngcp environment to be able to generate the test data. @@ -24,9 +25,18 @@ cd /usr/local/devel mysql < ./conversations_dump.sql ` +## PBX + +1. Before doing the individual test data creation steps below, make sure pbx is enabled +1. First SSH in to the vagrant box, become root and edit /etc/ngcp-config/config.yml +`vim /etc/ngcp-config/config.yml` +1. Search for the "pbx:" section, and set "enable:" to yes +1. Then do `ngcpcfg apply 'commit msg'` + ## VOICEMAIL -1. Go to Settings > Subscribers > Details > Preferences, and under Call Forwards create a call forward destination under "Call Forward Unconditional" to voicemail +1. Go to Settings > Subscribers > Details > Master Data, and set "Primary Number"/E164 to the desired number (for example 43993007) +1. Go to Settings > Subscribers > Details > Preferences, and under "Call Forwards" create a call forward destination under "Call Forward Unconditional" to voicemail 1. Initiate a call from another subscriber to the subscriber you just set call forward for, and leave a voicemail See [calls section](#calls) for information on how to initiate calls. @@ -45,15 +55,21 @@ See [calls section](#calls) for information on how to initiate calls. For outgoing you need to use the api (also with E 164 number set to sms number from wiki). According to gjungwirth pretty simple with POST request containing the destination number and the content.  ## FAX +1. Install exim package, so we can send the fax via mail. SSH in to vagrant box, become root, and then execute: +`dpkg-reconfigure exim4-config` +1. Follow the install prompt by first choosing 'mail sent by smarthost; no local mail' +1. Then press enter for default sp1 selection, until you get asked for "IP address or host name of the outgoing smarthost:". There you enter mail.sipwise.com and press enter +1. For the rest of the prompts, press enter to choose the defaults 1. Go to Settings > Subscribers, find subscriber you want to use as caller, and click "Details" 1. Under "Master Data" click edit, and enter subscribers number also in the E164 field +1. Then go to "Preferences", and set "Fax2Mail and Sendfax" to active 1. Repeat the two steps above, this time for the callee -1. SSH in to the vagrant box, become root, and create a text file to use for sending fax: -`echo 'test test' > filetosend.txt` -1. Use the ngcp-fax tool to send a fax: -`ngcp-fax --caller 43993003 --callee 43993002 --file filetosend.txt` -1. To troubleshoot you can check log: +1. For the callee, you also need to add your internal sipwise email address as "Destination" under "Fax2Mail and Sendfax", and also under "Call Forwards" configure a "Call Forward Unconditional" to "Fax2Mail" +1. SSH in to the vagrant box, become root, and execute the following command to send a fax from one subscriber to another +`echo "Test Fax!" | ngcp-fax --caller 43993006 --callee 43993007` +1. To troubleshoot you can check logs: `tail -f /var/log/ngcp/faxserver.log` +`tail -f /var/log/ngcp/kamailio-proxy.log` ## CALLS diff --git a/src/components/CscConversation.vue b/src/components/CscConversation.vue index 3b1b83a5..2ca4f100 100644 --- a/src/components/CscConversation.vue +++ b/src/components/CscConversation.vue @@ -1,22 +1,40 @@ diff --git a/src/components/card/CscCardCollapsible.vue b/src/components/card/CscCardCollapsible.vue new file mode 100644 index 00000000..95b9fe38 --- /dev/null +++ b/src/components/card/CscCardCollapsible.vue @@ -0,0 +1,100 @@ + + + + + diff --git a/src/components/card/CscCollapsible.vue b/src/components/card/CscCollapsible.vue deleted file mode 100644 index 81c2a1ed..00000000 --- a/src/components/card/CscCollapsible.vue +++ /dev/null @@ -1,44 +0,0 @@ - - - - -