Headlines News :

POPULAR POST

Showing posts with label computer. Show all posts
Showing posts with label computer. Show all posts

Squid Youtube Cache 2016 Terbaru suport HTTP & HTTPS (Squid 3.5.3)



apt-get update && apt-get upgrade -y

apt-get install devscripts \
build-essential \
openssl libssl-dev \
fakeroot \
libcppunit-dev \
libsasl2-dev \
cdbs \
ccze \
libfile-readbackwards-perl \
libcap2 \
libcap-dev \
libcap2-dev \
libtool \
sysv-rc-conf -y &&
wget http://ftp.riken.jp/net/squid/archive/3.5/squid-3.5.3.tar.bz2 &&
tar -xjf squid-3.5.3.tar.bz2 &&
cd squid-3.5.3 &&
./configure \
--prefix=/usr \
--includedir=/usr/include \
--infodir=/usr/share/info \
--sysconfdir=/etc \
--localstatedir=/var \
--libexecdir=/usr/lib/squid \
--srcdir=. \
--datadir=/usr/share/squid \
--sysconfdir=/etc/squid \
--mandir=/usr/share/man \
--enable-inline \
--enable-async-io=24 \
--enable-storeio=ufs,aufs,diskd,rock \
--enable-removal-policies=lru,heap \
--enable-gnuregex \
--enable-delay-pools \
--enable-cache-digests \
--enable-underscores \
--enable-icap-client \
--enable-follow-x-forwarded-for \
--enable-eui \
--enable-esi \
--enable-icmp \
--enable-zph-qos \
--enable-http-violations \
--enable-ssl-crtd \
--enable-linux-netfilter \
--enable-ltdl-install \
--enable-ltdl-convenience \
--enable-x-accelerator-vary \
--disable-maintainer-mode \
--disable-dependency-tracking \
--disable-silent-rules \
--disable-translation \
--disable-ipv6 \
--disable-ident-lookups \
--with-swapdir=/var/spool/squid \
--with-logdir=/var/log/squid \
--with-pidfile=/var/run/squid.pid \
--with-aufs-threads=24 \
--with-filedescriptors=65536 \
--with-large-files \
--with-maxfd=65536 \
--with-openssl \
--with-default-user=proxy \
--with-included-ltdl &&
make && make install


mkdir /var/lib/squid &&
chown -R nobody /var/lib/squid/ &&
/usr/lib/squid/ssl_crtd -c -s /var/lib/squid/ssl_db &&
chown -R proxy:proxy /var/lib/squid/ssl_db/ &&
chmod -R 777 /var/lib/squid/ssl_db/

nano /etc/squid/squid.conf

#
# Recommended minimum configuration:
#

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 192.168.10.0/24 #LAN
acl localnet src 10.10.10.0/24 #WIFI
acl localnet src 10.10.20.0/24 #WIFI
acl localnet src 10.10.30.0/24 #WIFI

acl SSL_ports port 443
acl Safe_ports port 80  # http
acl Safe_ports port 21  # ftp
acl Safe_ports port 443  # https
acl Safe_ports port 70  # gopher
acl Safe_ports port 210  # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280  # http-mgmt
acl Safe_ports port 488  # gss-http
acl Safe_ports port 591  # filemaker
acl Safe_ports port 777  # multiling http
acl CONNECT method CONNECT

# TAG: QUERY
# -----------------------------------------------------------------------------
acl QUERY urlpath_regex -i (hackshield|blank.html|infinity.js|hshield.da|renew_session_token.php|recaptcha.js|dat.asp|notice.swf|patchlist.txt|hackshield|captcha|reset.css|update.ver|notice.html|updates.txt|gamenotice|images.kom|patchinfo.xml|noupdate.ui|\.Xtp|\.htc|\.txt)
acl QUERY urlpath_regex -i (patch.conf|uiimageset.xml.iop|gashaponwnd.xml.iop|loading.swf|download.swf|version.list|version.ini|launch.jnlp|server_patch.cfg.iop|core.swf|Loading.swf|resouececheck.sq|mainloading.swf|config.xml|gemmaze.swf|xml.png|size.xml|resourcesbar.swf|version.xml|version.list|delete.ini)
acl QUERY urlpath_regex -i \.(jsp|asp|aspx|cfg|iop|zip|php|xml|html)(\?|$)
cache deny QUERY

#
acl dontstore url_regex ^http:\/\/(([\d\w-]*(\.[^\.\-]*?\..*?))(\/\mosalsal\/[\d]{4}\/.*\/)(.*\.flv))\?start.*
acl dontstore url_regex redbot\.org \.php
acl dontstore url_regex -i ^http:\/\/.*gemscool\.com\/.*
acl dontstore url_regex \.(aspx|php)\?
acl dontstore url_regex goldprice\.org\/NewCharts\/gold\/images\/.*\.png
acl dontstore url_regex google\.co(m|\.[a-z]{2})\/complete\/search\?
acl dontstore url_regex redirector\.([0-9.]{4}|.*\.youtube\.com|.*\.googlevideo\.com|.*\.video\.google\.com)\/(get_video\?|videodownload\?|videoplayback.*id|get_video_info\?|ptracking\?|player_204\?|stream_204\?).*

acl store_yt_id url_regex -i youtube.*(ptracking|stream_204|playback|player_204|watchtime|set_awesome|s\?|ads).*(video_id|docid|\&v|content_v)\=([^\&\s]*).*$
acl store_id_list_yt url_regex -i (youtube|googlevideo).*videoplayback.*$
acl store_id_list_yt url_regex ^https?\:\/\/([0-9.]{4}|.*\.youtube\.com|.*\.googlevideo\.com|.*\.video\.google\.com)\/(get_video\?|videodownload\?|videoplayback.*id).*

acl store-id_list urlpath_regex -i dl\.sourceforge\.net
acl store-id_list urlpath_regex -i \.ytimg\.com
acl store-id_list urlpath_regex -i \.(akamaihd|fbcdn)\.net
acl store_id_list urlpath_regex -i [a-zA-Z]{2}[0-9]*\.4shared\.com\/download\/

acl store_id_list_url url_regex ^http:\/\/[0-9]\.bp\.blogspot\.com.*\.(jpeg|jpg|png|gif|ico)
acl store_id_list_url url_regex ^http[s]?:\/\/.*\.twimg\.com\/(.*)\.(gif|jpeg|jpg|png|js|css)
acl store_id_list_url url_regex ^http[s]?:\/\/(media|static)\.licdn\.com\/.*\.(png|jpg|gif|woff)
acl store_id_list_url url_regex ^https:\/\/fb(static|cdn)\-.*\-a.akamaihd.net\/(.*)\.(gif|jpeg|jpg|png|js|css|mp4)
acl store_id_list_url url_regex ^http:\/\/.*\.ak\.fbcdn\.net\/.*\.(gif|jpg|png|js|mp4)

request_header_access Range deny store_id_list_yt
range_offset_limit 10 KB store_id_list_yt

acl loop_302 http_status 302
acl getmethod method GET

###############################################################################
# Recommended minimum Access Permission configuration:
#
# Deny requests to certain unsafe ports
###############################################################################
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localnet
http_access allow localhost
http_access deny all

###############################################################################
# squid ssl_bump option
###############################################################################
always_direct allow all
ssl_bump server-first all
sslproxy_cert_error deny all
sslproxy_flags DONT_VERIFY_PEER

sslcrtd_program /usr/lib/squid/ssl_crtd -s /var/lib/squid/ssl_db -M 4MB
sslcrtd_children 8 startup=1 idle=1

###############################################################################
# Squid normally listens to port 3128
###############################################################################
https_port 3130 tproxy ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/etc/squid/ssl_certs/squid.crt key=/etc/squid/ssl_certs/squid.key
http_port 3129 tproxy
http_port 3128

# TAG: Store-id Program
# -----------------------------------------------------------------------------
store_id_program /etc/squid/store-id.pl
store_id_children 100 startup=0 idle=1 concurrency=1000

# TAG: Store-id Access
# -----------------------------------------------------------------------------
store_id_access deny dontstore
store_id_access deny !getmethod
store_id_access allow store_id_list_yt
store_id_access allow store_yt_id
store_id_access allow store-id_list
store_id_access deny all
store_id_bypass on

# TAG: Youtube 302
# -----------------------------------------------------------------------------
store_miss deny store_id_list_yt loop_302
send_hit deny store_id_list_yt loop_302

###############################################################################
## MEMORY CACHE OPTIONS
###############################################################################
client_dst_passthru on
cache_mem 1024 MB
maximum_object_size_in_memory 1024 KB
memory_cache_shared off
memory_cache_mode disk
memory_replacement_policy heap GDSF

###############################################################################
## DISK CACHE OPTIONS
###############################################################################
cache_replacement_policy heap LFUDA
minimum_object_size 1 bytes
maximum_object_size 10 GB

###############################################################################
# Uncomment and adjust the following to add a disk cache directory.
###############################################################################
cache_dir aufs /cache-1 500000 16 256 # sesuaikan dengan drive penyimpanan cache
cache_dir aufs /cache-2 500000 16 256 # sesuaikan dengan drive penyimpanan cache
store_dir_select_algorithm round-robin
cache_swap_low 90
cache_swap_high 95

###############################################################################
# Leave coredumps in the first cache dir
###############################################################################
coredump_dir /var/spool/squid

###############################################################################
## LOGFILE OPTIONS
###############################################################################
#access_log daemon:/tmp/access.log !log
access_log /tmp/access.log squid
logfile_daemon /usr/lib/squid/log_file_daemon
cache_store_log none
logfile_rotate 1
mime_table /etc/squid/mime.conf
pid_filename /var/run/squid.pid
strip_query_terms off
buffered_logs off

###############################################################################
## OPTIONS FOR TROUBLESHOOTING
###############################################################################
#cache_log /tmp/cache.log
cache_log /dev/null
#debug_options ALL,1 22,3
coredump_dir /var/spool/squid

###############################################################################
## OPTIONS FOR TUNING THE CACHE
###############################################################################
max_stale 1 years
vary_ignore_expire on
shutdown_lifetime 10 seconds

###############################################################################
# Add any of your own refresh_pattern entries above these.
###############################################################################
refresh_pattern ^ftp:  1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0

# Youtube Video
refresh_pattern -i (get_video\?|videoplayback\?|videodownload\?|\.mp4|\.webm|\.flv|((audio|video)\/(webm|mp4))) 241920 100% 241920 override-expire ignore-reload ignore-private ignore-no-store ignore-must-revalidate reload-into-ims ignore-auth store-stale
refresh_pattern -i ^https?\:\/\/.*\.googlevideo\.com\/videoplayback.*     10080 99% 43200 override-lastmod override-expire ignore-reload reload-into-ims ignore-private reload-into-ims ignore-auth store-stale
refresh_pattern -i ^https?\:\/\/.*\.googlevideo\.com\/videoplayback.*$    241920 100% 241920 override-expire ignore-reload ignore-private ignore-no-store ignore-must-revalidate reload-into-ims ignore-auth store-stale

# Image Youtube
refresh_pattern -i (yimg|twimg)\.com\.*         1440 100% 129600 override-expire ignore-reload reload-into-ims
refresh_pattern -i (ytimg|ggpht)\.com\.*        1440 80% 129600 override-expire override-lastmod ignore-auth ignore-reload reload-into-ims

#images facebook
refresh_pattern -i fbcdn.*net\/.*\.((jp(e?g|e|2)|gif|pn[pg]|bm?|tiff?|ico|swf|css|js)|(jp(e?g|e|2)|gif|pn[pg]|bm?|tiff?|ico|swf|css|js)(\?|.*$)) 241920 99% 241920 ignore-no-store ignore-private override-expire override-lastmod reload-into-ims ignore-auth
refresh_pattern -i pixel\.facebook\.com.*\.(jpg|png|gif|ico|css|js) 241920 80% 241920 override-expire ignore-reload reload-into-ims ignore-auth
refresh_pattern -i \.akamaihd\.net.*\.(jpg|png|gif|ico|css|js) 241920 80% 241920 override-expire ignore-reload reload-into-ims ignore-auth
refresh_pattern -i ((facebook.com)|(85.131.151.39))\.(jpg|png|gif) 241920 99% 241920 ignore-reload override-expire ignore-no-store store-stale
refresh_pattern -i fbcdn\.net\/.*\.((jp(e?g|e|2)|gif|pn[pg]|bm?|tiff?|ico|swf|css|js)|(jp(e?g|e|2)|gif|pn[pg]|bm?|tiff?|ico|swf|css|js)(\?|.*$)) 241920 99% 241920 ignore-no-store ignore-private override-expire override-lastmod reload-into-ims ignore-auth
refresh_pattern static\.(xx|ak)\.fbcdn\.net*\.(jpg|gif|png) 241920 99% 241920 ignore-reload override-expire ignore-no-store
refresh_pattern ^https?\:\/\/profile\.ak\.fbcdn.net*\.(jpg|gif|png) 241920 99% 241920 ignore-reload override-expire ignore-no-store

