asterisk

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

Reboot all Phones

#!/bin/bash
 
cp /etc/asterisk/sip_notify.conf /etc/asterisk/sip_notify.conf.back.$(date -I)
 
cat <<EOF>> /etc/asterisk/sip_notify.conf
[reboot-snom]
Event=>reboot
Content-Length=>0
EOF
 
cat <<EOF> /etc/asterisk/extensions.reboot.conf
exten => 666,1,System(/usr/sbin/asterisk -rx "sip notify reboot-snom pako sip2 sip3")
exten => 666,n,Hangup()
EOF
 
add "#include extensions.reboot.conf" to /etc/asterisk/extensions.conf
 
 
# Links
http://www.voip-info.org/wiki/view/Asterisk+phone+snom
http://das-asterisk-buch.de/2.1/telefone-snom.html

manager.conf

[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0 
 
[manager]
secret=pa55w0rd
permit=0.0.0.0/0.0.0.0
read=system,call,log,verbose,agent,command,user
write=system,call,log,verbose,agent,command,user
 
#include "manager.d/*.conf"

capi.conf

diff /etc/asterisk/capi.conf /etc/asterisk/capi.conf
61c61
< callgroup=1     ;PBX call group
---
> ;callgroup=1     ;PBX call group

sip.conf

[general]
port = 5060
bindaddr=0.0.0.0
qualify=no
;disallow=all
allow=alaw
srvlookup=yes
language=de
progressinband=yes
 
[ekiga]
type=friend
nat=no
host=dynamic
canreinvite=no
qualify=1000
dtmfmode=rfc2833
progressinband=yes
username=ekiga
secret=ekiga
context=localphones
 
pedantic=yes

extensions.conf

[localphones]
exten => _X.,1,Dial(CAPI/ISDN1/${EXTEN}/b)
exten => _X.,n,Hangup
 
exten => 555,1,Answer()
exten => 555,n,Playback(tt-monkeys)
 
exten => 14,1,Answer()
exten => 14,n,Dial(CAPI/ISDN1/555-14/b)
 
exten => ekiga,1,Answer()
exten => ekiga,n,Dial(SIP/ekiga)
 
[directdial]
exten => 1,1,Dial(CAPI/ISDN1/${customernum}/b)

Asterisk auto-dial out with Java (asterisk-java)

# configure manager
/etc/asterisk/manager.conf
[general]
enabled = yes
port = 5038
bindaddr = 0.0.0.0 
 
[manager]
secret=pa55w0rd
permit=0.0.0.0/0.0.0.0
read=system,call,log,verbose,agent,command,user
write=system,call,log,verbose,agent,command,user
 
# create extension
/etc/asterisk/extensions.conf
[directdial]
exten => 1,1,Dial(CAPI/ISDN1/${customernum}/b)
 
# reload asterisk
/etc/init.d/asterisk restart
 
# download java class
wget http://maven.reucon.com/public-snapshot/org/asteriskjava/asterisk-java/1.0.0-SNAPSHOT/asterisk-java-1.0.0-20090303.204542-422.jar
 
# HelloMa

Asterisk

asterisk console
asterisk -r

set output to verbose
core set verbose 10

CLI commands
core show channels
capi show channels
capi info
reload
sip show peers

asterisk -rx "sip show registry"

end / destroy channel
core show channels
soft hangup SIP/XXXXXX

MOH
wget http://downloads.digium.com/pub/telephony/sounds/asterisk-moh-freeplay-wav.tar.gz -P /tmp
tar xzf /tmp/asterisk-moh-freeplay-wav.tar.gz -C /tmp
cp /tmp/fpm-sunshine.wav /var/lib/asterisk/moh/
# extensions.conf

Install fcpci (AVM Fritz Card PCI kernel module)

#!/bin/bash
 
# install capiutils
apt-get install -y capiutils
sed -i 's|#fcpci|fcpci|g' /etc/isdn/capi.conf
 
# install kernel module for AVM Fritz card PCI or compile: http://www.panticz.de/ubuntu_compile_fcpci
apt-get install wget
wget http://dl.dropbox.com/u/4170695/www/fcpci.tar.bz2 -P /tmp
tar xjf /tmp/fcpci.tar.bz2 -C /tmp/
/tmp/fcpci/install.sh
reboot
 
apt-get install -y asterisk asterisk-chan-capi
# do we need this?

Asterisk DomU

http://www.panticz.de/DomU-Debian-Wheezy
 
# hide your ISDN card in dom0 and reboot dom0
# sed -i 's|tty0|tty0 pciback.hide=(04:02.0)|g' /boot/grub/menu.lst
# reboot
 
# in domU
passwd
 
# install lspci
apt-get install -y pciutils
 
# OPTIONAL: Diva Server 4BRI-8M 2.0 PCI
http://www.panticz.de/node/342
 
 
 
# apt-get install -y linux-headers-$(uname -r) dpkg-dev
 
 
 
 
apt-get source linux-image-$(uname -r)
 
#cd /usr/src/
#tar xzf linux_2.6.24.orig.tar.gz
#ln -s /usr/src/linux-2.6.24.2/ /usr/src/linux
ln -s /usr/src/linux-$(uname -r)/ /usr/src/linux
 
#mv /etc/apt/sources.li
Syndicate content