How to add binary to launch pad ?


sudo apt-get install gnome-panel --no-install-recommends
sudo gnome-desktop-item-edit /usr/share/applications/ --create-new


Browse command and add path. You also browse for icon as well.

Opensips & Asterisk Dependencies for Debian

Dependencies for Asterisk

1. build-essential
2. ncurses-dev
3. libxml2-dev
4. sqlite3
5. libsqlite3-dev
6. libcurl3-openssl-dev
7. uuid
8. uuid-dev
9. openssl
10. libssl-dev


Dependencies for Opensips

1. radiusclient-ng
2. hiredis
3. libconfuse
4. libcurl
5. curl
6. mysql-client
7. libmysqlclient-dev
8. libpcre-dev
9. libpcre-dev
10. libmicrohttpd
11. libxml-dev
12. libxmlrpc-c3
13. libhiredis-dev
14. libconfuse-dev
15. libconfuse-common
16. libcurl-dev
17. mysql-client-5.5
18. mysql-server-5.5
19. libmysqlclient-dev
20. libdb-dev
21. libmicrohttpd-dev
22. build-essential
23. openssl
24. bison
25. flex
26. libssl-dev
27. libxml2-dev
28. libxml2
29. libconfuse0
30. libconfuse-dev
31. libdb-dev
32. libcurl4-gnutls-dev
33. libcurl3
34. libpostgresql-ocaml-dev
35. libpq-dev
36. unixodbc-dev
37. libpcre3-dev
38. libexpat1-dev
39. libjson0-dev
40. libmemcached-dev
41. libmemcache-dev
42. libxmlrpc-c3-dev
43. libgeoip-dev
44. python-dev
45. libsnmp-dev


apt-get install radiusclient-ng hiredis libconfuse libcurl curl mysql-client libmysqlclient-dev libpcre-dev  libpcre-dev libmicrohttpd  libxml-dev libxmlrpc-c3 libhiredis-dev libconfuse-dev libconfuse-common libcurl-dev  mysql-client-5.5  mysql-server-5.5  libmysqlclient-dev libdb-dev libmicrohttpd-dev build-essential openssl bison flex libssl-dev  libxml2-dev  libxml2  libconfuse0 libconfuse-dev  libdb-dev libcurl4-gnutls-dev libcurl3 libpostgresql-ocaml-dev  libpq-dev unixodbc-dev libpcre3-dev  libexpat1-dev  libjson0-dev libmemcached-dev  libmemcache-dev libxmlrpc-c3-dev libgeoip-dev  python-dev libsnmp-dev

FreeRADIUS Installation and Integration with Perl


apt-get install autotools-dev debhelper libgdbm-dev libiodbc2-dev libkrb5-dev libldap2-dev libltdl3-dev libmysqlclient15-dev libpam0g-dev libpcap-dev libperl-dev libpq-dev libsasl2-dev libsnmp-dev libtool python-dev

apt-get install mysql-server-5.5 libodbc1

cd /usr/src/
wget ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-2.2.0.tar.gz
tar -zxvf freeradius-server-2.2.0.tar.gz
cd freeradius-server-2.2.0
./configure
make
make install

radiusd -X
^C


## RADIUS CONFIGURATION FOR Perl ##

tar -zxvf redis-2.6.14.tar.gz
cd redis-2.6.14/
make
make install
redis-server
^C

cd /usr/local/etc/raddb/modules/

vim module/perl


uncomment
{
...
#change path from example.pl to vopium.pl

module = ${confdir}/vopium.pl
...

func_authenticate = authenticate
func_authorize = authorize
func_preacct = preacct
func_accounting = accounting
func_checksimul = checksimul
func_pre_proxy = pre_proxy
func_post_proxy = post_proxy
func_post_auth = post_auth
func_recv_coa = recv_coa
func_send_coa = send_coa
func_xlat = xlat
func_detach = detach

}

:wq!

vim sites-enable/default

authorize {
#comment all and add
perl
}

authenticate {

#comment all and add
digest
perl
Auth-Type Perl {
perl
}
}
preacct {

#comment all and uncomment below lines
update request {
FreeRADIUS-Acct-Session-Start-Time = "%{expr: %l - %{%{Acct-Session-Time}:-0} - %{%{Acct-Delay-Time}:-0}}"
}
# Add perl
perl

}

accounting {

#comment all and add
detail
perl

}

session {
#comment all
}
post-auth {

#comment all
}
pre-proxy {

#comment all
}
post-proxy {

#comment all
}

:wq!


vim sites-enable/inner-tunnel

authorize{

#comment all
}

authenticate {
#comment all
}

:wq!


cd ~

radiusd -X

KANNEL Installation

Kannel Installation

$ yum install lynx pcre pcre-devel
$ cd /usr/local/src
$ svn co https://svn.kannel.org/gateway/trunk
$ cd trunk
$ ./configure --enable-start-stop-daemon --disable-wap --enable-mutex-stats --enable-pcre
$ make
$ make install

Asterisk performance improvment by Changing Sound CODEC