# Video Facebook
refresh_pattern -i \.video.ak.fbcdn.net.*\.(mp4|flv|mp3|amf)                    10080 80% 43200 override-expire ignore-reload reload-into-ims ignore-private ignore-no-store ignore-must-revalidate
refresh_pattern (audio|video)\/(webm|mp4) 129600 99% 129600 ignore-reload override-expire override-lastmod ignore-must-revalidate  ignore-private ignore-no-store ignore-auth store-stale
refresh_pattern -i ^http://.*squid\.internal.*  241920 100% 241920 override-lastmod override-expire ignore-reload ignore-must-revalidate ignore-private ignore-no-store ignore-auth store-stale

# All File
refresh_pattern -i \.(3gp|7z|ace|asx|bin|deb|divx|dvr-ms|ram|rpm|exe|inc|cab|qt) 10080 80% 10080 override-expire override-lastmod reload-into-ims
refresh_pattern -i \.(rar|jar|gz|tgz|bz2|iso|m1v|m2(v|p)|mo(d|v)|arj|lha|lzh|zip|tar|iop|nzp|pak|mar|msp) 10080 80% 10080 override-expire override-lastmod reload-into-ims ignore-reload
refresh_pattern -i \.(jp(e?g|e|2)|gif|pn[pg]|bm?|tiff?|ico|swf|dat|ad|txt|dll) 10080 80% 10080 override-expire override-lastmod reload-into-ims
refresh_pattern -i \.(avi|ac4|mp(e?g|a|e|1|2|3|4)|mk(a|v)|ms(i|u|p)|og(x|v|a|g)|rm|r(a|p)m|snd|vob|webm) 10080 80% 10080 override-expire override-lastmod reload-into-ims
refresh_pattern -i \.(pp(t?x)|s|t)|pdf|rtf|wax|wm(a|v)|wmx|wpl|cb(r|z|t)|xl(s?x)|do(c?x)|flv|x-flv) 10080 80% 10080 override-expire override-lastmod reload-into-ims
refresh_pattern .  0 20% 4320

###############################################################################
## ADMINISTRATIVE PARAMETERS
###############################################################################
cache_mgr eko.hendratno@gmail.com
cache_effective_user proxy
cache_effective_group proxy
visible_hostname gtw.home.lan
unique_hostname gtw.home.lan

###############################################################################
## PERSISTENT CONNECTION HANDLING
###############################################################################
detect_broken_pconn on
client_persistent_connections off
server_persistent_connections on

###############################################################################
## ERROR PAGE OPTIONS
###############################################################################
error_directory /usr/share/squid/errors/en
error_log_languages off

###############################################################################
## DNS OPTIONS
###############################################################################
check_hostnames off
hosts_file /etc/hosts
connect_retries 2
ipcache_low 90
ipcache_high 95
ipcache_size 10024                        # 2x Besar RAM
fqdncache_size 7024                        # real RAM Hardware
pipeline_prefetch 100

###############################################################################
## MISCELLANEOUS
###############################################################################
memory_pools off
reload_into_ims on
uri_whitespace strip
max_filedescriptors 65536



