Posts with the name or tag of emran;

by emran

OpenSIPS Externel Perl Script Run

10:15 am in Asterisk, FreeBSD, Kamailio, OpenSIPS, Perl by emran

You can easily redirect any sip uri based on opensips exec.so module on perl script. you need to load

loadmodule “exec.so”

In the route section you have to exec perl script with paramter $tu (To username) and $fu (from Username).

route {

if(method == “INVITE”) {
exec_dset(“/usr/local/bin/route.pl $fU $tU”);
sl_send_reply(“302″,”LCR Redirect”);
} else {
route(1);
}

}

In the perl script just write the follow code:

#!/bin/sh
echo sip:+121242415112@howtonix.com

NOTE: To get this to work correctly with Asterisk you need to add “promiscredir=yes” to the general section of your sip.conf

by emran

VoIP on Symbian Mobile

10:07 am in FreeSWITCH, PJSIP, Symbian by emran

Now a days it is very hot topics about voip on symbian mobile. To Call Over the internet from Mobile phone helps peoples life easier.There are few commercial and free voip mobile dialer for symbian and android.

One of them is Fring.You can make voip sip calls from fring.You can also use MSN, yahoo and Google.It supports many devices such as Nokia N73,n71,n75,E65 etc. It also support Other platform like iphone. It supports g711,GSM codec only.

SIPDialer is a product of E-SOFT BILLING PTE LTD. They provide commercial service. Their SIPDialer supports Symbian s60 3rd ed and android phone. You can send a demo request  from their website www.e-softbilling.com. They provide 5 days demo to run own sip proxy. SIPDialer supports G729,AMR,GSM and g711 codec. SIPDialre has balance display, realtime call duration, incoming call, DTMF, phone book features.Proxy IP can be changed on the fly.

SIPDroid is another opensource application for android phone.you can make audio and video calls from SIPDroid.It is based on mjsip.It has gsm, g711,ilbc and speex codecs.

by emran

Reducing the size of your GCCE executables for Symbian Carbide C++

4:32 am in PJSIP, Symbian by emran

Add the following code in mmp file:
OPTION GCCE -O2 -fno-unit-at-a-time

by emran

H323Plus on FreeSWITCH

3:20 pm in FreeSWITCH by emran

First you have to download & install ptlib:

In your home, create a directory e.g. h323
mkdir -p ~/h323
cd ~/h323
wget http://www.h323plus.org/source/download/ptlib-2.4.5.tar.bz2
bunzip2 ptlib-2.4.5.tar.bz2
tar -xvf ptlib-2.4.5.tar.bz2
mv ptlib-2.4.5 ptlib-trunk
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export LD_LIBRARY_PATH=/usr/local/lib
cd ptlib-trunk
./configure
make
sudo make install
cd ..

Now, install h323plus

cd ~/h323

http://www.h323plus.org/source/download/h323plus-v1_21_0.tar.gz

export PTLIBDIR=~/h323/ptlib-trunk

tar -xzvf h323plus-v1_21_0.tar.gz
cd h323plus
./configure
make
make install

Now install mod_h323 on Freeswitch.

assuming you have FS source in your home
cd ~/freeswitch-trunk

make mod_h323-clean
make mod_h323
sudo make mod_h323-install

Now configure h323.conf.xml. It is similiar like mod_opal.

<configuration name=”h323.conf” description=”H323 Endpoints”>
  <settings>
    <param name=”trace-level” value=”4″/>
    <param name=”context” value=”public”/>
    <param name=”dialplan” value=”XML”/>
    <param name=”codec-prefs” value=”PCMU,PCMU,G729,GSM”/>
  </settings>
  <listeners>
    <listener name=”myH323_listener”>
      <param name=”h323-ip” value=”$${local_ip_v4}”/>
      <param name=”h323-port” value=”1720″/>
    </listener>
  </listeners>
</configuration>

 

   

by emran

How to create tar.gz?

5:23 am in CentOS, Debian, Fedora, Linux, Mandrake, SuSE by emran

You can create tar.gz file with the following command.DO NOT ENTER / after the directory name.

tar -cvzf  test.tar.gz test

by emran

Raising the ulimit -n above 1024

1:18 am in Linux by emran

by default the ulimit is set to 1024 only, first u need to increase system wise with

“fs.file-max = 65536″

adding this one in sysctl.conf

and then “sysctl -p”

switch to /etc/securitty/limits.conf and add ther following lines

* hard nofile 65536
* soft nofile 16384

switch 2 user for which u need to increase the file-max for, with this the default for all users will be 16384,

u can increase with ulimit -n XXXX now

by emran

How to change quintum H323 Port?

6:35 pm in Others by emran

In the var_config.cfg file, you can now turn on a feature to block incoming
H323 calls. Set the following two lines:

H323Q931PortFlag 1
H323Q931PortNum 1788 or some other number for listening port (other than 0)”

Save as var_config.cfg and upload via FTP.

by emran

How to Install Perl CPAN Module

9:47 am in CentOS, Debian, Fedora, Linux, Mandrake, SuSE by emran

From the root prompt on your server, invoke the CPAN shell:

# perl -MCPAN -e shell

Once the Perl interpreter has loaded (and been configured), you can install modules with: install MODULENAME.

The first thing you should do is upgrade your CPAN:

cpan> install Bundle::CPAN

Once it is completed, type:

cpan> reload cpan

Now, enter the following command to retrieve all of the required modules:
cpan> install DateTime

Note

Be aware that after freshly installing make / gcc, your perl installation will not necessarily detect it. This means module installation will still fail during the 'make' stage. You may need to invoke the CPAN shell and run the setup routine again, to point to the location of make:
# perl -MCPAN -e shell CPAN

 

cpan> o conf make /usr/bin/make
cpan> o conf commit

by emran

How to open Unlimited Socket in linux?

10:17 pm in Linux by emran

execute this in your shell before you start Application

ulimit -c unlimited
ulimit -d unlimited
ulimit -f unlimited
ulimit -i unlimited
ulimit -n 999999
ulimit -q unlimited
ulimit -u unlimited
ulimit -v unlimited
ulimit -x unlimited
ulimit -s 244
ulimit -l unlimited

by emran

Incoming Call Limit in FreeSWITCH

1:09 pm in FreeSWITCH by emran

Incoming call-limit can be controlled in FreeSWITCH from user directory for example:

<document type=”freeswitch/xml”>
  <section name=”directory”>
    <domain name=”192.168.0.2″>
      <user id=”some_user”>
        <params>
          <param name=”password” value=”some_password”/>
        </params>
        <variables>
                       <variable name=”accountcode” value=”315″/>
                       <variable name=”user_context” value=”default”/>
                       <variable name=”vm_extension” value=”315″/>
                       <variable name=”max_calls” value=”1″/>
          </variables>
      </user>
    </domain>
  </section>
</document>