farouk-mezghich  
 
  Asterisk-TrixBox 29/03/2024 14 02 03 (UTC)
   
 

This page is written in french (up) and english (bottom)
Cette page est écrite en français (en haut) et en anglais (en bas)
Pour une information ou aide, trouvez le formulaire de contact sur ce site
For information or help, find the form of contact in this site.


Déploiement sur une seule machine d’un server IPBX SIP (IPBX : Astérisk par Trixbox)

Ce projet est dans le cadre de mon activité dans la junior entreprise 2010 de l'ENSI (Ecole Nationale des Sciences de l'Informatique - Tunisie). Le projet consiste à implémenter un Serveur générique qui rend les IPBX (Astreisk, Cisco Call Manager, OTUC, Genesys ...). C'est une sorte d'abstraction pour que ce produit a la même interface pour tous les IPBX possibles. Alors cette partie présente une sous partie du projet, celle de l'Asterisk, alors nous commençons par l'utiliser sur nos machines d'abord.


Asterisk
   


Pour le faire, il faut installer le TrixBox sur une machine virtuelle. Puis configurer l'Asterisk à partir de TrixBox. Pour ce tutoriel, je vais utiliser : Système d'exploitation : Ubuntu (10.04 LTS) ou Windows (Vista)
Système Software PBX : TrixBox (2.8.0.4)
Machine Virtuelle : VMare (7.01)
VoIP Soft Phone : Twinkle (pour  Ubuntu) ou X-Lite (pour Windows)

Il est à noter que tous ces logiciels sont freeware (sauf la merde Vista de microsoft).

1- Installe VMware
Télecharge VMware Workstation (il te suffit de télécharger VMware player) (32bits et selon votre système d'exploitation) du site www.vmware.org. Fais l'enregistrement si nécessaire, ça ne fait rien. Mieux de télécharger la version ".tar", ".tar.gz" ou ".zip". Si tu es sous Ubuntu, log in en tant que "root".

Tu devrais extraire (dézipper, unzip) VMware. Si tu es sous windows, installation normale, si tu es sous ubuntu, déplace-toi sous le répertoire contenant le fichier extrait de VMware (lance le terminal, et utiliser la commande "cd") puis installe le fichier (tapez dans le terminal "sudo apt-get install <nom du fichier extrait>"). Si le fichier d'installation est ".bundle" ou ".sh" tu devrais l'exécuter en tant que script shell, c'est-à-dire tu tapes "./<chemin du fichier absolu>"

Une fois installé, tu as un sous menu contenant "Virtual Network Editor", "VMware player" et "VMware Workstation". Pour les "serial" du produit "VMware workstation" , tu peux essayer l'un de ces codes sur 20 caractères :

L9WMR-4YX0M-M246F-4P8QP
CKNYH-C80FY-28H6V-4W8QL
WTJDJ-30HA3-H8H6Z-4PRN2
A8HC7-1GGR0-E4PD4-4T694
0A136-0C0U4-78487-4ALRE
A8033-17FKN-F5640-48QTE
DLW49-UD9DV-W8J4Y-4MRQK

Si ça ne marche pas ou tu as besoins d'un serial de 25 caractères ce n'est pas un problème, on va utiliser "VMware player" pas le "Workstation" et le prmier est gratuit.

2- Installe TrixBox
Télécharge TrixBox adéquate du site www.trixbox.org (télécharge la version ".iso"). Fais l'enregistrement si c'est nécessaire, ça ne fait rien. toujours tu devrais être sous "root" si Ubuntu.

Maintenant lance "VMware player" et installe la "TrixBox".
- Utilise créer à partir d'une image disque .iso comme option de boot et indiquer l'emplacement de "trixbox.iso".
- Utilise l'option "Linux" comme système d'exploitation et "CentOS" comme version de SE.
- Choisissez un espace de sique dur 8Go et une ram de 512Mo (au minimum)
- Suivre les instructions (langue, clavier, choix du mot de passe, login : root sous la TrixBox)
- Installe la TrixBox



Une fois istallée, tu peux maintenant lancer la TrixBox (login : root).

Maintenant, pour connecter la TrixBox au réseau de ton routeur, il faut connecter ta machine virtuelle au même réseau que ton système d'exploitation principal : vérifie dans "Virtual Network Editor" (dans le menu de "VMware") que toute la connection VMnet0 est bridged (et la VMnet1 si c'est possible aussi).