=================================
nano /etc/squid /store-id.pl
=================================
#!/usr/bin/perl
###########################
#
# Store-ID dengan asumsi chanel berapapun
#
###########################
$|=1;
while (<>) {
my $chan = "";
if (s/^(\d+\s+)//o) {
$chan = $1;
}
$_ =~ s/(\s+.+)//o;

if ($_ =~ m/^https?\:\/\/.*youtube.*(ptracking|stream_204|player_204|gen_204).*(video_id|docid|v)\=([^\&\s]*).*/){
        $vid = $3 ;
        @cpn = m/[&?]cpn\=([^\&\s]*)/;
                $fn = "/var/log/squid3/@cpn";
                unless (-e $fn) {
                        open FH,">".$fn ;
                        print FH "$vid\n";
                        close FH;
                }
        print $chan, "ERR\n" ;

} elsif ($_ =~ m/^https?\:\/\/.*(youtube|google).*videoplayback.*/){
        @itag = m/[&?](itag=[0-9]*)/;
        @ids = m/[&?]id\=([^\&\s]*)/;
        @mime = m/[&?](mime\=[^\&\s]*)/;
        @cpn = m/[&?]cpn\=([^\&\s]*)/;
        @range = m/[&?](range=[^\&\s]*)/;
        if (defined($cpn[0])) {
            $fn = "/var/log/squid3/@cpn";
            if (-e $fn) {
                open FH,"<".$fn ;
                $id  = ;
                chomp $id ;
                close FH ;
                  } else {
                $id = $ids[0] ;
            }
        print $chan, "OK store-id=http://googlevideo.squid.internal/id=" . $id . "&@itag@range@mime\n" ;
        } else {
        print $chan, "ERR\n" ;
        }

} elsif ($_ =~ m/^http:\/\/(videos|photos|scontent)[\-a-z0-9\.]*instagram\.com\/hphotos[\-a-z0-9]*\/([\w\d\-\_\/\.]*.(mp4|jpg))/){
        print $chan, "OK store-id=http://instagram.squid.internal/$2\n" ;
} elsif ($_ =~ m/^http:\/\/distilleryimage[\-a-z0-9\.]*instagram\.com\/(.*)/){
        print $chan, "OK store-id=http://instagram.squid.internal/$1\n" ;

} elsif ($_ =~ m/^https?:\/\/.*\.steampowered\.com\/depot\/[0-9]+\/chunk\/([^\?]*)/){
        print $chan, "OK store-id=http://steampowered.squid.internal/$1\n" ;

} elsif ($_ =~ m/^https?:\/\/.*(fbcdn|akamaihd)\.net\/.*\/(.*\.mp4)(.*)/) {
        print $chan, "OK store-id=storeurl://facebook.squid.internal/$2\n" ;

} elsif ($_ =~ m/^https?:\/\/.*(static|profile).*a\.akamaihd\.net(\/static-ak\/rsrc\.php\/v[0-9]\/(.*\.(mp4|jpg|bmp|png|flv|m4v|gif|jpeg)))/) {
        print $chan, "OK store-id=http://facebook.squid.internal/$3\n" ;
} elsif ($_ =~ m/^https?:\/\/.*(static|profile).*\.ak\.fbcdn\.net(\/static-ak\/rsrc\.php\/v[0-9]\/(.*\.(mp4|jpg|bmp|png|flv|m4v|gif|jpeg)))/) {
        print $chan, "OK store-id=http://facebook.squid.internal/$3\n" ;
} elsif ($_ =~ m/^https?:\/\/.*(static|profile).*a\.akamaihd\.net(\/rsrc\.php\/v[0-9]\/(.*))/) {
        print $chan, "OK store-id=http://facebook.squid.internal/$3\n" ;
} elsif ($_ =~ m/^https?:\/\/.*(static|profile).*\.ak\.fbcdn\.net(\/rsrc\.php\/v[0-9]\/(.*))/) {
        print $chan, "OK store-id=http://facebook.squid.internal/$3\n" ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*(fbcdn|akamaihd)[^\/]*net\/rsrc\.php\/(.*\.(mp4|jpg|bmp|png|flv|m4v|gif|jpeg))/) {
        print $chan, "OK store-id=http://facebook.squid.internal/$2\n" ;

} elsif ($_ =~ m/^https?:\/\/[^\/]*(fbcdn|akamaihd)[^\/]*net\/safe\_image\.php\?.*(url\=.*\.(mp4|jpg|bmp|png|flv|m4v|gif|jpeg)).*/) {
        print $chan, "OK store-id=http://facebook.squid.internal/$2\n" ;
} elsif ($_ =~ m/^https?:\/\/i[0-2].wp\.com\/graph\.facebook\.com\/(.*)/) {
        print $chan, "OK store-id=http://facebook.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/(video\.ak\.fbcdn\.net)\/(.*?)\/(.*\.mp4)\??.*$/) {
        print $chan, "OK store-id=http://facebook.squid.internal/$1/$3\n" ;
} elsif ($_ =~ m/^https?:\/\/video\.(.*)\.fbcdn\.net\/(.*?)\/([0-9_]+\.(mp4|flv|avi|mkv|m4v|mov|wmv|3gp|mpg|mpeg)?)(.*)/) {
        print $chan, "OK store-id=http://facebook.squid.internal/$3\n" ;
} elsif ($_ =~ m/^https?:\/\/(fbcdn|scontent).*(akamaihd|fbcdn)\.net\/(h|s)(profile|photos).*\/((p|s).*\.(png|gif|jpg))(\?.+)?$/){
        print $chan, "OK store-id=http://facebook.squid.internal/$5\n" ;
} elsif ($_ =~ m/^https?:\/\/(fbcdn|scontent).*(akamaihd|fbcdn)\.net\/(h|s)(profile|photos).*\/(.*\.(png|gif|jpg))(\?.+)?$/){
        print $chan, "OK store-id=http://facebook.squid.internal/$5\n" ;

} elsif ($_ =~ m/^https?:\/\/attachment\.fbsbx\.com\/.*\?(id=[0-9]*).*/) {
        print $chan, "OK store-id=http://facebook.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https:\/\/.*\.google\.com\/chrome\/win\/.+\/(.*\.exe)/){
        print $chan, "OK store-id=http://update-google.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/.*\.ytimg\.com\/(.*\.(webp|jpg|gif))/){
        print $chan, "OK store-id=http://ytimg.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/.*firedrive\.com\/download\/[0-9]+\/[0-9]+\/.*\?h=.*e\=.*f\=(.*)\&.*/){
        print $chan, "OK store-id=http://firedrive.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/.*\.4shared\.com\/.*\/dlink__[23]F([\w]+)_[23]F(.*)\_3Ftsid_[\w].*/){
        print $chan, "OK store-id=http://4shared.squid.internal/$2\n" ;
} elsif ($_ =~ m/^https?:\/\/.*\.4shared\.com\/download\/([^\/]*).*/){
        print $chan, "OK store-id=http://4shared.squid.internal/$1\n" ;

} elsif ($_ =~ m/^https?:\/\/.*\.[a-z]+\.bing\.net\/(.*)\&w=.*/){
        print $chan, "OK store-id=http://bing.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/.*\.bing\.(net|com)\/.*\?id=([a-zA-Z]\.[0-9]+)&pid=.*/){
        print $chan, "OK store-id=http://bing.squid.internal/$2\n" ;
} elsif ($_ =~ m/^https?:\/\/.*\.gstatic\.com\/images\?q=tbn\:(.*)/){
        print $chan, "OK store-id=http://gstatic.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/.*\.reverbnation\.com\/.*\/(ec_stream_song|download_song_direct|stream_song)\/([0-9]*).*/){
        print $chan, "OK store-id=http://reverbnation.squid.internal/$2\n" ;
} elsif ($_ =~ m/^https?:\/\/.*\.dl\.sourceforge\.net\/(.*\.(exe|zip|mp3|mp4))/){
        print $chan, "OK store-id=http://sourceforge.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/fs[0-9]+\.filehippo\.com\/[^\/]*\/[^\/]*\/(.*)/){
        print $chan, "OK store-id=http://filehippo.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/download[0-9]+.mediafire\.com\/.*\/\w+\/(.*)/){
        print $chan, "OK store-id=http://mediafire.squid.internal$1\n" ;
} elsif ($_ =~ m/^https?:\/\/.*android\.clients\.google\.com\/[a-z]+\/[a-zA-Z]+\/[a-zA-Z]+\/(.*)\/([0-9]+)\?.*/){
        print $chan, "OK store-id=http://android.squid.internal/$1/$2\n" ;
} elsif ($_ =~ m/^https?:\/\/.*(googleusercontent.com|blogspot.com)\/(.*)\/([a-z0-9]+)(-[a-z]-[a-z]-[a-z]+)?\/(.*\.(jpg|png))/){
        print $chan, "OK store-id=http://googleusercontent.squid.internal/$5\n" ;
} elsif ($_ =~ m/^https?:\/\/global-shared-files-[a-z][0-9]\.softonic\.com\/.{3}\/.{3}\/.*\/.*\=(.*\.exe)/){
        print $chan, "OK store-id=http://softonic.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/.*netmarble\.co\.id\/.*\/(data|ModooMarble)\/(.*)/){
        print $chan, "OK store-id=http://netmarble.squid.internal/$2\n" ;
} elsif ($_ =~ m/^https?:\/\/(.*)\.windowsupdate\.com\/(.*)\/(.*)\/([a-z].*)/){
        print $chan, "OK store-id=http://windowsupdate.squid.internal/$4\n" ;
} elsif ($_ =~ m/^https?:\/\/.*filetrip\.net\/.*\/((.*)\.([^\/\?\&]{2,4}))\?.*$/){
        print $chan, "OK store-id=http://filetrip.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/.*get4mobile\.net\/.*f=([^\/\?\&]*).*$/){
        print $chan, "OK store-id=http://get4mobile.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/.*thestaticvube\.com\/.*\/(.*)/){
        print $chan, "OK store-id=http://thestaticvube.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/113\.6\.235\.171\/youku\/.*\/(.*\.flv)/){
        print $chan, "OK store-id=http://youku.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/\d+\.\d+\.\d+\.\d+\/drama\/(.*\.mp4)\?.*\=(\d+)/){
        print $chan, "OK store-id=http://drama.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/([a-z])[\d]{1,2}?(.gstatic\.com.*|\.wikimapia\.org.*)/){
        print $chan, "OK store-id=http://gstatic.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/.*\.[a-z][0-9]\.(tiles\.virtualearth\.net)\/(.*\&n=z)/){
        print $chan, "OK store-id=http://virtualearth.squid.internal/$2\n" ;
} elsif ($_ =~ m/^https?:\/\/imgv2-[0-9]\.scribdassets\.com\/(.*)/){
        print $chan, "OK store-id=http://scribdassets.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/(.*?)\/(archlinux\/[a-zA-Z].*\/os\/.*)/){
        print $chan, "OK store-id=http://archlinux.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/(.*?)\/speedtest\/(.*\.(jpg|txt))\??.*$/){
        print $chan, "OK store-id=http://speedtest.squid.internal/$2\n" ;
} elsif ($_ =~ m/^https?:\/\/i[1-9]{3}\.photobucket\.com\/(.*)/){
        print $chan, "OK store-id=http://photobucket.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/i[1-9]{4}\.photobucket\.com\/(.*)/){
        print $chan, "OK store-id=http://photobucket.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/avideos\.5min\.com\/.*\/(.*)\?.*/){
        print $chan, "OK store-id=http://avideos.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/.*\.catalog\.video\.msn\.com\/.*\/(.*\.(mp4|flv|m4v))/){
        print $chan, "OK store-id=http://msn-video.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/v\.imwx\.com\/.*\/(.*)\?.*/){
        print $chan, "OK store-id=http://imwx.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/video[0-9]\.break\.com\/.*\/(.*)\?.*/){
        print $chan, "OK store-id=http://break.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/.*\.video[0-9]\.blip\.tv\/.*\/(.*)\?.*/){
        print $chan, "OK store-id=http://blip.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/ss[0-9]\.vidivodo\.com\/vidivodo\/vidservers\/server[0-9]*\/videos\/.*\/([a-zA-Z0-9.]*)\?.*/){
        print $chan, "OK store-id=http://vidivodo.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/video\-http\.media\-imdb\.com\/([a-zA-Z0-9\@\_\-]+\.(mp4|flv|m4v))\?.*/){
        print $chan, "OK store-id=http://imdb-video.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/(vl|v)\.mccont\.com\/(.*)\/(.*\.(mp4|m4v|flv))\?.*/){
        print $chan, "OK store-id=http://mccont.squid.internal/$3\n" ;
} elsif ($_ =~ m/^https?:\/\/(vid.{0,2}|proxy.*)(\.ak|\.ec|\.akm|)\.(dmcdn\.net|dailymotion\.com)\/.*\/(frag.*\.(flv|mp4|m4v)).*/){
        print $chan, "OK store-id=http://dailymotion.squid.internal/$4\n" ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.vimeo[^\/]*\.com.*\/([[^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg|web))\?.*/){
        print $chan, "OK store-id=http://vimeo.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/fcache\.veoh\.com\/.*\/.*(l[0-9]*\.(mp4|flv))\?.*/){
        print $chan, "OK store-id=http://veoh.squid.internal$1\n" ;
} elsif ($_ =~ m/^https?:\/\/video\.thestaticvube\.com\/.*\/(.*)/){
        print $chan, "OK store-id=http://thestaticvube.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/cdn[0-9]\.videos\.videobash\.com\/.*\/(.*\.(mp4|m4v|flv))\?.*/){
        print $chan, "OK store-id=http://videobash.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.phncdn[^\/]*\.com.*\/([[^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
        print $chan, "OK store-id=http://phncdn.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/.*\.xvideos\.com\/.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
        print $chan, "OK store-id=http://xvideos.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.tube8[^\/]*\.com.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
        print $chan, "OK store-id=http://tube8.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/.*\.(redtube|redtubefiles)\.com\/.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
        print $chan, "OK store-id=http://redtube.squid.internal/$2\n" ;
} elsif ($_ =~ m/^https?:\/\/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/.*\/xh.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))/){
        print $chan, "OK store-id=http://xhcdn.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.xhcdn[^\/]*\.com.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
        print $chan, "OK store-id=http://xhcdn.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.nsimg[^\/]*\.net.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
        print $chan, "OK store-id=http://nsimg.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/.*\.youjizz\.com.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
        print $chan, "OK store-id=http://youjizz.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.public\.keezmovies[^\/]*\.com.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
        print $chan, "OK store-id=http://keezmovies.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.youporn[^\/]*\.com.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
        print $chan, "OK store-id=http://youporn.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.spankwire[^\/]*\.com.*\/([^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
        print $chan, "OK store-id=http://spankwire.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.pornhub[^\/]*\.com.*\/([[^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
        print $chan, "OK store-id=http://pornhub.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.us.playvid[^\/]*\.com.*\/([[^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
        print $chan, "OK store-id=http://playvid.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.slutload-media[^\/]*\.com.*\/([[^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
        print $chan, "OK store-id=http://slutload-media.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.hardsextube[^\/]*\.com.*\/([[^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
        print $chan, "OK store-id=http://hardsextube.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*\.public\.extremetube[^\/]*\.com.*\/([[^\/]*\.(flv|mp4|avi|mkv|mp3|rm|rmvb|m4v|mov|wmv|3gp|mpg|mpeg))\?.*/){
        print $chan, "OK store-id=http://extremetube.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/([a-z0-9.]*)(\.doubleclick\.net|\.quantserve\.com|.exoclick\.com|interclick.\com|\.googlesyndication\.com|\.auditude\.com|.visiblemeasures\.com|yieldmanager|cpxinteractive)(.*)/){
        print $chan, "OK store-id=http://ads.squid.internal/$3\n" ;
} elsif ($_ =~ m/^https?:\/\/(.*?)\/(ads)\?(.*?)/){
        print $chan, "OK store-id=http://ads.squid.internal/$3\n" ;
} elsif ($_ =~ m/^https?:\/\/[^\/]*phobos\.apple\.com\/.*\/([^\/]*\.ipa)/){
        print $chan, "OK store-id=http://apple.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/fs\w*\.fileserve\.com\/file\/(\w*)\/[\w-]*\.\/(.*)/){
        print $chan, "OK store-id=http://fileserve.squid.internal/$2\n" ;
} elsif ($_ =~ m/^https?:\/\/s[0-9]*\.filesonic\.com\/download\/([0-9]*)\/(.*)/){
        print $chan, "OK store-id=http://filesonic.squid.internal/$2\n" ;
} elsif ($_ =~ m/^https?:\/\/download[0-9]{3}\.avast\.com\/(.*)/){
        print $chan, "OK store-id=http://avast.squid.internal/41\n" ;
} elsif ($_ =~ m/^https?:\/\/[a-zA-Z0-9]+\.[a-zA-Z0-9]+x\.[a-z]\.avast\.com\/[a-zA-Z0-9]+x\/(.*\.vpx)/){
        print $chan, "OK store-id=http://avast.squid.internal\$1\n" ;
} elsif ($_ =~ m/^https?:\/\/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\/(iavs.*)/){
        print $chan, "OK store-id=http://iavs.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/.*\.starhub\.com\/[a-z]+\/[a-z]+\/[a-z]+\/(.*exe)\?[0-9]/){
        print $chan, "OK store-id=http://starhub.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/dnl-[0-9]{2}\.geo\.kaspersky\.com\/(.*)/){
        print $chan, "OK store-id=http://kaspersky.squid.internal/$1\n" ;
} elsif ($_ =~ m/^https?:\/\/([^\.]*)\.yimg\.com\/(.*)/){
        print $chan, "OK store-id=http://yimg.squid.internal/$1\n" ;
} else {
        print $chan, "ERR\n" ;
}
}
=================================
nano /etc/init.d/squid
=================================
#! /bin/sh
#
# squid        Startup script for the SQUID HTTP proxy-cache.
#
# Version:    @(#)squid.rc  2.20  01-Oct-2001  miquels@cistron.nl
#
### BEGIN INIT INFO
# Provides:          squid
# Required-Start:    $local_fs $network
# Required-Stop:     $local_fs $network
# Should-Start:      $named
# Should-Stop:       $named
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Squid HTTP Proxy
### END INIT INFO

NAME=squid
DAEMON=/usr/sbin/squid
LIB=/usr/lib/squid
PIDFILE=/var/run/squid.pid
# export LD_PRELOAD=/usr/local/lib/libjemalloc.so # ini apabila anda menggunakan jemalloc
SQUID_ARGS="-YC"

[ ! -f /etc/default/squid ] || . /etc/default/squid

. /lib/lsb/init-functions

PATH=/bin:/usr/bin:/sbin:/usr/sbin

[ -x $DAEMON ] || exit 0

grepconf () {
    w="     " # space tab
    sq=/etc/squid/squid.conf
    # sed is cool.
    res=`sed -ne '
        s/^'$1'['"$w"']\+\([^'"$w"']\+\).*$/\1/p;
        t end;
        d;
        :end q' < $sq`
    [ -n "$res" ] || res=$2
    echo "$res"
}

grepconf2 () {
    w="     " # space tab
    sq=/etc/squid/$NAME.conf
    # sed is cool.
    res=`sed -ne '
        s/^'$1'['"$w"']\+[^'"$w"']\+['"$w"']\+\([^'"$w"']\+\).*$/\1/p;
        t end;
        d;
        :end q' < $sq`
    [ -n "$res" ] || res=$2
    echo "$res"
}

#
#    Try to increase the # of filedescriptors we can open.
#
maxfds () {
    [ -n "$SQUID_MAXFD" ] || return
    [ -f /proc/sys/fs/file-max ] || return 0
    global_file_max=`cat /proc/sys/fs/file-max`
    minimal_file_max=$(($SQUID_MAXFD + 4096))
    if [ "$global_file_max" -lt $minimal_file_max ]
    then
        echo $minimal_file_max > /proc/sys/fs/file-max
    fi
    ulimit -n $SQUID_MAXFD
}

start () {
    cdr=`grepconf2 cache_dir /cache-1`
    ctp=`grepconf cache_dir ufs`

    case "$cdr" in
        [0-9]*)
            log_failure_msg "squid: squid.conf contains 2.2.5 syntax - not starting!"
            log_end_msg 1
            exit 1
            ;;
    esac
   
    #
    # Create spool dirs if they don't exist.
    #
    if [ -d "$cdr" -a ! -d "$cdr/00" ] || [ "$ctp" = "coss" -a ! -w "$cdr" ]
    then
        log_warning_msg "Creating squid cache structure"
        $DAEMON $SQUID_ARGS -z
    fi

    if [ "$CHUID" = "" ]; then
        CHUID=root
    fi

    maxfds
    umask 027
    start-stop-daemon --quiet --start \
        --pidfile $PIDFILE \
        --chuid $CHUID \
        --exec $DAEMON -- $SQUID_ARGS < /dev/null
    return $?
}

