Asterisk + FreePBX sur Debian Etch : Installation Script V.0.3
Par Yoann le mercredi, 13 août 2008, 22:44 - VOIP Asterisk & Telephonie - Lien permanent
Le script d'installation assisté (pour pas dir automatique) d'Asterisk et de FreePBX sur une Debian Etch passe en version 0.3 !!
Pour cette version, j'ai regroupé en un seul fichier bash, l'équivalent des 3 précédents.
Pour ce qui est du Changelog :
- Pré-configuration des modules d'asterisk (pour une utilisation par default d'asterisk, plus besoin de faire un make menuconfig)
- Ajout d'un script de démarrage /etc/init.d/freepbx
- Traduction de l'interface du script par Neil Stone
- Optimisation du code (sed)
- Utilisation d'aptitude plutot apt-get
- Passage de Asterisk 1.4.18 à 1.4.21.2
- Passage de FreePBX 2.4.0 à 2.4.1
Je vous invite à lire la suite du billet pour accèder au télécharger du script.
Télécharger le script :
- Francais : asterisk-freepbx_0.3_fr_2008-08-13.sh
- Anglais : asterisk-freepbx_0.3_en_2008-08-13.sh
UPDATE : 18/08/2008 :
Cette version, n'est pas la dernière version. Voir le nouveau billet dans la catégorie VOIP Asterisk & Telephony
This version is not the last version. Please check new post in the category VOIP Asterisk & Telephony.
Commentaires
Bonjour
Vous allez peut être me trouver stupide mais j'aimerais savoir comment executer un script (asterisk-freepbx_0.3_fr_2008-08-13.sh par exemple) sur debian
@ John
On a tous commencé un jour, aucunes questions n'est stupides du momment qu'on attend pas la réponse ou la solution toute cuitte ;-)
Alors, un script (ici bash) est un fichier qui regroupe plusieurs commandes, qui seront excecutés les unes a la suite des autres.
Ce fichier, pour être executé doit être executable (Whoua super cette phrase ;-) )
Après pour la gestion des droits, je ne peux malheureusement pas tout expliquer cela ici, cela serait trop long, par contre je t'invite à lire cette page et à la comprendre : www.ac-creteil.fr/reseaux...
Pour notre cas présent, voici ce que tu devrais faire (se placer dans le dossier /tmp, telecharger le script, changer les droits du script, excecuter le script) :
cd /tmp/
wget www.queret.net/download/A...
chmod o+x asterisk-freepbx_0.3_fr_2008-08-13.sh
./asterisk-freepbx_0.3_fr_2008-08-13.sh
En espérant avoir répondu à la question. (C'est des fois les questions les simples, les plus difficiles à expliquer)
Bonsoir,
apres plusieurs tentative d'execution du script, impossible d'installer freepbx. tout ce qui est asterisk et mysql apache : ok
en fait il n'y a pas les fichiers dans /var/www/ admin non cree.
impossible de lancer amportal start. pourtant pas d'erreur lors du lancement de 'install_amp'
version debian etch fraichement installe.
je comprend pas. j'ai beau utiliser le script ou le fichier aide suivant les erreurs rencontres sans succes.
je suppose que ces fichier php doivent etre telecharge lors de 'install_amp' ? car dans le tar, il n'y a aucun fichier pour l'interface web.
Pourquoi ce probleme ???
Merci
@dvenon
Est-ce que pendant l'execution du script, tu as pu noter des erreurs ? surtout sur la partie concernant FreePBX ?
Pour ce qui est des fichiers de l'interface Web, ne t'inquiete pas, ils sont inclus dans le tgz de FreePBX, et copié au bon endroit lors de l'installation.
(Je refais une installation propre de Debian Etch demain sur ma machine de test, et je te confirme le bon fonctionnement du script)
I have succesfully installed this script then installed postix and sent out email. Asterisk is not sending the voicemail as attachments. Any help in why this would be is much appreciated. Sorry I do not read or speak french :(.
@WINGNU
Is your voicemail is correctly recorded ? Can you listen it, with your phone ?
Hrmm I thought I could but I cannot... I have done this install like 6 times now on various hardware for testing. The voicemail boxes are getting created. It is not creating the voicemails =/ I will see what I can track down on that. Here is some of the output from asterisk ... it actually quits before I finish recording.
- <SIP/102-085d2860> Playing 'beep' (language 'en')
-- Recording the message
-- x=0, open writing: /var/spool/asterisk/voicemail/default/102/tmp/1knYLq format: wav49, 0x854ab68
-- x=1, open writing: /var/spool/asterisk/voicemail/default/102/tmp/1knYLq format: gsm, 0x8594e08
-- x=2, open writing: /var/spool/asterisk/voicemail/default/102/tmp/1knYLq format: wav, 0x85926b0
== Parsing '/etc/asterisk/manager.conf': Found
== Parsing '/etc/asterisk/manager_additional.conf': Found
== Parsing '/etc/asterisk/manager_custom.conf': Found
== Manager 'admin' logged on from 127.0.0.1
== Manager 'admin' logged off from 127.0.0.1
-- User hung up
== Spawn extension (macro-vm, s-CHANUNAVAIL, 2) exited non-zero on 'SIP/102-085d2860' in macro 'vm'
== Spawn extension (macro-vm, s-CHANUNAVAIL, 2) exited non-zero on 'SIP/102-085d2860' in macro 'exten-vm'
== Spawn extension (macro-vm, s-CHANUNAVAIL, 2) exited non-zero on 'SIP/102-085d2860'
== Parsing '/etc/asterisk/manager.conf': Found
Found what the problem is.... permissions are wrong. I will post the resolution when I have gotten it.
== Parsing '/var/spool/asterisk/voicemail/default/102/INBOX/msg0000.txt': Not found (Permission denied)
-----w-rw- 1 asterisk asterisk 268 2008-09-03 07:02 msg0000.txt
-rwxrwxr-x 1 asterisk asterisk 73324 2008-09-03 07:02 msg0000.wav
-rwxrwxr-x 1 asterisk asterisk 7470 2008-09-03 07:02 msg0000.WAV
-rwxrwxr-x 1 asterisk asterisk 3333 2008-09-03 13:10 msg0001.gsm
-----w-rw- 1 asterisk asterisk 273 2008-09-03 13:10 msg0001.txt
-rwxrwxr-x 1 asterisk asterisk 32364 2008-09-03 13:10 msg0001.wav
-rwxrwxr-x 1 asterisk asterisk 3310 2008-09-03 13:10 msg0001.WAV
@Wingnut
You all right. I have the same problem.
Read this (on digium forum) : forums.digium.com/viewtop...
Edit file : /usr/src/asterisk-1.4.XX/app/app_voicemail.c
Comment line bellow (with /* xxx */ ):
line 1762 (for asterisk 1.4.18) : /* chmod(template, VOICEMAIL_FILE_MODE & ~my_umask); */
line 1912 (for asterisk 1.4.18) : /* chmod(newtmp, VOICEMAIL_FILE_MODE & ~my_umask); */
line 3059 (for asterisk 1.4.18) : /* chmod(tmptxtfile, VOICEMAIL_FILE_MODE & ~my_umask); */
and rebuild asterisk :
cd /usr/src/asterisk-1.4.XX/
./configure
make install
make samples
And it (normaly) work for me.
Can you try ? and tell me if working ?
Yoann
@Wingnut
If you want re-install an other time you can try this new script (Version 0.3.2b) :
www.queret.net/download/A...
I haven't test it, but i think it solve your problem.
This correction (if really solve problems), are including in next script version 0.3.3
Yoann
Excellent I had found that post and was testing that... Yes it seemed to fix the issue. Very interesting. I built asterisk from source 1.4.21.2 on a ubuntu box and did not have the same problem. I would be happy to test your new script and see how it does. I will let you know.. I have about 10 asterisk boxes at my pleasure. Thanks for your quick responses. Great script you have . I also am receiving them via email.
Wingnut,
This problem seem appears only if you use asterisk + freepbx. If you have only asterisk (without freepbx) you not have this problem.
Yoann
Yeah I use freepbx for all my installs on asterisk. Been trying to get a good way to replicate systems so I can pump them out quickly. I am now finding that I have no CDR data. I did a make clean ./configure and make install again and it is still not working. Do you have call data records on yours? I will look into this further. I really hope I am not being a pain here for you. Thanks.
Hehe found it. We need to update /etc/asterisk/cdr_mysql.conf with the new mysql password we set at the end of the script... working now after manually doing it.
Wingnut,
Very thk for your comment. It's very nice to have user reply :-)
For CDR problem, i upgrade the end of script to change mysql password in /etc/asterisk/cdr_mysql.conf
(in few minutes for 0.3.2b version)
Still thank :-)
Yes, seems to be working well. Very well done. I will continue to test in my lab and post with any findings. I did a clean install today and it seems to be working just fine. I do not test this with zaptel cards as I am deploying maily SIP connections. Any plans to update to etch and a half? I would be happy to test / assist how I can. I am not much of a script guru though.
Merci! La prochaine étape serait d'en faire un package :)
OMG! i've installed asterisk with your script asterisk-freepbx_0.3_en_2008-08-13.sh. but a problem is comming up by starting asterisk.
error message: amportal binary can not be found (/usr/local/sbin/amportal)
pre configuration of the server:
it is a root Webserver, running with Plesk and PHP5
so, please contact me via email, if you know, how to fix the problem. thx
same thing by reinstall with: Version 0.3.2b
@Femibion
Can you try a new beta version ?
www.queret.net/download/A...
Run install with : ./asterisk-freepbx_0.3.3_fr_2008-12-22.sh -v
ok i'll try
i think it's a error message by doing the installation:
Il existe une version plus récente de ce script.
- Vous utilisez la version : 0.3.3
- La dernière version est : 0.3.2
Plus d'informations sur : www.queret.net/asterisk/
L'installation ne peut continuer
i can't translate!
oh sorry, was my fault. i forgot the "-v" by typing the run command:
but it wont work:
h738627:/usr/src# amportal start
-bash: amportal: command not found
slt
j'ai testé ton script et adapter pour une lenny. Et du coup ca marche nikel
a chaque fois que j'installe freepbx j'ai des erreur avec fop et la non cool :)
tu me dira ou je peux t'envoyer mon script pour la lenny ? pour partager au autres
Merci
I changed the script for the latest releases
VER_ASTERISK="1.4.24.1";
VER_LIBRI="1.4.9";
VER_ADDONS="1.4.7";
VER_DAHDI="2.1.0.4+2.1.0.2";
VER_FREEPBX="2.5.1";
seems to be working.
I changed the script beta 0.4.0 for the latest releases
VER_ASTERISK="1.4.24.1";
VER_LIBRI="1.4.9";
VER_ADDONS="1.4.7";
VER_DAHDI="2.1.0.4+2.1.0.2";
VER_FREEPBX="2.5.1";
seems to be working.
Bonjour Yoan,
Toutes mes félicitations pour le contenu de ton blog et ton script d'automatisation d'Asterisk et de Freepbx. C'est vraiment du bon travail.
En fait, je suis très intéressé par les solutions de voip et notamment d'asterisk bien que n'étant pas à la base de formation technique.
Je suis très impressionné par ta maitrise de la voip et du développement et intégration d'Asterisk et je souhaiterais vivement, si celà ne te pose pas de problème, pouvoir entrer en contact avec toi.
Je te laisse mes coordonnées en espérant vraiment qu'on puisse me contacter soit par mail ou par téléphone et te rappellerai aussitot.
Cordialement,
Francisco 06.65.42.75.31
E-Mail: francisco.akueson@gmail.com
....
libpri-1.4.7/libpri.h
libpri-1.4.7/pridump.c
libpri-1.4.7/README
libpri-1.4.7/pri_timers.h
libpri-1.4.7/q931.c
libpri-1.4.7/pri_facility.h
libpri-1.4.7/pri_q931.h
libpri-1.4.7/copy_string.c
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Des erreurs ont provoqué l'arrêt du programme
+----------------------------------------------------------------+
| Compilation de Dahdi Linux |
+----------------------------------------------------------------+
Appuyez sur <Entrer> pour continuer
Ton script fait un sacré boulot et il a l'air très bien fait; mais je ne suis pas un informaticien Linux et en ce qui me concerne ton script n'a pas l'air d'apprécier ma machine !!
Pour tout dire je ne suis peut être pas dans le meilleur contexte :
Mon objectif est de faire fonctionner un asterisk + freepbx sur une machine eee pc de 500Ko de memoire et 4go de mémoire disque flash (eeepc 4G ou 701) vitesse 700 à 900Mhz, laquelle machine consomme 20Watts.
Si on continu
asterisk-freepbx_0.4.0_fr_2009-03-11.sh: line 284: cd: /usr/src/dahdi-linux-complete-2.1.0.4+2.1.0.2: Aucun fichier ou répertoire de ce type
make: *** Pas de règle pour fabriquer la cible « all ». Arrêt.
make: *** Pas de règle pour fabriquer la cible « install ». Arrêt.
make: *** Pas de règle pour fabriquer la cible « config ». Arrêt.
+----------------------------------------------------------------+
| Compilation de libpri
chan_ooh323.c:3369: error: âAST_CAUSE_NO_ANSWERâ undeclared (first use in this function)
chan_ooh323.c:3373: error: âAST_CAUSE_FAILUREâ undeclared (first use in this function)
chan_ooh323.c:3375: error: âAST_CAUSE_NORMALâ undeclared (first use in this function)
chan_ooh323.c: At top level:
chan_ooh323.c:3390: error: expected â)â before string constant
make[1]: *** [chan_ooh323.o] Erreur 1
make: *** [channels] Erreur 2
+----------------------------------------------------------------+
| Liens Symboliques (Modules) |
+----------------------------------------------------------------+
Appuyez sur <Entrer> pour continuer