Tuesday, July 5, 2016

Cài đặt Elastix 4.0

Link

Reset Elastix Web Interface Admin Password

This requires that you can log into the server at the console, or via SSH. If you dont have the login details to log into the console, or ssh in, you will need to reset the root password.

After logged in, to reset the admin account password for the Elastix web interface using below command:

elastix-admin-passwords --change

Then input new mysql password and new admin elastix password

DONE

Tham khảo:




Saturday, July 2, 2016

How to config webrtc with elastix 4.0



First let's define a few concepts to start, as a starting point we WebRTC which is a protocol originally created by Google which using standards like HTML5 and JavaScript can provide the web capabilities of VoIP communication among many other things , Moreover SIP is a signaling protocol that enables communication between users using a server and / or SIP client.
So that both communication systems while it is true are different, they have the same goal which is "communication" because it has built software that can integrate both, so that can be programmed pages that use WebRTC and communicate with SIP servers or SIP platforms supporting such as Asterisk
.
In the case of Elastix 4 features support for WebRTC because it uses Asterisk version 11, which implements the res_http_websocket module that has been created by Digium to allow developers to interact and communicate with WebRTC, also in this version have been added protocols signaling as ICE, STUN, TURN, SRTP because they are requirement WebRTC

While setting up a WebPhone would be just one of many applications that we could build, we will set up a basic using SIPml5 which is a SIP based client written in HTML5 and javascript recently released.
Considerations before starting
Before starting the configuration you need to run the update of the platform since upgrading can enable support for the transport protocol WSS necessary for WebRTC.
.
yum -y update
1.- Set the name of the machine
Set the name of the machine as "elx4" with the domain "mycompany.com" as follows..
vim /etc/hosts
Enter the end of file
192.168.10.48 elx4.mycompany.com elx4

Where is the IP address of the virtual machine and "elx4" is the name of the machine installed then test the configuration

hostname -f

The result MUST be: elx4.mycompany.com
2.- Create certificates for SRTP
Create Folder certificates
mkdir /etc/asterisk/keys
Create server certificates. During the process you prompted to enter a password..
/usr/share/doc/asterisk-11.21.0/contrib/scripts/ast_tls_cert -C pbx.mycompany.com -O “My Super Company” -d /etc/asterisk/keys
Create client certificates, you need to enter the same key used in the previous step.
/usr/share/doc/asterisk-11.21.0/contrib/scripts/ast_tls_cert -m client -c /etc/asterisk/keys/ca.crt -k /etc/asterisk/keys/ca.key -C phone1.mycompany.com -O “My Super Company” -d /etc/asterisk/keys -o malcolm

Configure permissions
chown -R asterisk.asterisk /etc/asterisk/keys
Configure SRTP support level Asterisk
vim /etc/asterisk/sip_general_custom.conf
Add at the end of the file.
tlsenable=yes
tlsbindaddr=0.0.0.0
tlscertfile=/etc/asterisk/keys/asterisk.pem
tlscafile=/etc/asterisk/keys/ca.crt
tlscipher=ALL
tlsclientmethod=tlsv1
3.- Configure Asterisk embedded HTTP server
Create certificates
openssl req -new -x509 -days 365 -nodes -out /etc/asterisk/keys/foo.pem -keyout /etc/asterisk/keys/foo.pem
During the process requests the following sample data.
Country Name (2 letter code) [XX]:PE
State or Province Name (full name) []:LIMA
Locality Name (eg, city) [Default City]:LIMA
Organization Name (eg, company) [Default Company Ltd]:SILCOM
Organizational Unit Name (eg, section) []:TI
Common Name (eg, your name or your server’s hostname) []:elx4
Email Address []:
Then to configure the service is necessary to enter from the web interface Security / Advanced Settings and enable the use of Freepbx as follows:
Then enter: https://192.168.10.48/admin/ and enter the "Settings / Advanced Settings" and change the settings in the "Asterisk Builtin mini-HTTP server" section as shown below:
Parameter
Value
Certificate file
/etc/asterisk/keys/foo.pem
Enabled HTTPS support for the mini-HTTP Server
True
HTTP Blind Address
0.0.0.0
HTTPS Bind Address/Port
0.0.0.0:8089
Private key file
/etc/asterisk/keys/foo.pem
The "http_additional.conf" file must reflect the following settings:
vim /etc/asterisk/http_additional.conf

[general]
enabled=yes
enablestatic=no
bindaddr=0.0.0.0
bindport=8088
prefix=asterisk
tlsenable=yes
tlsbindaddr=0.0.0.0:8089
tlscertfile=/etc/asterisk/keys/foo.pem
tlsprivatekey=/etc/asterisk/keys/foo.pem
4.- Create extensions with support for WebRTC
Enter PBX -> PBX Configuration -> Extensions then create 02 extensions as follows:
Go to the bottom of the form and click the "submit" button then edit the extension created and set the following parameters.
Parameter
Value
Transport
All – WS Primary
avpf
Yes
icesupport
Yes
dtlsenable
Yes
dtlsverify
No
dtlssetup
Incoming and Outgoing
dtlscertfile
/etc/asterisk/keys/foo.pem
dtlsprivatekey
/etc/asterisk/keys/foo.pem
encryption
Yes (SRTP only)
5.- Install Webphone for WebRTC
Download from the Web Phone:
Then upload it to the / var / www / html / and set as follows:
cd /var/www/html
yum -y install unzip
unzip sipml5-master.zip
mv sipml5-master phone
6.- Configure the Webphone for WebRTC
As a first step it is necessary to enter:

Then accept the certificate as follows:

Then enter the customer WebRTC: http://192.168.10.48/phone/call.htm and show us the WebPhone
Next you need to enter the button "Expert Mode" as shown below:
 


Then set the preferences as shown below:
 
The WebSocket server must be: wss: //192.168.10.48: 8889 / asterisk / ws
Now registration set as follows Wephone
:
We will see that the WebPhone be recorded and from the Asterisk CLI will see the record as follows:
6.- Test calls from the Web Phone
We will try to validate call to voicemail (* 98), when dialing voicemail browser request permission to activate the micro and establish the call, as shown below.
Finally create a "normal" extension / annex and test calls to and from the WebPhone as shown below..


Liên hệ : http://tongdai1900.vn
 

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Powerade Coupons