stop () {
    PID=`cat $PIDFILE 2>/dev/null`
    start-stop-daemon --stop --quiet --pidfile $PIDFILE --name squid
    #
    #    Now we have to wait until squid has _really_ stopped.
    #
    sleep 2
    if test -n "$PID" && kill -0 $PID 2>/dev/null
    then
        log_action_begin_msg " Waiting"
        cnt=0
        while kill -0 $PID 2>/dev/null
        do
            cnt=`expr $cnt + 1`
            if [ $cnt -gt 24 ]
            then
                log_action_end_msg 1
                return 1
            fi
            sleep 5
            log_action_cont_msg ""
        done
        log_action_end_msg 0
        return 0
    else
        return 0
    fi
}

case "$1" in
    start)
    log_daemon_msg "Starting Squid HTTP proxy" "squid"
    if start ; then
        log_end_msg $?
    else
        log_end_msg $?
    fi
    ;;
    stop)
    log_daemon_msg "Stopping Squid HTTP proxy" "squid"
    if stop ; then
        log_end_msg $?
    else
        log_end_msg $?
    fi
    ;;
    reload|force-reload)
    log_action_msg "Reloading Squid configuration files"
    $DAEMON -k reconfigure
    log_action_end_msg 0
    ;;
    restart)
    log_daemon_msg "Restarting Squid HTTP proxy" "squid"
stop
    if start ; then
        log_end_msg $?
    else
        log_end_msg $?
    fi
    ;;
    status)
    status_of_proc -p "$PIDFILE" "$DAEMON" squid && exit 0 || exit $?
    ;;
    *)
    echo "Usage: /etc/init.d/$NAME {start|stop|reload|force-reload|restart|status}"
    exit 3
    ;;
esac

exit 0


=================================
chmod +x store-id.pl
chmod +x squid
chown proxy:proxy /cache-1
chown proxy:proxy /cache-2 &&
chmod 777 /cache-1 &&
chmod 777 /cache-2
squid -f /etc/squid/squid.conf -z

sysv-rc-conf squid default

=================================
nano /etc/rc.local
=================================
#0
iptables -A POSTROUTING -t nat -j MASQUERADE -o eth0
#1
iptables -t mangle -F
iptables -t mangle -X
#2
echo 0 > /proc/sys/net/ipv4/conf/lo/rp_filter
echo 1 > /proc/sys/net/ipv4/ip_forward
#3
ip rule add fwmark 1 lookup 100
ip route add local 0.0.0.0/0 dev lo table 100
#4
iptables -t mangle -N DIVERT
iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT
#5
iptables -t mangle -A DIVERT -j MARK --set-mark 1
iptables -t mangle -A DIVERT -j ACCEPT
#6
iptables -t mangle -A PREROUTING -p tcp --dport 80 -j TPROXY --tproxy-mark 0x1/0x1 --on-port 3129
iptables -t mangle -A PREROUTING -p tcp --dport 443 -j TPROXY --tproxy-mark 0x1/0x1 --on-port 3130
#7
squid start
exit 0
===================================================================================================
squid -k parse
squid -k reconfigure
squid -z
squid start

tail -f /tmp/access.log | ccze

Cara menambah fitur sms verifikasi pada form registrasi member web anda


Apa yang dimaksud dengan SMS Verifikasi?
 
SMS Verifikasi adalah fitur sms memberikan kepastian bahwa nomor handphone yang digunakan oleh seorang User tersebut benar-benar aktif. Ketika sebuah form yang ada pada aplikasi atau web diisi bersama nomor handphone yang digunakan User, SMS Verifikasi pun dikirimkan kepada nomor handphone yang di inputkan User pada form tersebut. SMS Verifikasi berisikan kode verifikasi dimana sang User dapat mengkonfirmasikannya dengan mengetikannya pada laman pengecekan/verifikasi.
Kenapa harus menggunakan SMS Verifikasi?
Apabila anda memiliki web dan ingin memastikan member yang ada pada website anda dapat dihubungi untuk beberapa keperluan dan memastikan akun user yang akan mendaftar bukan bot yang mencoba untuk menyerang website anda.

Siapa saja yang menggunakan SMS Verifikasi?
1. Google
selain dikenal melalui search enginenya, google juga memiliki fitur email bernama GMAIL yang pada tahun 2013 berjumlah sekitar 425 juta di dunia. GMAIL sendiri menggunakan verifikasi via sms ketika user pertama kali mendaftar untuk mendapatkan akun emailnya dan sekarang menerapkan sistem keamanan ganda berupa aplikasi bernama Google authenticator dan SMS gateway sebagai kunci untuk dapat masuk ke akun google anda.
2. Twitter
 Selain Google twitter juga menerapkan sistem keamanan ganda untuk para pengguna twitter agar dapat mengakses twitter.
3. Whatsapp. Messaging App dengan jumlah terbanyak di dunia pada tahun ini dengan pengguna sekitar 350 juta orang jatuh pada whatsapp, Whatsapp adalah aplikasi online messaging multi platform yang dapat berjalan pada Android OS, iOs, Windows Mobile OS dan Symbian Os. Dengan jumlah pengguna sebanyak itu, Whatsapp menerapkan sistem SMS Verifikasi untuk memastikan Akun yang baru akan dibuat memang terbukti valid.

Nah, terbukti layanan-layanan tersebut menggunakan fitur SMS Verifikasi untuk memastikan keabsahan nomor handphone penggunanya. Kini, bagi anda yang memiliki  website dengan hak akses membership juga dapat menggunakan fitur SMS Verifikasi juga. Sebelum mulai menggunakan fitur ini pada website anda, ada baiknya anda memahami terlebih dahulu cara kerja dari SMS Verifikasi. Berikut Penjelasannya :
Cara kerja :
1. User mengisi form pendaftaran dan menginputkan nomor handphone asli untuk selanjutnya dikirimkan SMS Verifikasi.
2. User mendapatkan SMS berisi Kode Verifikasi yang selanjutnya akan di isi pada halaman web untuk melengkapi registrasi.
3. User mengisi kolom verifikasi dengan kode yang tertera pada SMS dan kemudian melengkapi  registrasi sekaligus resmi menjadi member yang terdaftar. Apabila kode verifikasi yang diketikan oleh user tidak sesuai dengan apa yang ada pada isi SMS Verifikasi, maka User harus menginputkan kembali kode yang benar.
Berikut ini adalah tutorial untuk menambahkan fitur sms verifikasi berupa kode verifikasi yang akan diterima oleh calon member dan selanjutnya akan di inputkan pada kolom verifikasi untuk melengkapi registrasi dan menjadi member yang terdaftar.
1. Untuk bisa memiliki fasilitas SMS pada web atau blog Anda harus mempunyai SMS gateway berfunsi sebagai pengirim SMS secara otomatis begitu ada pengunjung yang melakukan pendaftaran. Namun jangan khawatir Anda tidak perlu membeli software SMS gateway. Saya menggunakan SMS gateway online, silahkan daftar disini GRATIS!

2. Buatlah halaman html bernama reg.html dan isikan dengan script berikut :





Untitled Document




 

Form Registrasi Member


 
 

   
      Nama :
     
   
   
      Alamat :
     
   
   
      Email :
     
   
   
      *No. Handphone :
     
   
   
      Username :
     
   
   
      Password :
     
   
   
       
     
     
   
 
  *Silahkan masukkan nomor handphone yang anda gunakan untuk menerima kode verifikasi.




3.Berikut bentuk tampilan dari halaman reg.html



4.Kalau sudah, buat halaman php dan beri nama send.php dan isikan dengan script berikut.


$nohp=$_POST['nohp'];
$kode="182654"; //isikan sesuai dengan keinginan anda, tapi jangan masukkan huruf. hanya digit angka.
// Script Kirim SMS Api Zenziva
$userkey="userkeyanda"; // userkey lihat di zenziva
$passkey="passkeyanda"; // set passkey di zenziva
$message="Silahkan masukkan kode $kode pada kolom verifikasi untuk melengkapi registrasi anda. terima kasih.";

$url = "http://zenziva.com/apps/smsapi.php";
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, 'userkey='.$userkey.'&passkey='.$passkey.'&nohp='.$nohp.'&pesan='.urlencode($message));
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_TIMEOUT,30);
curl_setopt($curlHandle, CURLOPT_POST, 1);
$results = curl_exec($curlHandle);
curl_close($curlHandle);

header("location: inputver.html");
?>

Halaman send.php berfungsi untuk mengirimkan sms verifikasi sekaligus mengarahkan user ke halaman input kode verifikasi.
 
5. Kemudian untuk membuat halaman dimana user menginputkan kode verifikasi, buatlah halaman html dan beri nama inputver.html. kemudian isikan dengan kode berikut :



Untitled Document




  SMS Verifikasi telah dikirim.
  Silahkan input kode verifikasi pada kolom dibawah ini :
 
 
   
   
 



6. Untuk melakukan verifikasi apakah kode yang dimasukkan benar atau salah, buatlah halaman php bernama verify.php dan isikan dengan script berikut :

$kode=$_POST['kodever'];
if($kode==182654) //isikan angka kode yang sesuai dengan yang ada pada halaman send.php
{
header("location: dasbor.php");
}
else{
header("location: cobalagi.php");
}
?>

7. Buatlah halaman cobalagi.php untuk menampilkan user salah menginputkan kode verifikasi dan isikan script berikut :



Untitled Document




  Kode yang anda masukkan salah.
  Silahkan input kembali kode verifikasi anda :
 
 
   
   
 



8. Dan untuk menampilkan halaman dasbor user apabila user memasukkan kode verifikasi dengan benar, maka buat halaman bernama dasbor.php dan inputkan script berikut :



registrasi berhasil




  home
  profil
  forum
  logout

Selamat datang, anda telah berhasil registrasi dan terdaftar sebagai member kami



Userkey dan passkey dapat dilihat di halaman dashboard zenziva setelah melakukan login.




Calon member akan menerima SMS berupa kode verifikasi setelah melakukan registrasi. Setelah Calon member mendaftar pada halaman reg.html, otomatis Calon member mendapatkan sms berupa kode verifikasi. Dan pada inputver.html, User menginputkan kode verifikasi sesuai dengan apa yang ada pada isi sms verifikasi dan kemudian melengkapi registrasi juga menjadi member baru yang terdaftar. Sekarang website Anda telah dilengkapi dengan fitur SMS.

Provisioning CISCO SIP / IP Phones SPA 5xx Series

Hardware yang akan di provisioning  adalah Cisco IP Phone SPA502G, tapi research ini bisa di implementasi pada semua produk Cisco IP Phone SPA 500 Series. Berikut spesifikasinya:

Data networking
● MAC address (IEEE 802.3)
● IPv4 (RFC 791)
● Address Resolution Protocol (ARP)
● DNS: A record (RFC 1706), SRV record (RFC 2782)
● Dynamic Host Configuration Protocol (DHCP) client (RFC 2131)
● Internet Control Message Protocol (ICMP) (RFC 792)
● TCP (RFC 793)
● User Datagram Protocol (UDP) (RFC 768)
● Real-Time Transport Protocol (RTP) (RFC 1889, 1890)
● Real-Time Control Protocol (RTCP) (RFC 1889)
● Differentiated Services (DiffServ) (RFC 2475)
● Type of service (ToS) (RFC 791, 1349)
● VLAN tagging 802.1p/Q: Layer 2 quality of service (QoS)
● Simple Network Time Protocol (SNTP) (RFC 2030)

Voice gateway
● SIP version 2 (RFC 3261, 3262, 3263, 3264)
● SPCP with the Cisco Unified Communications 500 Series
● SIP proxy redundancy: dynamic via DNS SRV, A records
● Reregistration with primary SIP proxy server
● SIP support in NAT networks (including STUN)
● SIPFrag (RFC 3420)
● Secure (encrypted) calling via SRTP
● Codec name assignment
● Voice algorithms:
◦G.711 (A-law and μ-law)
◦G.726 (16/24/32/40 kbps)
◦G.729 A
◦G.722
● Dynamic payload support
● Adjustable audio frames per packet
● Dual-tone multifrequency (DTMF), in-band and out-of-band (RFC 2833) (SIP INFO)
● Flexible dial plan support with interdigit timers
● IP address/URI dialing support
● Call progress tone generation
● Jitter buffer: adaptive
● Frame loss concealment
● Comfort Noise Generation (CNG)
● Voice activity detection (VAD) with silence suppression
● Attenuation/gain adjustments
● VMWI - Voicemail Waiting Indicator, via NOTIFY, SUBSCRIBE
● Caller ID support (name and number)
● Third-party call control (RFC 3725)

Provisioning, administration, and maintenance
● Integrated web server provides web-based administration and configuration
● Telephone keypad configuration via display menu/navigation
● Automated provisioning and upgrade via HTTPS, HTTP, TFTP
● Asynchronous notification of upgrade availability via NOTIFY
● Nonintrusive in-service upgrades
● Report generation and event logging
● Statistics transmitted in BYE message
● Syslog and debug server records: configurable per line

