Copy Image on SD Card:
dcfldd bs=4M if=/home/bao/Downloads/raspbx-31-07-2014/raspbx-31-07-2014.img of=/dev/sdb
History:
root@raspbx:~# history
1 raspbx-upgrade
8 configure-timezone
9 dpkg-reconfigure locales
10 dpkg-reconfigure keyboard-configuration
11 raspi-config
12 passwd
19 apt-get install vim
20 vim /etc/asterisk/sip.conf
25 vi sip_additional.conf
26 vi sip_custom.conf
36 asterisk -rvvvvv
37 apt-get install bluetooth bluez-utils blueman
38 lsusb
39 /etc/init.d/bluetooth status
42 apt-get install usbutils
43 lsusb
44 hcitool scan
45 l2ping -c 1 00:12:D1:D9:90:31
46 ls -ltra /usr/lib/asterisk/modules/*mob*
48 hcitool dev
50 vi chan_mobile.conf
52 asterisk -rvvvvv
53 vi chan_mobile.conf
54 asterisk -rvvvvv
55 asterisk -rvvvvv
64 hcitool scan
65 bluez-simple-agent hci0 00:12:D1:D9:90:31
70 vi extensions.conf
98 bluez-test-device trusted 00:12:D1:D9:90:31 yes
99 asterisk -rvvvvv
101 vi extensions.conf
103 vi extensions_additional.conf
139 vi sip_general_additional.conf
406 apt-get install postfix mailutils libsasl2-2 ca-certificates libsasl2-modules
417 cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf
418 vi /etc/postfix/main.cf
420 vi /etc/postfix/sasl_passwd
421 chmod 400 /etc/postfix/sasl_passwd
422 postmap /etc/postfix/sasl_passwd
423 cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | sudo tee -a /etc/postfix/cacert.pem
425 /etc/init.d/postfix start
429 echo "Test mail from postfix" | mail -s "Test Postfix" abc@gmail.com
chan_mobile.conf
[general]
interval=30 ; Number of seconds between trying to connect to devices.
; The following is a list of adapters we use.
; id must be unique and address is the bdaddr of the adapter from hciconfig.
; Each adapter may only have one device (headset or phone) connected at a time.
; Add an [adapter] entry for each adapter you have.
[adapter]
id=huybao
address=00:1B:DC:0F:A8:7A
..
..
..
[Petra]
address=00:12:D1:D9:90:31
port=13
context=incoming-mobile
adapter=huybao
group=1
sip_custom.conf
[huybao]
type=friend
secret=1234
host=dynamic
context=outgoing-mobile
;insecure = invite
sip.conf:
[general]
register => huybao: password@bellsip.com/huybao
sip_general_custom.conf:
[huybao]
type=peer
host=proxy.bellsip.com
fromdomain=bellsip.com
secret=Password
fromuser=huybao
username=huybao
defaultuser=huybao
canreinvite=no
;nat=yes
nat=no
;dtmfmode=rfc2833
insecure=port,invite
;insecure=very
;context=from-bellsip.com
;qualify=yes
allow=all
reinvite=no
extensions_additional.conf:
[incoming-mobile]
;exten => s,1,Dial(SIP/2000,10)
exten => s,1,Dial(SIP/huybao.3@huybao,60,o)
exten => s,2,Hangup()
exten => sms,1,Verbose(Incoming SMS from ${SMSSRC} ${SMSTXT})
exten => sms,n,System(echo "To: abc@gmail.com" > /tmp/smsmail)
exten => sms,n,System(echo "Subject: SMS from ${SMSSRC}" >> /tmp/smsmail)
exten => sms,n,System(echo "${SMSTXT}" >> /tmp/smsmail)
exten => sms,n,System(sendmail -t -f ${SMSSRC}@ abc@gmail.com < /tmp/smsmail)
exten => sms,n,Hangup()
[outgoing-mobile]
;exten => s,n,NoOp(Calling as SIP address: huybao@bellsip.com)
exten => 9000,1,Dial(SIP/huybao.2@huybao,60)
exten => _X.,2,Hangup
/etc/postfix/main.cf:
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_use_tls = yes
/etc/postfix/sasl_passwd:
[smtp.gmail.com]:587 abc@gmail.com:goolgeapplpwd
cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | sudo tee -a /etc/postfix/cacert.pem