Command to convert wav file to sample 8000 and 16 bit
sox foo-in.wav -b 16 -r 8000 -c 1 -s foo-out.wav resample -ql
For Bulk changes
for a in *.wav; do sox /path/to/files/$a -b 16 -r 8000 -c 1 -s /path2/to2/files2/$a; done;

Asterisk command to convert sound files to differenet codecs.
asterisk -rx "file convert /tmp/not-permitted_c.wav /tmp/not-permitted.alaw"
For Bulk Changes
for a in /path/to/files/*.wav; do rasterisk -x "file convert $a `echo $a|sed "s/.wav/.alaw/"`"; done;

Rename IVRs
for a in ivr-name.*; do mv $a `echo $a | sed "s/ivr-name/ivr-new-name/"`; done

Reference
http://www.amitnepal.com/asterisk-convert-sound-to-g729/

Installing OpenSIPs-1.10beta on Ubuntu 12.04

  1. Resolve Dependencies
  2. For Ubuntu
    $ apt-get install build-essential openssl bison flex mysql-server libmysqlclient16 libmysqlclient-dev libsctp-dev openssl libssl-dev libradiusclient-ng-dev libxml2-dev libxml2 libconfuse0 libconfuse-dev libdb-dev libcurl4-gnutls-dev libcurl3 libpostgresql-ocaml-dev libpq-dev unixodbc-dev libpcre3-dev libexpat1-dev libjson0-dev libmemcached-dev libmemcache-dev libxmlrpc-c3-dev libgeoip-dev python-dev libsnmp-dev
    
    For CentoOS
    yum groupinstall "Development Tools"
    yum install ncurses-devel.x86_64 libmicrohttpd-devel.x86_64 openssl openssl-devel.x86_64
    
    1. Download latest opensips from www.opensips.org or for opensips-1.10beta use the following command
    $ wget http://opensips.org/pub/opensips/latest/src/opensips-1.10_src.tar.gz
    
    1. Use "tar -zxvf" to extract opensips tar file
    $ tar -zxvf opensips-1.10_src.tar.gz
    
    1. go into the directory
    $ cd opensips-1.10.0beta-tls
    
    1. make the configuration file
    $ make menuconfig
    --> Configure Compile Options
    --> Configure Excluded Modules
    
    1. Select the modules to be loaded
    --> Configure Install Prefix
        /usr/local/
    --> Save Changes
    --> Compile And Install OpenSIPS
    --> Exit & Save All Changes
    
    1. If you want to configure opensips with Database then do the changes in the following file
    $ vim /usr/local/etc/opensips/opensipsctlrc
    
    # If you want to setup a database with opensipsdbctl, you must at least specify
    # this parameter.
    DBENGINE=MYSQL
    
    ## database host
    DBHOST=localhost
    
    ## database name (for ORACLE this is TNS name)
    DBNAME=opensips
    
    # database path used by dbtext or db_berkeley
    # DB_PATH="/usr/local/etc/opensips/dbtext"
    
    ## database read/write user
    DBRWUSER=opensips
    
    ## password for database read/write user
    DBRWPW="opensips"
    
    1. Go to Install prefix directory /usr/local/sbin/
    $ ./opensipsdbctl create
    $ ./opensipsctl start
    
    ********************************* PROBLEMS ***********************************
    evi/../lock_alloc.h:60:2: error: #error "locking requires shared memory support"
    
    Add line following line in Makefile
    DEFS+= -DSHM_MEM
    
    Enjoy ;)

OpenSIPs Configuration with RTPproxy on Amazon EC2



Tools Needed

1. Amazon EC2
2. OpenSIPs
3. RTPproxy

Install RTPproxy
start RTPproxy with follwoing Flags

/usr/local/bin/rtpproxy -p /var/run/rtpproxy.pid -u root -F -s udp:127.0.0.1:22222 -A 192.168.0.1/8.8.8.8 -m 11000 -M 62000 -n tcp:127.0.0.1:22222 -i 30 -T 30 -W 30 -2 -d DBUG local0

Read RTPproxy flags details from its documentation.

Install OpenSIPs
add following lines according to you settings

############## AWS ###########
auto_aliases=no
listen=udp:192.168.0.1:5060     # customize me
advertised_address="8.8.8.8"   # Amozon's Public IP
advertised_port=5060
alias="8.8.8.8"                           # Amazons's Public IP
##################################

use module RTPPROXY

#### RTP Proxy ####
loadmodule "rtpproxy.so"
modparam("rtpproxy", "rtpproxy_autobridge", 1)
modparam("rtpproxy", "nortpproxy_str", "a=sdpmangled:yes\r\n")
modparam("rtpproxy", "rtpproxy_sock", "udp:127.0.0.1:22222")
modparam("rtpproxy", "rtpp_notify_socket", "tcp:127.0.0.1:22222")
#### END ###

Use Function in INVITEs rtpproxy_offer("OCNFIE","IP");and rtpproxy_answer("OCNFIE","IP"); in 200OK to manipulate SDP packets.


How to resize any VMs Hard disk size

Pre-Requiste First Confirm if your Linux machine was created using LVM or not, execute the following commands pvdisplay vgdisplay lvdisplay ...