Power supply
● Power supply is optional and is purchased separately
◦Models: Cisco PA100-NA, PA100-EU, PA100-UK, PA100-AU
● Switching type (100-240V) automatic
● DC output voltage: +5 VDC at 2.0A maximum
● Power adapter: 100-240V 50-60 Hz (26-34 VA) AC input

Physical interfaces
● Two 10/100BASE-T RJ-45 Ethernet ports (IEEE 802.3)
● Handset: RJ-9 connector
● Built-in speakerphone and microphone
● Headset 2.5mm jack

Indicator lights/LEDs
● Speakerphone on/off button with LED
● Headset on/off button with LED
● Mute button with LED
● Message waiting LED

Body dimensions (W x H x D) 8.42 x 8.35. x 1.73 in. (214 x 212 x 44 mm)
Unit weight 2.00 lb ( 0.9 kg)
Operating temperature 32o ~ 104oF (0o ~ 40oC)
Storage temperature -4o ~ 158oF (-20o ~ 70oC)
Operating humidity 5% to 95% noncondensing
Storage humidity 5% to 95% noncondensing
Ok kita telah mengetahui semua spesifikasinya, sekarang penulis akan menjabarkan semua kebutuhannya:
1. Asterisk Server
2. TFTP Server
3. DHCP Server 
4. Account dan extensions yang sudah di daftarkan pada Server Asterisk
5. Koneksi LAN untuk SIP Phones
Opsional:
1. ISDN / PSTN / ITSP untuk melakukan panggilan keluar. (rumah, hp, sli, sljj, dll)
2. Wireshark. Untuk keperluan debug.
3. Syslog server / log captured. Untuk keperluan debug.
Berikut adalah visualiasi dari proses provisioning penulis, antara SIP Phone dengan Asterisk Server.
Sumber: Cisco
Penjelasan:
1. Power di hidupkan
2. phone melakukan POST
3. DHCP memberikan IP
4. DHCP memberitahukan alamat TFTP server
5. meminta file konfigurasi dari TFTP utama
6. TFTP memberi
7. Pada file konfigurasi utama, dialamatkan file konfig untuk setiap phone.
8. Phone melakukan reboot
9. Mengambil file konfig yang telah di alamatkan untuknya.
10. Melakukan konfigurasi pada phone
11. Phone melakukan reboot
12. melakukan register pada server Asterisk
13. Seharusnya sudah bisa melakukan panggilan
Secara default pada saat kita baru membeli Cisco SIP Phones defaut Profile Rule-nya menuju /spa$PSN.cfg, File ini akan menyesuaikan dengan tipe yang akan di konfigurasinya. Misal tipe sip phone kita adalah SPA502G maka file konfigurasi yang akan di download oleh si sip phone akan menuju file spa502g.cfg. $PSN adalah variabel yang akan membawa kita pada tipe dari si harddware.
Berikut adalah step yang akan kita lakukan:
1. Membuat file konfigurasi utama: spa502G.cfg
2. Membuat file konfigurasi untuk tiap sip phone: spa30e4dbxx59xx.cfg
3. Mengenkripsinya file konfigurasinya (opsional)
4. Menambahkan opsi alamat IP TFTP server pada DHCP server
1. Membuat file konfigurasi utama
File ini adalah konfigurasi utama, seperti yang sudah saya jelaskan diatas, yang akan di cari oleh ip phone adalah file ini, secara default pada saat baru membeli menuju /spa$PSN.cfg, dimana / yang dimaksud adalah root dari tftp server. Sesuaikan nama file dengan tipe ip phone. Karena ip phone akan otomatis menuju file tipe yang mereka miliki. Format filenya adalah XML, berikut isi file konfigurasinya:

Yes
10
tftp://192.168.0.100/xml/spa$MA.cfg
tftp://192.168.0.100/spa50x-30x-7-5-1a.bin
Penjelasan:
Yes
Pada saat ip phone di reset lakukan rsync, konfigurasi dengan file spa$MA.cfg
 10
lakukan rsync setiap 10 detik, variablenya di buat cepat karena ini adalah step pertama jadi tidak usah kawatir sip phone akan rysnc terus.
tftp://192.168.0.100/xml/spa$MA.cfg
Memberitahukan letak file untuk masing-masing sip phone berdasarkan MAC address, jadi misalnya MAC address sip phonenya adalah 30e4db2a59xx maka kita namai filenya di tftp server: spa30e4db2a5995.cfg
tftp://192.168.0.100/spa50x-30x-7-5-1a.bin
Sebenarnya ini opsional, berhubung firmware bawaan pada saat membeli biasanya sudah uzur, dan ada report vurnebiiities disana, maka harus di upgrade, nah baris ini yang mengaturnya, tinggal kita download dari web cisco binarynya dan upload.
2.  Membuat file konfigurasi untuk tiap sip phone
Fele ini yang akan di download oleh sip phone setelah file konfigurasi utama men-set profilenya menuju spa$MA.cfg, semua konfigurasi pada sip phone bisa kita atur disini. Silahkan sesuaikan dengan konfigurasi anda, seperti username, passwd, asterisk server, ringtone sound, dsb tentunya file ini sudah penulis edit untuk keperluan publik =D:
# ***
# *** SPA50x-30x-SIP 7.5.1a Configuration Parameters
# ***


# *** System Configuration

Restricted_Access_Domains                       "" ;
Enable_Web_Server                               "Yes" ;
Web_Server_Port                                 "80" ;
Enable_Web_Admin_Access                         "Yes" ;
Admin_Passwd                                    "A!@H87h^(^&1n3dEqW" ;
User_Password                                 ! "" ;
Signaling_Protocol                              "SIP" ;  # options: SIP/SPCP
SPCP_Auto-detect                                "Yes" ;
Phone-UI-readonly                               "No" ;
Phone-UI-user-mode                              "No" ;

# *** Power Setting

PoE_Power_Required                              "Normal" ;  # options: Normal/Maximum

# *** Internet Connection Type

Connection_Type                               ! "DHCP" ;  # options: DHCP/Static IP

# ***  Static IP Settings

Static_IP                                     ! "" ;
NetMask                                       ! "" ;
Gateway                                       ! "" ;

# *** Optional Network Configuration

HostName                                      ! "d1046" ;
Domain                                        ! "unixhat.com" ;
Primary_DNS                                   ! "" ;
Secondary_DNS                                 ! "" ;
DNS_Server_Order                                "Manual" ;  # options: Manual/Manual,DHCP/DHCP,Manual
DNS_Query_Mode                                  "Parallel" ;  # options: Parallel/Sequential
DNS_Query_TTL_Ignore                            "No" ;
Syslog_Server                                   "192.168.0.102" ;
Debug_Server                                    "" ;
Debug_Level                                     "3" ;  # options: 0/1/2/3
Layer_2_Logging                                 "No" ;
Port_Mirroring                                  "No" ;
NTP_Enable                                      "Yes" ;
Primary_NTP_Server                              "0.asia.pool.ntp.org" ;
Secondary_NTP_Server                            "1.asia.pool.ntp.org" ;

# *** VLAN Settings

Enable_VLAN                                   ! "No" ;
Enable_CDP                                      "Yes" ;
Enable_LLDP-MED                                 "Yes" ;
Network_Startup_Delay                           "3" ;
VLAN_ID                                       ! "1" ;
PC_Port_VLAN_Highest_Priority                   "No Limit" ;  # options: 0/1/2/3/4/5/6/7/No Limit
Enable_PC_Port_VLAN_Tagging                     "No" ;
PC_Port_VLAN_ID                                 "1" ;

# *** Inventory Settings

Asset_ID                                        "" ;

# *** Configuration Profile

Provision_Enable                                "Yes" ;
Resync_On_Reset                                 "Yes" ;
Resync_Random_Delay                             "2" ;
Resync_At_(HHmm)                                "" ;
Resync_At_Random_Delay                          "600" ;
Resync_Periodic                                 "3600" ;
Resync_Error_Retry_Delay                        "3600" ;
Forced_Resync_Delay                             "14400" ;
Resync_From_SIP                                 "Yes" ;
Resync_After_Upgrade_Attempt                    "Yes" ;
Resync_Trigger_1                                "" ;
Resync_Trigger_2                                "" ;
Resync_Fails_On_FNF                             "Yes" ;
Profile_Rule                                    "tftp://192.168.0.100/xml/spa$MA.cfg" ;
Profile_Rule_B                                  "" ;
Profile_Rule_C                                  "" ;
Profile_Rule_D                                  "" ;
DHCP_Option_To_Use                              "66,160,159,150,60,43,125" ;
Transport_Protocol                              "https" ;  # options: none/tftp/http/https
Log_Resync_Request_Msg                          "$PN $MAC -- Requesting resync $SCHEME://$SERVIP:$PORT$PATH" ;
Log_Resync_Success_Msg                          "$PN $MAC -- Successful resync $SCHEME://$SERVIP:$PORT$PATH" ;
Log_Resync_Failure_Msg                          "$PN $MAC -- Resync failed: $ERR" ;
Report_Rule                                     "" ;
User_Configurable_Resync                        "Yes" ;

# *** Firmware Upgrade

Upgrade_Enable                                  "Yes" ;
Upgrade_Error_Retry_Delay                       "3600" ;
Downgrade_Rev_Limit                             "" ;
Upgrade_Rule                                    "" ;
Log_Upgrade_Request_Msg                         "$PN $MAC -- Requesting upgrade $SCHEME://$SERVIP:$PORT$PATH" ;
Log_Upgrade_Success_Msg                         "$PN $MAC -- Successful upgrade $SCHEME://$SERVIP:$PORT$PATH -- $ERR" ;
Log_Upgrade_Failure_Msg                         "$PN $MAC -- Upgrade failed: $ERR" ;
License_Keys                                    "" ;

# *** CA Settings

Custom_CA_RULE                                  "" ;

# *** General Purpose Parameters

GPP_A                                           "" ;
GPP_B                                           "" ;
GPP_C                                           "" ;
GPP_D                                           "" ;
GPP_E                                           "" ;
GPP_F                                           "" ;
GPP_G                                           "" ;
GPP_H                                           "" ;
GPP_I                                           "" ;
GPP_J                                           "" ;
GPP_K                                           "" ;
GPP_L                                           "" ;
GPP_M                                           "" ;
GPP_N                                           "" ;
GPP_O                                           "" ;
GPP_P                                           "" ;
GPP_SA                                          "" ;
GPP_SB                                          "" ;
GPP_SC                                          "" ;
GPP_SD                                          "" ;

# *** SIP Parameters

Max_Forward                                     "70" ;
Max_Redirection                                 "5" ;
Max_Auth                                        "2" ;
SIP_User_Agent_Name                             "$VERSION" ;
SIP_Server_Name                                 "$VERSION" ;
SIP_Reg_User_Agent_Name                         "" ;
SIP_Accept_Language                             "" ;
DTMF_Relay_MIME_Type                            "application/dtmf-relay" ;
Hook_Flash_MIME_Type                            "application/hook-flash" ;
Remove_Last_Reg                                 "No" ;
Use_Compact_Header                              "No" ;
Escape_Display_Name                             "No" ;
SIP-B_Enable                                    "No" ;
Talk_Package                                    "No" ;
Hold_Package                                    "No" ;
Conference_Package                              "No" ;
Notify_Conference                               "No" ;
RFC_2543_Call_Hold                              "Yes" ;
Random_REG_CID_On_Reboot                        "No" ;
Mark_All_AVT_Packets                            "Yes" ;
SIP_TCP_Port_Min                                "5060" ;
SIP_TCP_Port_Max                                "5080" ;
CTI_Enable                                      "No" ;
Caller_ID_Header                                "PAID-RPID-FROM" ;  # options: PAID-RPID-FROM/PAID-FROM/RPID-PAID-FROM/RPID-FROM/FROM
SRTP_Method                                     "x-sipura" ;  # options: x-sipura/s-descriptor
Hold_Target_Before_REFER                        "No" ;
Dialog_SDP_Enable                               "No" ;
Keep_Referee_When_REFER_Failed                  "No" ;
Display_Diversion_Info                          "No" ;

# *** SIP Timer Values (sec)

