-
1Step 1
### [ WRITE IMAGE TO SD ]
wget "http://93.174.101.10/bt/09bc05ab03780f279390e9cf6a15c7c249f712e1/data/2014-01-07-wheezy-raspbian.zip"
7z x 2014-01-07-wheezy-raspbian.zip
SD_CARD=/dev/sdX # Change it to your SD card device name
md5sum 2014-01-07-wheezy-raspbian.img ; "It should be 6d8e5a48ff7c6bdc0bc0983bc32f75b8"dd bs=1M if=2014-01-07-wheezy-raspbian.img of=$SD_CARD
-
2Step 2
### [ OVERCLOCKING AND MEMORY CONFIG ]
# Grow the partition
# Set locales
# Set hostname
# Set Overclock to Turbo
# Set Advanced Options > Memory Split to 16
Reboot? yes -
3Step 3
### [ INITIAL SYSTEM CONFIG ]
# Access the pi using keyboard+screen or ssh (root password is raspberry)
passwd
passwd pi
# Regenerate OpenSSH Host Keys:
# Connect some mouse and move it (I hope that it does something)
rm /etc/ssh/ssh_host_# ; dpkg-reconfigure openssh-server -
4Step 4
### [ UPDATING FIRMWARE ]
aptitude install -y git-core curl binutils
wget https://raw.github.com/Hexxeh/rpi-update/master/rpi-update -O /usr/bin/rpi-update && chmod +x /usr/bin/rpi-update
rpi-update
reboot
### [ END UPDATING FIRMWARE ] -
5Step 5
### [ UPDATING THE SYSTEM ]
aptitude update ; aptitude dist-upgrade -y
# automatic security updates
aptitude install -y unattended-upgrades
dpkg-reconfigure -plow unattended-upgrades -
6Step 6
### [ TESTING SOUNDCARDS ]
# Testing the internal soundcard with headphones:
speaker-test -c 2 -s 1 -t wav -w /usr/share/sounds/alsa/Front_Left.wav
speaker-test -c 2 -s 2 -t wav -w /usr/share/sounds/alsa/Front_Right.wav
# Testing the USB soundcard with headphones:
speaker-test -Dfront:Device -c 2 -s 1 -t wav -w /usr/share/sounds/alsa/Front_Left.wav
speaker-test -Dfront:Device -c 2 -s 2 -t wav -w /usr/share/sounds/alsa/Front_Right.wav -
7Step 7
### [ STARTUP SOUND ]
mkdir /usr/local/share/sounds
cd /usr/local/share/sounds
wget http://flanera.net/bumbox-start.wav
echo "aplay /usr/local/share/sounds/bumbox-start.wav &" >> /etc/rc.local
echo "aplay -Dfront:Device /usr/local/share/sounds/bumbox-start.wav &" >> /etc/rc.local -
8Step 8
### [ TWINKLE ]
aptitude install -y twinkle
wget "https://github.com/GNOME/ekiga/blob/master/sounds/dialtone.wav?raw=true" -O /usr/local/share/sounds/ringback.wav
wget "https://github.com/GNOME/ekiga/blob/master/sounds/ring.wav?raw=true" -O /usr/local/share/sounds/ring.wav -
9Step 9
### [ CONFIGURE TWINKLE ]
# Register an account on https://ostel.co
# Replace "6666" with your username and put your passwd after "auth_pass="
echo '
# USER
user_name=6666
user_domain=ostel.co
user_display=
user_organization=
auth_realm=
auth_name=6666
auth_pass=xxxxxxxxxxxxxxxxxxxxx
auth_aka_op=00000000000000000000000000000000
auth_aka_amf=0000
# SIP SERVER
outbound_proxy=ostel.co
all_requests_to_proxy=no
non_resolvable_to_proxy=no
registrar=
register_at_startup=yes
registration_time=3600
reg_add_qvalue=no
reg_qvalue=1
# RTP AUDIO
codecs=speex-wb,speex-nb,g711a,g711u,gsm
ptime=20
out_far_end_codec_pref=yes
in_far_end_codec_pref=yes
speex_nb_payload_type=97
speex_wb_payload_type=98
speex_uwb_payload_type=99
speex_bit_rate_type=cbr
speex_dtx=no
speex_penh=yes
speex_quality=6
speex_complexity=3
speex_dsp_vad=yes
speex_dsp_agc=yes
speex_dsp_aec=no
speex_dsp_nrd=yes
speex_dsp_agc_level=20
ilbc_payload_type=96
ilbc_mode=30
g726_16_payload_type=102
g726_24_payload_type=103
g726_32_payload_type=104
g726_40_payload_type=105
g726_packing=rfc3551
dtmf_transport=auto
dtmf_payload_type=101
dtmf_duration=100
dtmf_pause=40
dtmf_volume=10
# SIP PROTOCOL
hold_variant=rfc3264
check_max_forwards=no
allow_missing_contact_reg=yes
registration_time_in_contact=yes
compact_headers=no
encode_multi_values_as_list=yes
use_domain_in_contact=no
allow_sdp_change=no
allow_redirection=yes
ask_user_to_redirect=yes
max_redirections=5
ext_100rel=supported
ext_replaces=yes
referee_hold=no
referrer_hold=yes
allow_refer=yes
ask_user_to_refer=yes
auto_refresh_refer_sub=no
attended_refer_to_aor=no
allow_xfer_consult_inprog=no
send_p_preferred_id=no
# Transport/NAT
sip_transport=auto
sip_transport_udp_threshold=1300
nat_public_ip=
stun_server=
persistent_tcp=yes
enable_nat_keepalive=no
# TIMERS
timer_noanswer=30
timer_nat_keepalive=30
timer_tcp_ping=30
# ADDRESS FORMAT
display_useronly_phone=yes
numerical_user_is_phone=no
remove_special_phone_symbols=yes
special_phone_symbols=-()/.
use_tel_uri_for_phone=no
# RING TONES
ringtone_file=/usr/local/share/sounds/ring.wav
ringback_file=/usr/local/share/sounds/ringback.wav
# SCRIPTS
script_incoming_call=
script_in_call_answered=
script_in_call_failed=
script_outgoing_call=
script_out_call_answered=
script_out_call_failed=
script_local_release=
script_remote_release=
# NUMBER CONVERSION
# SECURITY
zrtp_enabled=yes
zrtp_goclear_warning=yes
zrtp_sdp=yes
zrtp_send_if_supported=no
# MWI
mwi_sollicited=no
mwi_user=
mwi_server=
mwi_via_proxy=no
mwi_subscription_time=3600
mwi_vm_address=
# INSTANT MESSAGE
im_max_sessions=10
im_send_iscomposing=yes
# PRESENCE
pres_subscription_time=3600
pres_publication_time=3600
pres_publish_startup=yes
' > /home/pi/.twinkle/6666@ostel.co.cfg
echo '
# AUDIO
dev_ringtone=alsa:plughw:0,0
dev_speaker=alsa:plughw:1,0
dev_mic=alsa:plughw:1,0
validate_audio_dev=yes
alsa_play_period_size=128
alsa_capture_period_size=32
oss_fragment_size=128
# LOG
log_max_size=5
log_show_sip=yes
log_show_stun=yes
log_show_memory=yes
log_show_debug=no
# GUI
gui_use_systray=yes
gui_hide_on_close=yes
gui_auto_show_incoming=no
gui_auto_show_timeout=10
gui_browser_cmd=
# Address book
ab_show_sip_only=no
ab_lookup_name=yes
ab_override_display=yes
ab_lookup_photo=yes
# Call history
ch_max_size=50
# Services
call_waiting=yes
hangup_both_3way=yes
# Startup
start_user_profile=6666@ostel.co
start_hidden=no
# Network
sip_port=5060
rtp_port=8000
sip_max_udp_size=65535
sip_max_tcp_size=1000000
# Ring tones
play_ringtone=yes
ringtone_file=
play_ringback=yes
ringback_file=
# MIME settings
mime_shared_database=/usr/share/mime/globs
# Persistent user interface state
last_used_profile=6666@ostel.co
redial_url=sip:9196@ostel.co
redial_display=
redial_subject=
redial_profile=6666@ostel.co
redial_hide_user=no
show_display=yes
show_buddy_list=yes
warn_hide_user=yes
dial_history=9196
dial_history=music
# UI session settings
ui_session_id=10f9b1b0d1c331fefb138343156574014500000020460054
ui_session_active_profile=secure-portatil.cfg
ui_session_main_geometry=3,24,739,693
ui_session_main_hidden=yes
ui_session_main_state=0
' > /home/pi/.twinkle/twinkle.sys -
10Step 10
# Now you should be able to make and receive secure ZRTP calls. Launch the twinkle console and try some commands:
twinkle -c
call 9196
bye
help
call thetestcall@sip2sip.info
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.