<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux and Unix technical recipes &#187; PJSIP</title>
	<atom:link href="http://www.howtonix.com/category/pjsip/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.howtonix.com</link>
	<description>Linux Tutorial and Guide</description>
	<lastBuildDate>Thu, 30 Sep 2010 23:41:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Block DDoS attack on SIP Server</title>
		<link>http://www.howtonix.com/block-ddos-attack-sip-server/</link>
		<comments>http://www.howtonix.com/block-ddos-attack-sip-server/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 21:29:45 +0000</pubDate>
		<dc:creator>emran</dc:creator>
				<category><![CDATA[Asterisk]]></category>
		<category><![CDATA[FreeSWITCH]]></category>
		<category><![CDATA[Kamailio]]></category>
		<category><![CDATA[OpenSIPS]]></category>
		<category><![CDATA[PJSIP]]></category>
		<category><![CDATA[Yate]]></category>
		<category><![CDATA[DDoS Attach on SIP Server]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=150</guid>
		<description><![CDATA[google_ad_client = "pub-4492234592142803"; /* 468x60, created 9/1/10 howtonix */ google_ad_slot = "5691725759"; google_ad_width = 468; google_ad_height = 60; Sometimes SIP Server attacked by hacker with huge number of SIP Registration.Which make mad the SIP Server.Full service can be get down. It can be blocked easily by IPTables. IPTables will work as Session Border Controller(SBC) for [...]]]></description>
			<content:encoded><![CDATA[
<!-- Quick Adsense WordPress Plugin: http://techmilieu.com/quick-adsense -->
<div style="float:none;margin:10px 0 10px 0;text-align:center;">
<script type="text/javascript">

google_ad_client = "pub-4492234592142803";
/* 468x60, created 9/1/10 howtonix */
google_ad_slot = "5691725759";
google_ad_width = 468;
google_ad_height = 60;


</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<p>Sometimes SIP Server attacked by hacker with huge number of  SIP Registration.Which make mad the SIP Server.Full service can be get down. It can be blocked easily by IPTables. IPTables will work as Session Border Controller(SBC) for SIP Server. This script will work only with SIP.it will not work for TLS or SIPS.</p>
<blockquote><p>
#!/bin/sh<br />
#<br />
# INVITE rate, per host.  Remember a successful (authenticated) call requires 2 INVITEs-<br />
# Initial INVITE, 407 auth required (w/ nonce), INVITE with nonce and authentication.<br />
IRATE=4/minute</p>
<p># REGISTER rate, per host.<br />
RRATE=2/minute</p>
<p># All other SIP methods rate, per host.  Be careful with SUBSCRIBEs, OPTIONS, CANCELs, etc.<br />
ORATE=10/minute</p>
<p># Methods for this script to ignore.  These SIP methods are always allowed.<br />
IGMETH=&#8221;OPTIONS&#8221;</p>
<p># Burst<br />
BURST=1</p>
<p># Interface(s) to protect on INPUT. Seperate multiple interfaces with spaces.<br />
# This will protect SIP services on THIS HOST.<br />
IFACE=&#8221;eth0&#8243;</p>
<p># Reject/drop action &#8211; usually something like DROP or REJECT.<br />
# Use ACCEPT to use this script to not filter traffic but still collect statistics.<br />
DACTION=DROP</p>
<p># Protocol(s) to filter &#8211; can be either tcp or udp or both. Seperate multiples with spaces.<br />
PROTOCOLS=&#8221;udp tcp&#8221;</p>
<p># Enable logging.<br />
#LOG=YES</p>
<p># Block tel: URIs completely?<br />
# P.S. &#8211; tel: sucks!<br />
BLOCKTEL=yes</p>
<p># Interface(s) to protect on FORWARD. Seperate multiple interfaces with spaces.<br />
# The same hashtable will protect the entire network from the same host(s).<br />
# Destination IP is NOT taken into consideration.<br />
# This will protect any SIP services running on the network that uses this machine<br />
# as a router (as long as you get the interfaces right).<br />
#FIFACE=&#8221;eth0&#8243;</p>
<p># Location of iptables binary.<br />
IPTABLES=`which iptables`</p>
<p># Search packet to this location. A larger offset looks further into the packet<br />
# and takes more time but could catch more attacks (and false alarms).<br />
# Remember, the method to match on is always in the beginning of the packet.<br />
OFFSET=65</p>
<p># SIP port<br />
SPORT=5060</p>
<p>if [ ! "$1" ]<br />
then<br />
echo &#8220;SIP DoS/DDoS mitigation script for iptables<br />
See top of script for configuration</p>
<p>Usage:<br />
$0 [start|stop|status]&#8221;<br />
exit 1<br />
fi</p>
<p>if [ "$1" = "status" ]<br />
then<br />
$IPTABLES -L -v -n<br />
exit<br />
fi</p>
<p># Setup iptables<br />
$IPTABLES -F sipdos 2&gt; /dev/null<br />
$IPTABLES -X sipdos 2&gt; /dev/null<br />
$IPTABLES -N sipdos 2&gt; /dev/null</p>
<p>if [ "$1" = "stop" ]<br />
then<br />
echo &#8220;Clearing iptables rules&#8230;&#8221;<br />
if [ "$FIFACE" ]<br />
then<br />
$IPTABLES -F FORWARD 2&gt; /dev/null<br />
fi<br />
$IPTABLES -F INPUT 2&gt; /dev/null<br />
exit<br />
fi</p>
<p># Send the right traffic through our chain<br />
for i in $IFACE<br />
do<br />
for l in $PROTOCOLS<br />
do<br />
$IPTABLES -A INPUT -i $i -m $l -p $l &#8211;dport $SPORT -j sipdos<br />
done<br />
done</p>
<p># Send the right forwarded traffic through our chain<br />
if [ "$FIFACE" ]<br />
then<br />
for j in $FIFACE<br />
do<br />
for l in $PROTOCOLS<br />
do<br />
$IPTABLES -A FORWARD -i $j -m $l -p $l &#8211;dport $SPORT -j sipdos<br />
done<br />
done<br />
fi</p>
<p># &#8220;Handle&#8221; tel: URIs<br />
if [ "$BLOCKTEL" ]<br />
then<br />
$IPTABLES -A sipdos -m string &#8211;string &#8220;tel:&#8221; &#8211;algo bm &#8211;to $OFFSET -j $DACTION<br />
fi</p>
<p># Ignore certain (configured) methods<br />
if [ "$IGMETH" ]<br />
then<br />
for k in $IGMETH<br />
do<br />
$IPTABLES -A sipdos -m string &#8211;string &#8220;$k sip:&#8221; &#8211;algo bm &#8211;to $OFFSET -j ACCEPT<br />
done<br />
fi</p>
<p># Finally set some limits&#8230;</p>
<p># INVITE limit<br />
$IPTABLES -A sipdos -m string &#8211;string &#8220;INVITE sip:&#8221; &#8211;algo bm &#8211;to $OFFSET \<br />
-m hashlimit &#8211;hashlimit $IRATE &#8211;hashlimit-burst $BURST \<br />
&#8211;hashlimit-mode srcip,dstport &#8211;hashlimit-name sip_i_limit -j ACCEPT</p>
<p># REGISTER limit<br />
$IPTABLES -A sipdos -m string &#8211;string &#8220;REGISTER sip:&#8221; &#8211;algo bm &#8211;to $OFFSET \<br />
-m hashlimit &#8211;hashlimit $RRATE &#8211;hashlimit-burst $BURST \<br />
&#8211;hashlimit-mode srcip,dstport &#8211;hashlimit-name sip_r_limit -j ACCEPT</p>
<p># All other SIP packets&#8230;<br />
$IPTABLES -A sipdos -m hashlimit &#8211;hashlimit $ORATE &#8211;hashlimit-burst $BURST \<br />
&#8211;hashlimit-mode srcip,dstport &#8211;hashlimit-name sip_o_limit -j ACCEPT</p>
<p># Take action on everything else<br />
if [ $LOG ]<br />
then<br />
$IPTABLES -A sipdos -j LOG<br />
fi</p>
<p>$IPTABLES -A sipdos -j $DACTION</p></blockquote>

<div style="font-size:0px;height:0px;line-height:0px;margin:0;padding:0;clear:both"></div>]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/block-ddos-attack-sip-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>VoIP on Symbian Mobile</title>
		<link>http://www.howtonix.com/voip-symbian-mobile/</link>
		<comments>http://www.howtonix.com/voip-symbian-mobile/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 17:07:11 +0000</pubDate>
		<dc:creator>emran</dc:creator>
				<category><![CDATA[FreeSWITCH]]></category>
		<category><![CDATA[PJSIP]]></category>
		<category><![CDATA[Symbian]]></category>
		<category><![CDATA[Symbian Android VoIP SIP Mobile Dialer Video Clalls]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=126</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>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.</p>
<p>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 <a title="E-SOFT BILLING PTE LTD" href="http://www.e-softbilling.com" target="_blank">www.e-softbilling.com</a>. 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.</p>
<p>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.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/voip-symbian-mobile/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Reducing the size of your GCCE executables for Symbian Carbide C++</title>
		<link>http://www.howtonix.com/reducing-size-gcce-executables-symbian-carbide/</link>
		<comments>http://www.howtonix.com/reducing-size-gcce-executables-symbian-carbide/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 11:32:53 +0000</pubDate>
		<dc:creator>emran</dc:creator>
				<category><![CDATA[PJSIP]]></category>
		<category><![CDATA[Symbian]]></category>
		<category><![CDATA[Symbian Optization Carbide C++]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=109</guid>
		<description><![CDATA[Add the following code in mmp file: OPTION GCCE -O2 -fno-unit-at-a-time]]></description>
			<content:encoded><![CDATA[<p>Add the following code in mmp file:<br />
OPTION GCCE -O2 -fno-unit-at-a-time</p>
]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/reducing-size-gcce-executables-symbian-carbide/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to enable APS-Direct in pjsip</title>
		<link>http://www.howtonix.com/how-to-enable-aps-direct-in-pjsip/</link>
		<comments>http://www.howtonix.com/how-to-enable-aps-direct-in-pjsip/#comments</comments>
		<pubDate>Sat, 26 Sep 2009 04:29:49 +0000</pubDate>
		<dc:creator>emran</dc:creator>
				<category><![CDATA[PJSIP]]></category>
		<category><![CDATA[Symbian]]></category>

		<guid isPermaLink="false">http://www.howtonix.com/?p=8</guid>
		<description><![CDATA[If you are using PJSIP 1.3 Edit config_site.h #if defined(PJ_SYMBIAN) &#124;&#124; PJ_SYMBIAN==1 #   define PJMEDIA_AUDIO_DEV_HAS_SYMB_APS       1 #   define PJMEDIA_AUDIO_DEV_HAS_SYMB_MDA       0 #endif // &#8230; #define PJMEDIA_CONF_USE_SWITCH_BOARD   1 // Below, enable all codecs you need //&#8230; //Enable passthrough codecs #define PJMEDIA_HAS_PASSTHROUGH_CODECS  1 // Disable all passthrough codecs except PCMA and PCMU #define PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMU      1 #define PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMA      1 [...]]]></description>
			<content:encoded><![CDATA[<p>If you are using PJSIP 1.3</p>
<p>Edit config_site.h<br />
#if defined(PJ_SYMBIAN) || PJ_SYMBIAN==1<br />
#   define PJMEDIA_AUDIO_DEV_HAS_SYMB_APS       1<br />
#   define PJMEDIA_AUDIO_DEV_HAS_SYMB_MDA       0<br />
#endif</p>
<p>// &#8230;</p>
<p>#define PJMEDIA_CONF_USE_SWITCH_BOARD   1<br />
// Below, enable all codecs you need<br />
//&#8230;</p>
<p>//Enable passthrough codecs<br />
#define PJMEDIA_HAS_PASSTHROUGH_CODECS  1</p>
<p>// Disable all passthrough codecs except PCMA and PCMU<br />
#define PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMU      1<br />
#define PJMEDIA_HAS_PASSTHROUGH_CODEC_PCMA      1<br />
#define PJMEDIA_HAS_PASSTHROUGH_CODEC_AMR       0<br />
#define PJMEDIA_HAS_PASSTHROUGH_CODEC_G729      0<br />
#define PJMEDIA_HAS_PASSTHROUGH_CODEC_ILBC      0</p>
<p>Edit you mmp project file:<br />
#define SND_HAS_APS     1<br />
#define SND_HAS_VAS     0<br />
#define SND_HAS_MDA     0<br />
Specify application UID in a global variable named APP_UID whose base type TPtrC, e.g:<br />
TPtrC APP_UID = _L(&#8220;2000521C&#8221;);</p>
<p>Link the application to APS library, i.e:<br />
LIBRARY         APSSession2.lib</p>
<p>Add MultimediaDD capability to your application, i.e. in application MMP:<br />
CAPABILITY      MultimediaDD &#8230;<br />
Install APS Server apsserver2.sisx to device, the installer comes with the APS SDK package i.e in folder InstallToDevice/AudioProxyServer243. You will need to do this only once for each device.</p>
<p> <br />
The complete step-by-step process is detailed in:<br />
<a href="http://trac.pjsip.org/repos/wiki/APS">http://trac.pjsip.org/repos/wiki/APS</a><br />
and<br />
<a href="http://trac.pjsip.org/repos/wiki/Nokia_APS_VAS_Direct">http://trac.pjsip.org/repos/wiki/Nokia_APS_VAS_Direct</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.howtonix.com/how-to-enable-aps-direct-in-pjsip/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