SIP_T1                                          ".5" ;
SIP_T2                                          "4" ;
SIP_T4                                          "5" ;
SIP_Timer_B                                     "16" ;
SIP_Timer_F                                     "16" ;
SIP_Timer_H                                     "16" ;
SIP_Timer_D                                     "16" ;
SIP_Timer_J                                     "16" ;
INVITE_Expires                                  "240" ;
ReINVITE_Expires                                "30" ;
Reg_Min_Expires                                 "1" ;
Reg_Max_Expires                                 "7200" ;
Reg_Retry_Intvl                                 "30" ;
Reg_Retry_Long_Intvl                            "1200" ;
Reg_Retry_Random_Delay                          "" ;
Reg_Retry_Long_Random_Delay                     "" ;
Reg_Retry_Intvl_Cap                             "" ;
Sub_Min_Expires                                 "10" ;
Sub_Max_Expires                                 "7200" ;
Sub_Retry_Intvl                                 "10" ;

# *** Response Status Code Handling

SIT1_RSC                                        "" ;
SIT2_RSC                                        "" ;
SIT3_RSC                                        "" ;
SIT4_RSC                                        "" ;
Try_Backup_RSC                                  "" ;
Retry_Reg_RSC                                   "" ;

# *** RTP Parameters

RTP_Port_Min                                    "16384" ;
RTP_Port_Max                                    "16538" ;
RTP_Packet_Size                                 "0.030" ;
Max_RTP_ICMP_Err                                "0" ;
RTCP_Tx_Interval                                "0" ;
No_UDP_Checksum                                 "No" ;
Symmetric_RTP                                   "No" ;
Stats_In_BYE                                    "No" ;

# *** SDP Payload Types

AVT_Dynamic_Payload                             "101" ;
INFOREQ_Dynamic_Payload                         "" ;
G726r16_Dynamic_Payload                         "98" ;
G726r24_Dynamic_Payload                         "97" ;
G726r32_Dynamic_Payload                         "2" ;
G726r40_Dynamic_Payload                         "96" ;
G729b_Dynamic_Payload                           "99" ;
EncapRTP_Dynamic_Payload                        "112" ;
RTP-Start-Loopback_Dynamic_Payload              "113" ;
RTP-Start-Loopback_Codec                        "G711u" ;  # options: G711u/G711a/G726-16/G726-24/G726-32/G726-40/G729a/G722
AVT_Codec_Name                                  "telephone-event" ;
G711u_Codec_Name                                "PCMU" ;
G711a_Codec_Name                                "PCMA" ;
G726r16_Codec_Name                              "G726-16" ;
G726r24_Codec_Name                              "G726-24" ;
G726r32_Codec_Name                              "G726-32" ;
G726r40_Codec_Name                              "G726-40" ;
G729a_Codec_Name                                "G729a" ;
G729b_Codec_Name                                "G729ab" ;
G723_Codec_Name                                 "G723" ;
G722_Codec_Name                                 "G722" ;
L16_Codec_Name                                  "L16" ;
EncapRTP_Codec_Name                             "encaprtp" ;

# *** NAT Support Parameters

Handle_VIA_received                             "No" ;
Handle_VIA_rport                                "No" ;
Insert_VIA_received                             "No" ;
Insert_VIA_rport                                "No" ;
Substitute_VIA_Addr                             "No" ;
Send_Resp_To_Src_Port                           "No" ;
STUN_Enable                                     "No" ;
STUN_Test_Enable                                "No" ;
STUN_Server                                     "" ;
EXT_IP                                          "" ;
EXT_RTP_Port_Min                                "" ;
NAT_Keep_Alive_Intvl                            "15" ;

# *** Linksys Key System Parameters

Linksys_Key_System                              "No" ;
Multicast_Address                               "224.168.168.168:6061" ;
Key_System_Auto_Discovery                       "Yes" ;
Key_System_IP_Address                           "" ;
Force_LAN_Codec                                 "none" ;  # options: none/G711u/G711a
Auto_Ans_GrPage_On_Active_Call                  "Yes" ;

# *** General

Line_Enable[1]                                  "Yes" ;

# *** Share Line Appearance

Share_Ext[1]                                    "private" ;  # options: private/shared
Shared_User_ID[1]                               "" ;
Subscription_Expires[1]                         "3600" ;
Restrict_MWI[1]                                 "No" ;
Monitor_User_ID[1]                              "" ;

# *** NAT Settings

NAT_Mapping_Enable[1]                           "No" ;
NAT_Keep_Alive_Enable[1]                        "No" ;
NAT_Keep_Alive_Msg[1]                           "$NOTIFY" ;
NAT_Keep_Alive_Dest[1]                          "$PROXY" ;

# *** Network Settings

SIP_TOS/DiffServ_Value[1]                       "0x68" ;
SIP_CoS_Value[1]                                "3" ;  # options: 0/1/2/3/4/5/6/7
RTP_TOS/DiffServ_Value[1]                       "0xb8" ;
RTP_CoS_Value[1]                                "6" ;  # options: 0/1/2/3/4/5/6/7
Network_Jitter_Level[1]                         "high" ;  # options: low/medium/high/very high/extremely high
Jitter_Buffer_Adjustment[1]                     "up and down" ;  # options: up and down/up only/down only/disable

# *** SIP Settings

SIP_Transport[1]                                "UDP" ;  # options: UDP/TCP/TLS
SIP_Port[1]                                     "5060" ;
SIP_100REL_Enable[1]                            "No" ;
EXT_SIP_Port[1]                                 "" ;
Auth_Resync-Reboot[1]                           "Yes" ;
SIP_Proxy-Require[1]                            "" ;
SIP_Remote-Party-ID[1]                          "No" ;
Referor_Bye_Delay[1]                            "4" ;
Refer-To_Target_Contact[1]                      "No" ;
Referee_Bye_Delay[1]                            "0" ;
SIP_Debug_Option[1]                             "none" ;  # options: none/1-line/1-line excl. OPT/1-line excl. NTFY/1-line excl. REG/1-line excl. OPT|NTFY|REG/full/full excl. OPT/full excl. NTFY/full excl. REG/full excl. OPT|NTFY|REG
Refer_Target_Bye_Delay[1]                       "0" ;
Sticky_183[1]                                   "No" ;
Auth_INVITE[1]                                  "No" ;
Ntfy_Refer_On_1xx-To-Inv[1]                     "Yes" ;
Use_Anonymous_With_RPID[1]                      "Yes" ;
Set_G729_annexb[1]                              "none" ;  # options: none/no/yes/follow silence supp setting
Voice_Quality_Report_Address[1]                 "" ;
User_Equal_Phone[1]                             "No" ;

# *** Call Feature Settings

Blind_Attn-Xfer_Enable[1]                       "No" ;
MOH_Server[1]                                   "" ;
Message_Waiting[1]                              "No" ;
Auth_Page[1]                                    "No" ;
Default_Ring[(1)]                               "5" ;  # options: No Ring/1/2/3/4/5/6/7/8/9/10/11/12/User 1/User 2
Auth_Page_Realm[1]                              "" ;
Conference_Bridge_URL[1]                        "" ;
Auth_Page_Password[1]                           "" ;
Mailbox_ID[1]                                   "" ;
Voice_Mail_Server[1]                            "" ;
Voice_Mail_Subscribe_Interval[1]                "86400" ;
State_Agent[1]                                  "" ;
CFWD_Notify_Serv[1]                             "No" ;
CFWD_Notifier[1]                                "" ;
User_ID_with_Domain[1]                          "No" ;
Broadsoft_ACD[1]                                "No" ;
Auto_Ans_Page_On_Active_Call[1]                 "Yes" ;
Feature_Key_Sync[1]                             "No" ;
Call_Park_Monitor_Enable[1]                     "No" ;

# *** Proxy and Registration

Proxy[1]                                        "192.168.0.90" ;
Outbound_Proxy[1]                               "" ;
Alternate_Proxy[1]                              "" ;
Alternate_Outbound_Proxy[1]                     "" ;
Use_Outbound_Proxy[1]                           "No" ;
Use_OB_Proxy_In_Dialog[1]                       "Yes" ;
Register[1]                                     "Yes" ;
Make_Call_Without_Reg[1]                        "No" ;
Register_Expires[1]                             "3600" ;
Ans_Call_Without_Reg[1]                         "No" ;
Use_DNS_SRV[1]                                  "No" ;
DNS_SRV_Auto_Prefix[1]                          "No" ;
Proxy_Fallback_Intvl[1]                         "3600" ;
Proxy_Redundancy_Method[1]                      "Normal" ;  # options: Normal/Based on SRV Port
Dual_Registration[1]                            "No" ;

# *** Subscriber Information

Display_Name[1]                                 "Meeting Room 2" ;
User_ID[1]                                      "meetingroom2" ;
Password[1]                                     "s1p@nd1re#99)ZaaQ" ;
Use_Auth_ID[1]                                  "No" ;
Auth_ID[1]                                      "" ;
Reversed_Auth_Realm[1]                          "" ;
Mini_Certificate[1]                             "" ;
SRTP_Private_Key[1]                             "" ;
Resident_Online_Number[1]                       "" ;
SIP_URI[1]                                      "" ;

# *** Audio Configuration

Preferred_Codec[1]                              "G711u" ;  # options: G711u/G711a/G726-16/G726-24/G726-32/G726-40/G729a/G722
Use_Pref_Codec_Only[1]                          "No" ;
Second_Preferred_Codec[1]                       "Unspecified" ;  # options: Unspecified/G711u/G711a/G726-16/G726-24/G726-32/G726-40/G729a/G722
Third_Preferred_Codec[1]                        "Unspecified" ;  # options: Unspecified/G711u/G711a/G726-16/G726-24/G726-32/G726-40/G729a/G722
G729a_Enable[1]                                 "Yes" ;
G723_Enable[1]                                  "Yes" ;
G722_Enable[1]                                  "Yes" ;
L16_Enable[1]                                   "Yes" ;
G726-16_Enable[1]                               "Yes" ;
G726-24_Enable[1]                               "Yes" ;
G726-32_Enable[1]                               "Yes" ;
G726-40_Enable[1]                               "Yes" ;
Release_Unused_Codec[1]                         "Yes" ;
DTMF_Process_AVT[1]                             "Yes" ;
Silence_Supp_Enable[1]                          "No" ;
DTMF_Tx_Method[1]                               "Auto" ;  # options: InBand/AVT/INFO/Auto/InBand+INFO/AVT+INFO
DTMF_Tx_Volume_for_AVT_Packet[1]                "0" ;
DTMF_AVT_Packet_Interval[1]                     "0" ;
Use_Remote_Pref_Codec[1]                        "No" ;
Codec_Negotiation[1]                            "Default" ;  # options: Default/List All

# *** Dial Plan

Dial_Plan[1]                                    "(*xx|[3469]11|0|00|[2-9]xxxxxx|1xxx[2-9]xxxxxxS0|xxxxxxxxxxxx.)" ;
Caller_ID_Map[1]                                "" ;
Enable_IP_Dialing[1]                            "Yes" ;
Emergency_Number[1]                             "" ;

# *** Call Forward

Cfwd_Setting                                  ! "Yes" ;
Cfwd_All_Dest                                 ! "" ;
Cfwd_Busy_Dest                                ! "" ;
Cfwd_No_Ans_Dest                              ! "" ;
Cfwd_No_Ans_Delay                             ! "20" ;

# *** Speed Dial

Speed_Dial_2                                  ! "" ;
Speed_Dial_3                                  ! "" ;
Speed_Dial_4                                  ! "" ;
Speed_Dial_5                                  ! "" ;
Speed_Dial_6                                  ! "" ;
Speed_Dial_7                                  ! "" ;
Speed_Dial_8                                  ! "" ;
Speed_Dial_9                                  ! "" ;

# *** Supplementary Services