Maintenant, détermine ton adresse IP (Windows : lance MS-DOS "cmd" et tape "ipconfig" et détermine l'IP de "wlan0". Si c'est Ubuntu : lance le terminal et tape "ifconfig" et détermine  l'IP de "wlan0" ou "eth0" selon la version de Ubuntu). Normalement de la forme A.B.C.D . Exemple 192.168.1.3.

Maintenant, dans le terminal de la TrixBox tu affectes une adresse IP dans le même réseau
utiliser la commande "ifconfig eth0 A.B.C.X" avec X différente de D et entre 1 et 254. Par exemple pour mon adresse 192.168.1.3 je tape "ifconfig 192.168.1.50" dan l'interface de TrixBox. Cette action ne doit retourner aucun message. Si c'est un message, rétape la commande ou redémarre la TrixBox.

Ouvre ton navigateur (ne me dis pas Internet Explorer s'il te plaît!) et tape l'adresse que tu as donnée à la TrixBox (pour mon exemple, je saisie dans la barre d'adresse 192.16.1.50 que j'ai choisie avant). Tu as normalement une page d'administration TrixBox de bannière verte. C'est l'interface de configuration de Asterisk.

3- Configuration de Asterisk par TrixBox

Dans la page verte du navigateur, en haut de page à droite tu peux lire "user mode", clique sur "switch" et saisis "maint" pour user et "password" pour password. Normalement ça devrais marcher. Tu as une fenêtre d'inscription? Ferme-la.


Maintenant on va faire donner deux extensions SIP à notre TrixBox, pour le faire, on clique sur PBX>PBX settings>Extensions. Tu as un formulaire à remplir, tu choisis 2 extensions (200 et 201 par exemple). Pour le champ "secret" saisis "secret".

4- Installation du VoIP soft phone
Si tu es windows, télécharge et installe "X-Lite" ou "3CX", sinon si Ubuntu, cherche dans la logithèque de Ubuntu "Twinkle" et installe-le.

5- Fonctionnement du soft phone
Pour "Twinkle", lance le et choisis "Wizard", choisis un nom de profil quelconque, puis dans le formulaire :
- SIP provider : Other
- User Name : Extension SIP (200 dans mon exemple)
- Domaine : adresse IP que tu as donnée à TrixBox (dans mon exemple 192.168.1.50)
Authentification name : Extension SIP (200 dans mon exemple)
- Password : secret
- SIP proxy : adresse IP que tu as donnée à TrixBox (dans mon exemple 192.168.1.50).


Voilà un exemple où maintenant l'IP de la VMware est 192.168.0.50 et j'ai choisi nom de profil = mot de passe = numéro d'extension SIP = 100 (pour éviter la complication)







Maintenant tu as une interface pour appeler par asterisk, choisis le profil à appeler, tu auras une sonnerie et un message vocal en anglais !

Si tu as une erreur du type "UDP port 5060 occupé déjà ..." tu peux changer le port que le twinkle ou X-Lite utilise vers 5068 ...

Tu peux faire tout le travaille sur une autre machine connecté à ton réseau (même modem) mais à la fin tu dois donner une autre extension (201 par exemple), tu appelle le premier profil 200 dans mon exemple) et tu peux discuter ! Pour X-lite, si j'appelle moi même, j'entends une chanson d'opera !









 Connexion du téléphone SIP DLINK DPH-150S et de la passerelle LINKSYS PAP-2


Installation de DLINK DPH-150S et son utilisation

 & 

En effet, pour ce modèle de téléphone, je détermine l'adresse IP de téléphone en appuyant sur "menu + #", je tape cette adresse dans mon navigateur, et je configure le SIP que le téléphone va utiliser (je crée un nouveau SIP de numéro 300 sur TrixBox), et enfin, j'appelle de mon softphone (SIP 200) le numéro 300 et le téléphone sonne, et vice versa!

Alors comment faire pour appeler un téléphone ordinaire et non pas un téléphone SIP?

Une périphérique est possible : passerelle qui sert à connecté d'une part un téléphone ordinaire au réseau IP et de l'utiliser au lieu de téléphone SIP (c'est nettement moins cher). Dans mon cas j'utilise la passerelle LINKSYS PAP2

Linksys PAP2 est de même dimensions que 2 paquets de cigarettes attachés. Elle contient un port Ethernet et 2 port RJ 11 pour les téléphones ordinaires. Alors on branche le transformateur électrique, le câble ethernet et le câble du téléphone. 


Tu décroche l'appareil téléphonique et tu tapes **** et une discussion





Merci à tout le groupe du travail que j'adore !

Farouk Mezghich,
Élève-ingénieur à l'École Nationale des Sciences de l'Informatique (ENSI) - Tunisie


//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////:


Deploying a single server machine with a SIP iPBX (IP PBX: Asterisk
Trixbox by)


This project is in the context of my work in the junior company
2010 ENSI (National School of Computer Sciences -
Tunisia). The project is to implement a generic server that makes
the iPBX (Astreisk, Cisco Call Manager, OTUC, Genesys ...). Is a
kind of abstraction that this product has the same interface for all
IPBX possible. While this section presents a subpart of the project,
that of Asterisk, so we begin by using our
machine first.


Asterisk



To do so, you must install the TrixBox on a virtual machine.
Then configure Asterisk TrixBox from. For this tutorial, I will
use: Operating System: Ubuntu (4.10 LTS) and Windows (Vista)
PBX System Software: TrixBox (2.8.0.4)
Virtual Machine: VMare (7.01)
VoIP Soft Phone: Twinkle (for Ubuntu) or X-Lite (for Windows)

It should be noted that all these software are freeware (except the crap Vista
microsoft).

1 - Install VMware
Download VMware Workstation (you just have to download VMware Player)
(32bits and depending on your operating system) www.vmware.org site.
Do registration if necessary, it does nothing. Better
version download. "tar". "tar.gz" or. "zip". If you're using Ubuntu,
Log in as root.

You should extract (unzip, unzip) VMware. If you're under windows,
normal installation, if you're under ubuntu, now moves under
directory containing the extracted file VMware (launches the terminal and
use the command "cd") and then install the file (type in the
terminal "sudo apt-get install file name> extrait>"). If the file
installation is. "bundle" or. "sh" you should run as
shell script, that is to say, you type ". / file <path absolu>"

Once installed, you have a sub menu of "Virtual Network Editor"
"VMware Player" and "VMware Workstation". For "serial" Product
"VMware Workstation, you can try one of these codes 20
characters:

L9WMR-4YX0M-M246F-4P8QP
CKNYH-C80FY-28H6V-4W8QL
WTJDJ-30HA3-H8H6Z-4PRN2
A8HC7 1GGR0-E4PD4-4T694-
0A136-78487-0C0U4-4ALRE
A8033-17FKN-F5640-48QTE
DLW49-UD9DV-W8J4Y-4MRQK

If it does not work or you need a serial of 25 characters that
is not a problem, we will use "VMware player" not
"Workstation" and PRMIA is free.

2 - Install TrixBox
Download TrixBox adequate www.trixbox.org Site (downloads the
version. "iso"). Do registration if necessary, it does
nothing. you should always be under "root" if Ubuntu.

Now launch VMware player "and installs the" TrixBox.
- Use to create from a disk image. Iso as boot option and
indicate the location of "trixbox.iso.
- Use the "Linux" operating system "CentOS" as
SE version.
- Choose an area of hard sical 8GB RAM and a 512MB (minimum)
- Follow the instructions (language, keyboard, choice of password, login
: Root in the TrixBox)
- Installs TrixBox




Once istallée, you can now run the TrixBox (login: root).

Now TrixBox to connect to the network in your router, it must
connect your virtual machine to the same network that your system
Operating Principal: check in "Virtual Network Editor" (in the
menu "VMware") that any connection is bridged VMnet0 (and
VMnet1 if possible too).

Now, determine your IP address (Windows: launch MS-DOS "cmd" and
type "ipconfig" and determines the IP of "wlan0". If Ubuntu: Launches
terminal and type "ifconfig" and determines the IP of "wlan0" or "eth0" according
version of Ubuntu). Normally the form A.B.C.D. Example
192.168.1.3.

Now in the terminal of the TrixBox IP address you assigned
in the same network
use the command "ifconfig eth0 ABCX" with different X and D
between 1 and 254. For example I type my address 192.168.1.3
"Ifconfig 192.168.1.50" dan interface TrixBox. This action should
return any message. If it is a message, retype the command or
reboot the TrixBox.

Open your browser (do not tell me Internet Explorer please!) And
types the address you gave to TrixBox (for my example, I seized
in the address bar 192.16.1.50 I chose before). You
normally an administration page TrixBox green banner. This is
Interface configuration Asterisk.

3 - Configuring Asterisk TrixBox
In the green page of the browser, the top right you can read
"User mode", click on "switch" and seized "maint" for user and
"Password" for password. Normally it should work. You have a
registration window? Shut up.



Now we will give two SIP extensions to our TrixBox, for
do so, click on PBX> PBX settings> Extensions. You have a Form
to fill, you choose two extensions (200 and 201 for example). For
field "secret" before "Secret".

4 - Installation of VoIP softphone
If you are Windows, download and install X-Lite "or" 3CX ", otherwise if
Ubuntu, looking in the Ubuntu repository "Twinkle" and install it.

5 - Operation of softphone
For "Twinkle", launches and choose "Wizard", choose a profile name
any, then in the form:
- SIP provider: Other
- User Name: Extending SIP (200 in my example)
- Domain: IP address that you gave to TrixBox (in my example
192.168.1.50)
Authentication name: Extending SIP (200 in my example)
- Password: secret
- SIP Proxy IP address that you gave to TrixBox (in my example
192.168.1.50).


This is an example where now the IP is 192.168.0.50 and I VMware
selected profile name = password = number of SIP extension = 100 (for
avoid complication)








Now you have an interface to call via asterisk, the selected
profile to call, you will have a bell and a voice message in English!

If you have an error like "UDP port 5060 is already occupied ..." you can
change the port that the twinkle or X-Lite uses to 5068 ...

You can do all the work on another machine connected to your
network (same modem) but in the end you must give a further extension (201
for example), you call the first profile 200 in my example) and you
can discuss! For X-lite, if I call myself, I hear a song
of opera!











Thank you to all the group's work that I love!

Farouk Mezghich,
Engineering student at the National School of Computer Sciences (ENSI)
- Tunisia
 
 
 
 
 
 
 
 
 

Ce site web a été créé gratuitement avec Ma-page.fr. Tu veux aussi ton propre site web ?
S'inscrire gratuitement