Giter Site home page Giter Site logo

mahirgul / issabelwebphone Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 1.0 589 KB

Issabel 4, Call Center Module and SipML5 Integration Asterisk 11-13-16-18

License: GNU General Public License v3.0

JavaScript 51.76% Hack 7.49% PHP 40.74%
callcenter issabel sipml5 webphone asterisk asterisk-pbx asterisk-server asterisk11 queue asterisk16

issabelwebphone's Introduction

Issabel 4, Call Center Module and SipML5 Integration

(Note:$onlyCallback=1; Module working with only callback mode agents)

Thanks:

https://github.com/DoubangoTelecom/sipml5

https://www.issabel.org/

Firstly you have install Issabel 4 with Asterisk 11-13-16-18 and Call Center module.

After, you need to update with this command.

yum update

We will need a domain name and we should make a secure certificate with letsencrypt.

Copy the cert.pem and privkey.pem files created with letsencrypt to the etc/asterisk/keys folder.

cp /etc/letsencrypt/live/yourdomain.com/cert.pem /etc/asterisk/keys
cp /etc/letsencrypt/live/yourdomain.com/privkey.pem /etc/asterisk/keys

cd /etc/asterisk/keys

chown asterisk:asterisk cert.pem
chown asterisk:asterisk privkey.pem

Let's set the Asterisk settings.

image

image

Download webphone folder and copy /var/www/html/ inside.

We need to make some changes in the /var/www/html/index.php file.

Edit index.php and find this on estimated 340th line

themeSetup($smarty, $selectedMenu, $pdbACL, $pACL, $idUser);

Add the following lines after this line.

if(strpos($_SERVER[REQUEST_URI], 'agent_console') == true || strpos($_SERVER[REQUEST_URI], 'myex_config') == true)
{
  $webPhoneExtension = $pACL->getUserExtension($_SESSION['issabel_user']);
  $dsn1 = generarDSNSistema('asteriskuser', 'asterisk');
  $pdbACL1 = new paloDB($dsn1);
  $webphonePassword = $pdbACL1->fetchTable("SELECT data from sip WHERE id = '$webPhoneExtension' AND keyword = 'secret'; ")[0];
			
  if($webPhoneExtension>0)
  {
    echo '<script type="text/javascript">';
    echo "localStorage.setItem('mhrgl.com.identity.display_name', $webPhoneExtension);";
    echo "localStorage.setItem('mhrgl.com.identity.impi', $webPhoneExtension);";
    echo "localStorage.setItem('mhrgl.com.identity.impu', 'sip:'+ $webPhoneExtension+'@'+ window.location.hostname);";
    echo "localStorage.setItem('mhrgl.com.identity.password', $webphonePassword[0]);";
    echo "localStorage.setItem('mhrgl.com.identity.realm', window.location.hostname);";
    echo "localStorage.setItem('mhrgl.com.expert.disable_video', 'true');";
    echo "localStorage.setItem('mhrgl.com.expert.disable_callbtn_options', 'true');";
    echo "localStorage.setItem('mhrgl.com.expert.websocket_server_url', 'wss://' + window.location.hostname + ':8089/ws');";
    //echo "localStorage.setItem('mhrgl.com.expert.ice_servers', '[]');";
    echo "localStorage.setItem('mhrgl.com.expert.ice_servers', '[{ url: \'stun:stun.a.google.com:19302\'}]');";
    echo "</script>";
    include("webphone/webphone.php");
  }
}

After adding it should look something like this. image

Add Webrtc Extension

image

image

Assing extension for user

image

Finally edit /var/www/html/modules/agent_console/index.php file.

Find $onlyCallback=0; on line 52 and change like this $onlyCallback=1; image

That's all we're going to do. When we enter agent_console and myex_config pages, the softphone becomes active.

image

issabelwebphone's People

Contributors

mahirgul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

intiaz

issabelwebphone's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.