CW_Setting                                    ! "Yes" ;
Block_CID_Setting                             ! "No" ;
Block_ANC_Setting                             ! "No" ;
DND_Setting                                   ! "No" ;
Secure_Call_Setting                             "No" ;
Dial_Assistance                               ! "No" ;
Auto_Answer_Page                                "Yes" ;
Preferred_Audio_Device                        ! "Speaker" ;  # options: Speaker/Headset
Send_Audio_To_Speaker                         ! "No" ;
Time_Format                                   ! "24hr" ;  # options: 12hr/24hr
Date_Format                                   ! "day/month" ;  # options: month/day/day/month
Miss_Call_Shortcut                            ! "Yes" ;
Miss_Call_Banner                              ! "Yes" ;
Accept_Media_Loopback_Request                   "automatic" ;  # options: never/automatic/manual
Media_Loopback_Mode                             "source" ;  # options: source/mirror
Media_Loopback_Type                             "media" ;  # options: media/packet
Text_Message                                  ! "Yes" ;
Text_Message_From_3rd_Party                   ! "No" ;
Alert_Tone_Off                                ! "No" ;
Log_Missed_Calls_for_EXT_1                      "Yes" ;
Log_Missed_Calls_for_EXT_2                      "Yes" ;
Log_Missed_Calls_for_EXT_3                      "Yes" ;
Log_Missed_Calls_for_EXT_4                      "Yes" ;
Log_Missed_Calls_for_EXT_5                      "Yes" ;
Log_Missed_Calls_for_EXT_6                      "Yes" ;
Log_Missed_Calls_for_EXT_7                      "Yes" ;
Log_Missed_Calls_for_EXT_8                      "Yes" ;
Log_Missed_Calls_for_EXT_9                      "Yes" ;
Log_Missed_Calls_for_EXT_10                     "Yes" ;
Log_Missed_Calls_for_EXT_11                     "Yes" ;
Log_Missed_Calls_for_EXT_12                     "Yes" ;
Shared_Line_DND_Cfwd_Enable                     "Yes" ;

# *** Audio

Ringer_Volume                                 ! "8" ;
Speaker_Volume                                ! "8" ;
Handset_Volume                                ! "10" ;
Headset_Volume                                ! "10" ;
Handset_Version                               ! "Auto" ;  # options: Auto/Original/v3
Deep_Bass                                     ! "Default" ;  # options: Default/HiDef/Standard

# *** LCD

LCD_Contrast                                  ! "8" ;
Back_Light_Timer                                "10 s" ;  # options: Off/10 s/20 s/30 s/Always On

# *** General

Station_Name                                    "D1046" ;
Station_Display_Name                            "D1046" ;
Voice_Mail_Number                               "" ;
Text_Logo                                       "" ;
BMP_Picture_Download_URL                        "" ;
Select_Logo                                     "" ;  # options: Default/BMP Picture/Text Logo/None
Select_Background_Picture                       "None" ;  # options: None/BMP Picture/Text Logo
Softkey_Labels_Font                             "Auto" ;  # options: Normal/Narrow/Auto
Screen_Saver_Enable                           ! "No" ;
Screen_Saver_Wait                             ! "300" ;
Screen_Saver_Icon                             ! "Background Picture" ;  # options: StationTime/Lock/Phone/DateTime/Background Picture

# *** Line Key 1

Extension[1]                                    "1" ;  # options: 1/2/3/4/5/6/7/8/9/10/11/12/Disabled
Short_Name[1]                                   "$USER" ;
Share_Call_Appearance[1]                        "private" ;  # options: private/shared
Extended_Function[1]                            "" ;

# *** Miscellaneous Line Key Settings

Line_ID_Mapping                                 "Vertical First" ;  # options: Horizontal First/Vertical First
SCA_Barge-In_Enable                             "No" ;
SCA_Sticky_Auto_Line_Seize                      "No" ;
Line_Navigation                                 "Per Line" ;  # options: Per Call/Per Line
Call_Appearance_Per_Line                        "2" ;  # options: 2/3/4/5/6/7/8/9/10
Softkey_Navigation_Style                        "Scrollable" ;  # options: Scrollable/More

# *** Line Key LED Pattern

Idle_LED                                        "" ;
Remote_Undefined_LED                            "" ;
Local_Seized_LED                                "" ;
Remote_Seized_LED                               "" ;
Local_Progressing_LED                           "" ;
Remote_Progressing_LED                          "" ;
Local_Ringing_LED                               "" ;
Remote_Ringing_LED                              "" ;
Local_Active_LED                                "" ;
Remote_Active_LED                               "" ;
Local_Held_LED                                  "" ;
Remote_Held_LED                                 "" ;
Register_Failed_LED                             "" ;
Disabled_LED                                    "" ;
Registering_LED                                 "" ;
Call_Back_Active_LED                            "" ;
Trunk_In-use_LED                                "" ;
Trunk_No_Service_LED                            "" ;
Trunk_Reserved_LED                              "" ;

# *** Supplementary Services

Conference_Serv                                 "Yes" ;
Attn_Transfer_Serv                              "Yes" ;
Blind_Transfer_Serv                             "Yes" ;
DND_Serv                                        "Yes" ;
Block_ANC_Serv                                  "Yes" ;
Call_Back_Serv                                  "Yes" ;
Block_CID_Serv                                  "Yes" ;
Secure_Call_Serv                                "Yes" ;
Cfwd_All_Serv                                   "Yes" ;
Cfwd_Busy_Serv                                  "Yes" ;
Cfwd_No_Ans_Serv                                "Yes" ;
Paging_Serv                                     "Yes" ;
Call_Park_Serv                                  "Yes" ;
Call_Pick_Up_Serv                               "Yes" ;
ACD_Login_Serv                                  "No" ;
Group_Call_Pick_Up_Serv                         "Yes" ;
ACD_Ext                                         "1" ;  # options: 1/2/3/4
Service_Annc_Serv                               "No" ;

# *** Ring Tone

Ring1                                           "n=Classic-1;w=3;c=1" ;
Ring2                                           "n=Classic-2;w=3;c=2" ;
Ring3                                           "n=Classic-3;w=3;c=3" ;
Ring4                                           "n=Classic-4;w=3;c=4" ;
Ring5                                           "n=Simple-1;w=2;c=1" ;
Ring6                                           "n=Simple-2;w=2;c=2" ;
Ring7                                           "n=Simple-3;w=2;c=3" ;
Ring8                                           "n=Simple-4;w=2;c=4" ;
Ring9                                           "n=Simple-5;w=2;c=5" ;
Ring10                                          "n=Office;w=4;c=1" ;
Ring11                                          "n=Pulse;w=5;c=1" ;
Ring12                                          "n=Du-dut;w=6;c=1" ;

# *** Audio Input Gain (dB)

Handset_Input_Gain                              "0" ;  # options: -6/0/6
Headset_Input_Gain                              "0" ;  # options: -6/0/6/12/-12/-18
Speakerphone_Input_Gain                         "0" ;  # options: -6/0/6
Acoustic_Echo_Canceller_Enable                  "Yes" ;
Handset_Additional_Input_Gain                   "0" ;  # options: -3/-2/-1/0/1/2/3
Headset_Additional_Input_Gain                   "0" ;  # options: -3/-2/-1/0/1/2/3
Speakerphone_Additional_Input_Gain              "0" ;  # options: -3/-2/-1/0/1/2/3

# *** Multiple Paging Group Parameters

Group_Paging_Script                             "pggrp=224.168.168.168:34560;name=All;num=800;listen=yes;" ;

# *** Broadsoft Settings

Directory_Enable                                "No" ;
XSI_Host_Server                                 "" ;
Directory_Name                                  "" ;
Directory_Type                                  "Enterprise" ;  # options: Enterprise/Group/Personal
Directory_UserID                                "" ;
Directory_Password                              "" ;

# *** LDAP Corporate Directory Search

LDAP_Dir_Enable                                 "No" ;
LDAP_Corp_Dir_Name                              "" ;
LDAP_Server                                     "" ;
LDAP_Auth_Method                                "None" ;  # options: None/Simple/DIGEST-MD5
LDAP_Client_DN                                  "" ;
LDAP_Username                                   "" ;
LDAP_Password                                   "" ;
LDAP_Search_Base                                "" ;
LDAP_Last_Name_Filter                           "" ;
LDAP_First_Name_Filter                          "" ;
LDAP_Search_Item_3                              "" ;
LDAP_Item_3_Filter                              "" ;
LDAP_Search_Item_4                              "" ;
LDAP_item_4_Filter                              "" ;
LDAP_Display_Attrs                              "" ;
LDAP_Number_Mapping                             "" ;

# *** XML Service

XML_Directory_Service_Name                      "" ;
XML_Directory_Service_URL                       "" ;
XML_Application_Service_Name                    "" ;
XML_Application_Service_URL                     "" ;
XML_User_Name                                   "" ;
XML_Password                                    "" ;

# *** Extension Mobility

EM_Enable                                       "No" ;
EM_User_Domain                                  "" ;
EM_Phone_User_ID                                "" ;
EM_Phone_Password                               "" ;
EM_Mobile_User_ID                               "" ;
EM_Mobile_Password                              "" ;

# *** Programmable Softkeys

Programmable_Softkey_Enable                     "No" ;
Idle_Key_List                                   "em_login|1;acd_login|1;acd_logout|1;astate|2;avail|3;unavail|3;redial|5;dir|6;cfwd|7;dnd|8;lcr|9;pickup|10;gpickup|11;unpark|12;em_logout" ;
Missed_Call_Key_List                            "lcr|1;miss|4" ;
Off_Hook_Key_List                               "redial|1;dir|2;cfwd|3;dnd|4;lcr|5;unpark|6;pickup|7;gpickup|8;starcode|11;alpha|12" ;
Dialing_Input_Key_List                          "dial|1;delchar|2;clear|3;cancel|4;left|5;right|6;starcode|7;alpha|8;dir" ;
Progressing_Key_List                            "endcall|2" ;
Connected_Key_List                              "hold|1;endcall|2;conf|3;xfer|4;toggle;bxfer;confLx;xferLx;park;phold;flash;" ;
Start-Xfer_Key_List                             "hold|1;endcall|2;xfer|4;toggle;" ;
Start-Conf_Key_List                             "hold|1;endcall|2;conf|3;toggle;" ;
Conferencing_Key_List                           "hold|1;endcall|2;join|4" ;
Releasing_Key_List                              "endcall|2;" ;
Hold_Key_List                                   "resume|1;endcall|2;newcall|3;redial;dir;cfwd;dnd" ;
Ringing_Key_List                                "answer|1;ignore|2;toggle|4" ;
Shared_Active_Key_List                          "newcall|1;barge|2;cfwd|3;dnd|4" ;
Shared_Held_Key_List                            "resume|1;barge|2;cfwd|3;dnd|4" ;
PSK_1                                           "" ;
PSK_2                                           "" ;
PSK_3                                           "" ;
PSK_4                                           "" ;
PSK_5                                           "" ;
PSK_6                                           "" ;
PSK_7                                           "" ;
PSK_8                                           "" ;
PSK_9                                           "" ;
PSK_10                                          "" ;
PSK_11                                          "" ;
PSK_12                                          "" ;
PSK_13                                          "" ;
PSK_14                                          "" ;
PSK_15                                          "" ;
PSK_16                                          "" ;

# *** Call Progress Tones

Dial_Tone                                       "350@-19,440@-19;10(*/0/1+2)" ;
Outside_Dial_Tone                               "420@-16;10(*/0/1)" ;
Prompt_Tone                                     "520@-19,620@-19;10(*/0/1+2)" ;
Busy_Tone                                       "480@-19,620@-19;10(.5/.5/1+2)" ;
Reorder_Tone                                    "480@-19,620@-19;10(.25/.25/1+2)" ;
Off_Hook_Warning_Tone                           "480@-10,620@0;10(.125/.125/1+2)" ;
Ring_Back_Tone                                  "440@-19,480@-19;*(2/4/1+2)" ;
Call_Waiting_Tone                               "440@-10;30(.3/9.7/1)" ;
Confirm_Tone                                    "600@-16;1(.25/.25/1)" ;
SIT1_Tone                                       "985@-16,1428@-16,1777@-16;20(.380/0/1,.380/0/2,.380/0/3,0/4/0)" ;
SIT2_Tone                                       "914@-16,1371@-16,1777@-16;20(.274/0/1,.274/0/2,.380/0/3,0/4/0)" ;
SIT3_Tone                                       "914@-16,1371@-16,1777@-16;20(.380/0/1,.380/0/2,.380/0/3,0/4/0)" ;
SIT4_Tone                                       "985@-16,1371@-16,1777@-16;20(.380/0/1,.274/0/2,.380/0/3,0/4/0)" ;
MWI_Dial_Tone                                   "350@-19,440@-19;2(.1/.1/1+2);10(*/0/1+2)" ;
Cfwd_Dial_Tone                                  "350@-19,440@-19;2(.2/.2/1+2);10(*/0/1+2)" ;
Holding_Tone                                    "600@-19;25(.1/.1/1,.1/.1/1,.1/9.5/1)" ;
Conference_Tone                                 "350@-19;20(.1/.1/1,.1/9.7/1)" ;
Secure_Call_Indication_Tone                     "397@-19,507@-19;15(0/2/0,.2/.1/1,.1/2.1/2)" ;
Page_Tone                                       "600@-16;.3(.05/0.05/1)" ;
Alert_Tone                                      "600@-19;.2(.05/0.05/1)" ;
Call_Pickup_Tone                                "440@-10;30(.3/9.7/1)" ;

