Configure mcrypt for php, otherwise you probably will get warning/error in phpmyadmin portal
php5enmod mcrypt; service apache2 restart
We will configure asterisk step by step and will test it on every stept to check our configuration. So lets start
Basic Setup
Backup the whole directory before we do any damage
cp -fr /etc/asterisk/ ~
Lets start with editing/updating rtp.conf. We need this regardless, you can just simply paste these values in terminal but DO NOT FORGET TO CHANGE THE VARIABLES ACCORDINLY
At this poing you should be able to register two user (demo.10,demo11) and both should be able to call each other by dialing their extensions (10, 11)
Go Up Add Google Voice
Set google voice to make and receive calls. Lets starting configuring motif so edit motif.conf
Now paste the following in extensions.conf, save and exit out of it, dont forget to adjust the variables
[general]
[incoming-motif]
exten => s,1,Answer()
same => n,Wait(1)
same => n,SendDTMF(1)
same => n,Set(cid=${CALLERID(name)})
same => n,Set(cid=${CUT(cid,@,1)})
same => n,Set(CALLERID(all)=${cid})
same => n,Dial(SIP/demo.10,20,D(:1))
[internal]
exten => 10,1,Dial(SIP/demo.10,,r)
exten => 11,1,Dial(SIP/demo.11,,r)
exten => _1NXXNXXXXXX,1,Dial(Motif/google/${EXTEN}@voice.google.com,,r)
exten => _NXXNXXXXXX,1,Dial(Motif/google/1${EXTEN}@voice.google.com,,r)
exten => _NXXXXXX,1,Dial(Motif/google/1xxx${EXTEN}@voice.google.com,,r)
Hangup()
Restart the asterisk service
service asterisk restart
At this point you should be able to call your gooogle voice number and demo.10 extension should ring. Both extensions (demo.10 and demo.11) should be call outside as well. replace xxx before ${EXTEN} with your area code.
Go Up Add MySQL Support
Lets start with configuring call detail records (cdr)cdr_mysql.conf for realtime
Now server is pretty much configured but we still need to create database.
I have the whole mysql script to add database and setup proper permission so download it first