# *** Distinctive Ring Patterns

Cadence_1                                       "60(2/4)" ;
Cadence_2                                       "60(.3/.2,1/.2,.3/4)" ;
Cadence_3                                       "60(.8/.4,.8/4)" ;
Cadence_4                                       "60(.4/.2,.3/.2,.8/4)" ;
Cadence_5                                       "60(.2/.2,.2/.2,.2/.2,1/4)" ;
Cadence_6                                       "60(.2/.4,.2/.4,.2/4)" ;
Cadence_7                                       "60(4.5/4)" ;
Cadence_8                                       "60(0.25/9.75)" ;
Cadence_9                                       "60(.4/.2,.4/2)" ;

# *** Control Timer Values (sec)

Reorder_Delay                                   "255" ;
Call_Back_Expires                               "1800" ;
Call_Back_Retry_Intvl                           "30" ;
Call_Back_Delay                                 ".5" ;
Interdigit_Long_Timer                           "10" ;
Interdigit_Short_Timer                          "3" ;

# *** Vertical Service Activation Codes

Call_Return_Code                                "*69" ;
Blind_Transfer_Code                             "*98" ;
Call_Back_Act_Code                              "*66" ;
Call_Back_Deact_Code                            "*86" ;
Cfwd_All_Act_Code                               "*72" ;
Cfwd_All_Deact_Code                             "*73" ;
Cfwd_Busy_Act_Code                              "*90" ;
Cfwd_Busy_Deact_Code                            "*91" ;
Cfwd_No_Ans_Act_Code                            "*92" ;
Cfwd_No_Ans_Deact_Code                          "*93" ;
CW_Act_Code                                     "*56" ;
CW_Deact_Code                                   "*57" ;
CW_Per_Call_Act_Code                            "*71" ;
CW_Per_Call_Deact_Code                          "*70" ;
Block_CID_Act_Code                              "*67" ;
Block_CID_Deact_Code                            "*68" ;
Block_CID_Per_Call_Act_Code                     "*81" ;
Block_CID_Per_Call_Deact_Code                   "*82" ;
Block_ANC_Act_Code                              "*77" ;
Block_ANC_Deact_Code                            "*87" ;
DND_Act_Code                                    "*78" ;
DND_Deact_Code                                  "*79" ;
Secure_All_Call_Act_Code                        "*16" ;
Secure_No_Call_Act_Code                         "*17" ;
Secure_One_Call_Act_Code                        "*18" ;
Secure_One_Call_Deact_Code                      "*19" ;
Paging_Code                                     "*96" ;
Call_Park_Code                                  "*38" ;
Call_Pickup_Code                                "*36" ;
Call_UnPark_Code                                "*39" ;
Group_Call_Pickup_Code                          "*37" ;
Media_Loopback_Code                             "*03" ;
Referral_Services_Codes                         "" ;
Feature_Dial_Services_Codes                     "" ;

# *** Vertical Service Announcement Codes

Service_Annc_Base_Number                        "" ;
Service_Annc_Extension_Codes                    "" ;

# *** Outbound Call Codec Selection Codes

Prefer_G711u_Code                               "*017110" ;
Force_G711u_Code                                "*027110" ;
Prefer_G711a_Code                               "*017111" ;
Force_G711a_Code                                "*027111" ;
Prefer_G723_Code                                "*01723" ;
Force_G723_Code                                 "*02723" ;
Prefer_G722_Code                                "*01722" ;
Force_G722_Code                                 "*02722" ;
Prefer_L16_Code                                 "*01016" ;
Force_L16_Code                                  "*02016" ;
Prefer_G726r16_Code                             "*0172616" ;
Force_G726r16_Code                              "*0272616" ;
Prefer_G726r24_Code                             "*0172624" ;
Force_G726r24_Code                              "*0272624" ;
Prefer_G726r32_Code                             "*0172632" ;
Force_G726r32_Code                              "*0272632" ;
Prefer_G726r40_Code                             "*0172640" ;
Force_G726r40_Code                              "*0272640" ;
Prefer_G729a_Code                               "*01729" ;
Force_G729a_Code                                "*02729" ;

# *** Miscellaneous

Set_Local_Date_(mm/dd)                          "" ;
Set_Local_Time_(HH/mm)                          "" ;
Time_Zone                                       "GMT+07:00" ;  # options: GMT-12:00/GMT-11:00/GMT-10:00/GMT-09:00/GMT-08:00/GMT-07:00/GMT-06:00/GMT-05:00/GMT-04:00/GMT-03:30/GMT-03:00/GMT-02:00/GMT-01:00/GMT/GMT+01:00/GMT+02:00/GMT+03:00/GMT+03:30/GMT+04:00/GMT+05:00/GMT+05:30/GMT+05:45/GMT+06:00/GMT+06:30/GMT+07:00/GMT+08:00/GMT+09:00/GMT+09:30/GMT+10:00/GMT+11:00/GMT+12:00/GMT+13:00
Time_Offset_(HH/mm)                             "" ;
Ignore_DHCP_Time_Offset                         "Yes" ;
Daylight_Saving_Time_Rule                       "" ;
Daylight_Saving_Time_Enable                     "Yes" ;
DTMF_Playback_Level                             "-16" ;
DTMF_Playback_Length                            ".1" ;
Inband_DTMF_Boost                               "12dB" ;  # options: 0dB/3dB/6dB/9dB/12dB/15dB/18dB
Dictionary_Server_Script                        "" ;
Language_Selection                              "" ;
Default_Character_Encoding                      "ISO-8859-1" ;  # options: ISO-8859-1/UTF-8
Locale                                          "en-US" ;  # options: en-US/en-CA/en-AU/en-GB/fr-FR/fr-CA/es-ES/it-IT/de-DE/nn-NO/pt-PT/nl-NL/sv-SE/pt-BZ/es-MX/en-NZ/da-DK

# *** General

Subscribe_Expires                               "1800" ;
Subscribe_Retry_Interval                        "30" ;
Unit_1_Enable                                   "Yes" ;
Subscribe_Delay                                 "1" ;
Unit_2_Enable                                   "Yes" ;
Server_Type                                     "Broadsoft" ;  # options: Broadsoft/SPA9000/Asterisk/RFC3265_4235/Sylantro
Test_Mode_Enable                                "No" ;
Attendant_Console_Call_Pickup_Code              "*98" ;
Attendant_Console_Call_Park_Code                "*68" ;
Attendant_Console_Call_unPark_Code              "*88" ;
BLF_List_URI                                    "" ;
Call_Pickup_Audio_Notification                  "No" ;

# *** Attendant Key LED Pattern

Application_LED                                 "" ;
Serv_Subscribe_Failed_LED                       "" ;
Serv_Subscribing_LED                            "" ;
SNRM_Day_Mode_LED                               "" ;
SNRM_Night_Mode_LED                             "" ;
Parking_Lot_Idle_LED                            "" ;
Parking_Lot_Busy_LED                            "" ;
BLF_Idle_LED                                    "" ;
BLF_Ringing_LED                                 "" ;
BLF_Busy_LED                                    "" ;
BLF_Held_LED                                    "" ;

# *** Unit 1

Unit_1_Key_1                                    "" ;
Unit_1_Key_2                                    "" ;
Unit_1_Key_3                                    "" ;
Unit_1_Key_4                                    "" ;
Unit_1_Key_5                                    "" ;
Unit_1_Key_6                                    "" ;
Unit_1_Key_7                                    "" ;
Unit_1_Key_8                                    "" ;
Unit_1_Key_9                                    "" ;
Unit_1_Key_10                                   "" ;
Unit_1_Key_11                                   "" ;
Unit_1_Key_12                                   "" ;
Unit_1_Key_13                                   "" ;
Unit_1_Key_14                                   "" ;
Unit_1_Key_15                                   "" ;
Unit_1_Key_16                                   "" ;
Unit_1_Key_17                                   "" ;
Unit_1_Key_18                                   "" ;
Unit_1_Key_19                                   "" ;
Unit_1_Key_20                                   "" ;
Unit_1_Key_21                                   "" ;
Unit_1_Key_22                                   "" ;
Unit_1_Key_23                                   "" ;
Unit_1_Key_24                                   "" ;
Unit_1_Key_25                                   "" ;
Unit_1_Key_26                                   "" ;
Unit_1_Key_27                                   "" ;
Unit_1_Key_28                                   "" ;
Unit_1_Key_29                                   "" ;
Unit_1_Key_30                                   "" ;
Unit_1_Key_31                                   "" ;
Unit_1_Key_32                                   "" ;

# *** Unit 2

Unit_2_Key_1                                    "" ;
Unit_2_Key_2                                    "" ;
Unit_2_Key_3                                    "" ;
Unit_2_Key_4                                    "" ;
Unit_2_Key_5                                    "" ;
Unit_2_Key_6                                    "" ;
Unit_2_Key_7                                    "" ;
Unit_2_Key_8                                    "" ;
Unit_2_Key_9                                    "" ;
Unit_2_Key_10                                   "" ;
Unit_2_Key_11                                   "" ;
Unit_2_Key_12                                   "" ;
Unit_2_Key_13                                   "" ;
Unit_2_Key_14                                   "" ;
Unit_2_Key_15                                   "" ;
Unit_2_Key_16                                   "" ;
Unit_2_Key_17                                   "" ;
Unit_2_Key_18                                   "" ;
Unit_2_Key_19                                   "" ;
Unit_2_Key_20                                   "" ;
Unit_2_Key_21                                   "" ;
Unit_2_Key_22                                   "" ;
Unit_2_Key_23                                   "" ;
Unit_2_Key_24                                   "" ;
Unit_2_Key_25                                   "" ;
Unit_2_Key_26                                   "" ;
Unit_2_Key_27                                   "" ;
Unit_2_Key_28                                   "" ;
Unit_2_Key_29                                   "" ;
Unit_2_Key_30                                   "" ;
Unit_2_Key_31                                   "" ;
Unit_2_Key_32                                   "" ;
Protect_IVR_FactoryReset                        "Yes" ;


3. Mengenkripsinya file konfigurasinya
Mengenkripsi sebenarnya adalah hanya pilihan penulis, agar file konfigurasi yang kita miliki secure, tidak bisa di lihat yang bukan haknya. Ada berbagai macam cara enkripsi bisa menggunakan openssl maupun tool cisco, berikut adalah contoh berbagai macam cara enkripsi:
spc --rc4 --ascii-key S@b3ni spa502.txt spa502.cfg
spc --aes --ascii-key s1kUmb@ng spa502.txt spa502.cfg
spc --aes --ascii-key “rahasia lohh 123” spa502.txt spa502.cfg
spc --aes --hex-key 5111aa1...b1a21 spa962.txt spa962.cfg
spc --target 002b083afa11 –-aes –-ascii-key un1x0raspasswD file.txt file.cfg
tapi dengan cara diatas kita harus memasukan password pada file konfigurasi utama untuk mendekripnya, dengan cara seperti berikut:
[--key “rahasia lohh 123”] http://192.168.0.100/xml/filespa.cfg
Cara seperti ini menurut penulis aneh =D, satu sisi enkripsi file konfigurasi, satu sisi store plaintext password ?? hayahh..
akhirnya penulis gunakan ./spc --target 30e4db2a59xx meetingroom2 spa30e4db2a59xx.cfg
File akan di enkripsi menjadi spa30e4db2a59xx.cfg, dah otomatis menuju sip phone ke si pemilik alamat MAC =D.

Tool dari cisco bisa di dapat di download pada link berikut:
 http://download.cisco.com/swc/esd/06/282724524/anon/spa50x-30x-sip-7-5-1a-spc.zip
4. Menambahkan opsi alamat IP TFTP server pada DHCP server
Setelah semua file konfigurasi di buat, tinggal tambahkan opsi alamat ip TFTP server, tujuannya adalah setelah sip phone dapat ip, memberitahukan alamat letak dimana konfigurasi sip phone.
option tftp-server-name         "192.168.0.100";
Silahkan restart DHCP server.

Setelah semua selesai, jika konfigurasi benar sip phone akan restart secara otomasi, kira-kira 3-5 kali restart, setelah itu bisa di lihat display sip phone. Dan coba untuk mendial keluar.
 
Copyright © 2011. COMASTNET - All Rights Reserved