<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://sip-router.org/wiki/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://sip-router.org/wiki/feed.php">
        <title>sip-router.org migration</title>
        <description></description>
        <link>http://sip-router.org/wiki/</link>
        <image rdf:resource="http://sip-router.org/wiki/lib/images/favicon.ico" />
       <dc:date>2010-09-08T22:12:49+02:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://sip-router.org/wiki/migration/kamailio-3.0-config?rev=1259335671&amp;do=diff"/>
                <rdf:li rdf:resource="http://sip-router.org/wiki/migration/kamailio-module-docbook?rev=1240561304&amp;do=diff"/>
                <rdf:li rdf:resource="http://sip-router.org/wiki/migration/kamailio-tips?rev=1260467261&amp;do=diff"/>
                <rdf:li rdf:resource="http://sip-router.org/wiki/migration/module_differences?rev=1242047024&amp;do=diff"/>
                <rdf:li rdf:resource="http://sip-router.org/wiki/migration/new-features-for-k-users?rev=1257417381&amp;do=diff"/>
                <rdf:li rdf:resource="http://sip-router.org/wiki/migration/ser-2.1-migration?rev=1244106353&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://sip-router.org/wiki/lib/images/favicon.ico">
        <title>sip-router.org</title>
        <link>http://sip-router.org/wiki/</link>
        <url>http://sip-router.org/wiki/lib/images/favicon.ico</url>
    </image>
    <item rdf:about="http://sip-router.org/wiki/migration/kamailio-3.0-config?rev=1259335671&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-11-27T16:27:51+02:00</dc:date>
        <title>migration:kamailio-3.0-config</title>
        <link>http://sip-router.org/wiki/migration/kamailio-3.0-config?rev=1259335671&amp;do=diff</link>
        <description>&lt;pre&gt;
@@ -1,732 +1,8 @@
  ====== Kamailio 3.0 Config ======
  
- This page provides guidelines to get the default config file of Kamailio 1.5.x working with SIP Router core.
  
- Functionalities:
-   * SIP routing
-   * User location
-   * Authentication
-   * Accounting
-   * NAT traversal
-   * Presence server
+ Updated tutorial using the **kamailio_3.0** branch is available at:
  
- [b]IMPORTANT:[/b]
-   * [b]check the tips page: http://sip-router.org/wiki/migration/kamailio-tips[/b]
-   * [b]see what is new in devel version: http://sip-router.org/wiki/features/new-in-devel[/b]
+ http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-3.0.x-from-git
  
- 
- ===== 1. Install from GIT =====
- 
- &amp;lt;hi #6495ed&amp;gt;It is highly recommended that you have Kamailio 1.5.x installed already so you can use the additional tools coming with that version and not yet included in SIP Router. See here [[http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-1.5.x-from-svn|a step by step guide to install Kamailio 1.5.x from SVN]]&amp;lt;/hi&amp;gt;
- 
- The steps here are given for Unbuntu/Debian based distributions and should be easy to adapt to other Linux distros.
- 
- ==== 1.1. Prerequisites ====
- 
- To be able to follow the guidelines from this document you need **root** access.
- 
- The following packages are required before proceeding to the next steps.
- 
-   * __git__ client: apt-get install git-core - it is recommended to have the latest version, which might not be part of the distribution yet, but you can get it from: http://git-scm.com/
- 
-   * __gcc__ compiler: apt-get install gcc
- 
-   * __flex__ - apt-get install flex
- 
-   * __bison__ - apt-get install bison
- 
-   * __libmysqlclient15-dev__ - apt-get install libmysqlclient15-dev
- 
-   * __make__ - apt-get install make
- 
- ==== 1.2. Getting sources from GIT ====
- 
- 
- First of all, you have to create a directory on the file system where the sources will be stored. 
- 
- &amp;lt;code&amp;gt;
-   mkdir -p /usr/local/src/sr
-   
-   cd /usr/local/src/sr
- &amp;lt;/code&amp;gt;
- 
- Download the sources from GIT using the following command.
- 
- &amp;lt;code&amp;gt;
- git clone --depth 1 git://git.sip-router.org/sip-router
- &amp;lt;/code&amp;gt;
- 
- 
- ==== 1.3.Tuning Makefiles ====
- 
- Next step is to edit Makefile files to include the MySQL module.
- &amp;lt;code&amp;gt;
-   cd sip-router
-   
-   vim Makefile
- &amp;lt;/code&amp;gt;
- 
- Remove **db_mysql** from **exclude_modules** variable.
- 
- Note: if you need PCRE-dependent modules (e.g., lcr, dialplan, regexp), instal the PCRE devel library and uncomment
- 
- 
- ==== 1.4. Compile SIP Router ====
- 
- Once the mysql module was removed from excluded modules list, you can compile:
- 
- &amp;lt;code&amp;gt;
-   make all
- &amp;lt;/code&amp;gt;
- 
- 
- ==== 1.5. Install SIP Router ====
- 
- When the compilation is ready, install with the following command:
- 
-   make install
- 
- ==== 1.6. What and where was installed ====
- 
- The binaries and executable scripts were installed in:
- 
- &amp;lt;code&amp;gt;
-   /usr/local/sbin
- &amp;lt;/code&amp;gt;
- 
- These are:
- 
-   * __ser__ - SIP Router binary
- 
- 
- To be able to use the binaries from command line, make sure that '/usr/local/sbin' is set in PATH environment variable. You can check that with 'echo $PATH'. If not and you are using 'bash', open '/root/.bash_profile' and at the end add:
- 
-   PATH=$PATH:/usr/local/sbin
-   export PATH
- 
- SIP Router modules are installed in:
- 
-   /usr/local/lib/ser/modules/
- 
- The documentation and readme files are installed in:
- 
-   /usr/local/share/doc/ser/
- 
- The man pages are installed in:
- 
-   /usr/local/share/man/man5/
-   /usr/local/share/man/man8/
- 
- The configuration file was installed in:
- 
-   /usr/local/etc/ser/ser.cfg
- 
- However, this configuration file is not the one used by Kamailio (OpenSER) 1.5.x. Section 2 includes it.
- 
- 
- ===== 2. Kamailio Config File =====
- 
-   * this is the configuration file from Kamailio (OpenSER) 1.5.x adapted for the development version based on SIP-Router.org project
-   * it has turned on most of the features that are by default commented (authentication, accounting, nat traversal, presence)
-   * copy it and paste into **/usr/local/etc/ser/kamailio.org**
- 
- **Remarks**:
-   * it runs in debug mode, level 5
-   * only udp, tcp is disabled
-   * one child
- 
- &amp;lt;code c&amp;gt;
- #
- # $Id: kamailio.cfg 5679 2009-03-10 09:22:27Z ibc_sf $
- #
- # Kamailio (OpenSER) SIP Server - basic configuration script
- #     - web: http://www.kamailio.org
- #     - svn: http://openser.svn.sourceforge.net/viewvc/openser/
- #
- # Direct your questions about this file to: &amp;lt;users@lists.kamailio.org&amp;gt;
- #
- # Refer to the Core CookBook at http://www.kamailio.org/dokuwiki/doku.php
- # for an explanation of possible statements, functions and parameters.
- #
- # There are comments showing how to enable different features in th econfig
- # file. Such commented code starts with #X# where X is a letter to identify
- # a feature. Delete entire #X# if you want to enable that feature. Next are
- # sed commands that help you enable such features.
- #
- # *** To enable mysql execute:
- #     sed -i 's///g' kamailio.cfg
- #
- # *** To enable authentication execute:
- #     - enable mysql
- #     sed -i 's///g' kamailio.cfg
- #     - add users using 'kamctl'
- #
- # *** To enable persistent user location execute:
- #     - enable mysql
- #     sed -i 's///g' kamailio.cfg
- #
- # *** To enable presence server execute:
- #     - enable mysql
- #     sed -i 's///g' kamailio.cfg
- #
- # *** To enable nat traversal execute:
- #     sed -i 's///g' kamailio.cfg
- #     - install RTPProxy: http://www.rtpproxy.org
- #     - start RTPProxy:
- #        rtpproxy -l _your_public_ip_ -s udp:localhost:7722
- #
- # *** To enhance accounting execute:
- #     - enable mysql
- #     sed -i 's///g' kamailio.cfg
- #     - add following columns to database
- # ALTER TABLE acc ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT '';
- # ALTER TABLE acc ADD COLUMN src_domain VARCHAR(128) NOT NULL DEFAULT '';
- # ALTER TABLE acc ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT '';
- # ALTER TABLE acc ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT '';
- # ALTER TABLE acc ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT '';
- # ALTER TABLE missed_calls ADD COLUMN src_user VARCHAR(64) NOT NULL DEFAULT '';
- # ALTER TABLE missed_calls ADD COLUMN src_domain VARCHAR(128) NOT NULL DEFAULT '';
- # ALTER TABLE missed_calls ADD COLUMN dst_ouser VARCHAR(64) NOT NULL DEFAULT '';
- # ALTER TABLE missed_call ADD COLUMN dst_user VARCHAR(64) NOT NULL DEFAULT '';
- # ALTER TABLE missed_calls ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT '';
- #
- 
- 
- ####### Global Parameters #########
- 
- debug=4
- memdbg=5
- memlog=5
- log_stderror=yes
- log_facility=LOG_LOCAL0
- 
- fork=yes
- children=1
- 
- /* uncomment the following lines to enable debugging */
- #debug=6
- #fork=no
- #log_stderror=yes
- 
- /* uncomment the next line to disable TCP (default on) */
- disable_tcp=yes
- 
- /* uncomment the next line to enable the auto temporary blacklisting of 
-    not available destinations (default disabled) */
- #disable_dns_blacklist=no
- 
- /* uncomment the next line to enable IPv6 lookup after IPv4 dns 
-    lookup failures (default disabled) */
- #dns_try_ipv6=yes
- 
- /* uncomment the next line to disable the auto discovery of local aliases
-    based on revers DNS on IPs (default on) */
- auto_aliases=no
- 
- /* uncomment the following lines to enable TLS support  (default off) */
- #disable_tls = no
- #listen = tls:your_IP:5061
- #tls_verify_server = 1
- #tls_verify_client = 1
- #tls_require_client_certificate = 0
- #tls_method = TLSv1
- #tls_certificate = &amp;quot;/usr/local/etc/kamailio/tls/user/user-cert.pem&amp;quot;
- #tls_private_key = &amp;quot;/usr/local/etc/kamailio/tls/user/user-privkey.pem&amp;quot;
- #tls_ca_list     = &amp;quot;/usr/local/etc/kamailio/tls/user/user-calist.pem&amp;quot;
- 
- 
- /* uncomment and configure the following line if you want Kamailio to 
-    bind on a specific interface/port/proto (default bind on all available) */
- listen=udp:192.168.1.23:5060
- 
- 
- ####### Modules Section ########
- 
- #set module path
- loadpath &amp;quot;./&amp;quot;
- 
- /* uncomment next line for MySQL DB support */
- loadmodule &amp;quot;modules/db_mysql.so&amp;quot;
- loadmodule &amp;quot;modules_k/mi_fifo.so&amp;quot;
- loadmodule &amp;quot;modules_k/mi_datagram.so&amp;quot;
- loadmodule &amp;quot;modules_k/kex.so&amp;quot;
- loadmodule &amp;quot;modules_k/sl.so&amp;quot;
- loadmodule &amp;quot;modules/tm.so&amp;quot;
- loadmodule &amp;quot;modules_k/tmx.so&amp;quot;
- loadmodule &amp;quot;modules_k/rr.so&amp;quot;
- loadmodule &amp;quot;modules_k/pv.so&amp;quot;
- loadmodule &amp;quot;modules_k/maxfwd.so&amp;quot;
- loadmodule &amp;quot;modules_k/usrloc.so&amp;quot;
- loadmodule &amp;quot;modules_k/registrar.so&amp;quot;
- loadmodule &amp;quot;modules_k/textops.so&amp;quot;
- loadmodule &amp;quot;modules_k/uri_db.so&amp;quot;
- loadmodule &amp;quot;modules_k/siputils.so&amp;quot;
- loadmodule &amp;quot;modules_k/xlog.so&amp;quot;
- loadmodule &amp;quot;modules_k/acc.so&amp;quot;
- /* uncomment next lines for MySQL based authentication support 
-    NOTE: a DB (like db_mysql) module must be also loaded */
- loadmodule &amp;quot;modules_k/auth.so&amp;quot;
- loadmodule &amp;quot;modules_k/auth_db.so&amp;quot;
- /* uncomment next line for aliases support
-    NOTE: a DB (like db_mysql) module must be also loaded */
- #loadmodule &amp;quot;modules_k/alias_db.so&amp;quot;
- /* uncomment next line for multi-domain support
-    NOTE: a DB (like db_mysql) module must be also loaded
-    NOTE: be sure and enable multi-domain support in all used modules
-          (see &amp;quot;multi-module params&amp;quot; section ) */
- #loadmodule &amp;quot;modules_k/domain.so&amp;quot;
- /* uncomment the next two lines for presence server support
-    NOTE: a DB (like db_mysql) module must be also loaded */
- loadmodule &amp;quot;modules_k/presence.so&amp;quot;
- loadmodule &amp;quot;modules_k/presence_xml.so&amp;quot;
- 
- loadmodule &amp;quot;modules_k/nathelper.so&amp;quot;
- 
- # ----------------- setting module-specific parameters ---------------
- 
- 
- # ----- mi_fifo params -----
- modparam(&amp;quot;mi_fifo&amp;quot;, &amp;quot;fifo_name&amp;quot;, &amp;quot;/tmp/kamailio_fifo&amp;quot;)
- 
- 
- # ----- mi_datagram params -----
- modparam(&amp;quot;mi_datagram&amp;quot;, &amp;quot;socket_name&amp;quot;, &amp;quot;udp:127.0.0.1:7744&amp;quot;)
- 
- 
- # ----- rr params -----
- # add value to ;lr param to cope with most of the UAs
- modparam(&amp;quot;rr&amp;quot;, &amp;quot;enable_full_lr&amp;quot;, 1)
- # do not append from tag to the RR (no need for this script)
- modparam(&amp;quot;rr&amp;quot;, &amp;quot;append_fromtag&amp;quot;, 0)
- 
- 
- # ----- rr params -----
- modparam(&amp;quot;registrar&amp;quot;, &amp;quot;method_filtering&amp;quot;, 1)
- /* uncomment the next line to disable parallel forking via location */
- # modparam(&amp;quot;registrar&amp;quot;, &amp;quot;append_branches&amp;quot;, 0)
- /* uncomment the next line not to allow more than 10 contacts per AOR */
- #modparam(&amp;quot;registrar&amp;quot;, &amp;quot;max_contacts&amp;quot;, 10)
- 
- 
- # ----- uri_db params -----
- /* by default we disable the DB support in the module as we do not need it
-    in this configuration */
- modparam(&amp;quot;uri_db&amp;quot;, &amp;quot;use_uri_table&amp;quot;, 0)
- modparam(&amp;quot;uri_db&amp;quot;, &amp;quot;db_url&amp;quot;, &amp;quot;&amp;quot;)
- 
- 
- # ----- acc params -----
- /* what sepcial events should be accounted ? */
- modparam(&amp;quot;acc&amp;quot;, &amp;quot;early_media&amp;quot;, 1)
- modparam(&amp;quot;acc&amp;quot;, &amp;quot;report_ack&amp;quot;, 1)
- modparam(&amp;quot;acc&amp;quot;, &amp;quot;report_cancels&amp;quot;, 1)
- /* by default ww do not adjust the direct of the sequential requests.
-    if you enable this parameter, be sure the enable &amp;quot;append_fromtag&amp;quot;
-    in &amp;quot;rr&amp;quot; module */
- modparam(&amp;quot;acc&amp;quot;, &amp;quot;detect_direction&amp;quot;, 0)
- /* account triggers (flags) */
- modparam(&amp;quot;acc&amp;quot;, &amp;quot;failed_transaction_flag&amp;quot;, 3)
- modparam(&amp;quot;acc&amp;quot;, &amp;quot;log_flag&amp;quot;, 1)
- modparam(&amp;quot;acc&amp;quot;, &amp;quot;log_missed_flag&amp;quot;, 2)
- modparam(&amp;quot;acc&amp;quot;, &amp;quot;log_extra&amp;quot;, 
- 	&amp;quot;src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd&amp;quot;)
- /* uncomment the following lines to enable DB accounting also */
- modparam(&amp;quot;acc&amp;quot;, &amp;quot;db_flag&amp;quot;, 1)
- modparam(&amp;quot;acc&amp;quot;, &amp;quot;db_missed_flag&amp;quot;, 2)
- modparam(&amp;quot;acc&amp;quot;, &amp;quot;db_url&amp;quot;,
- 	&amp;quot;mysql://openser:openserrw@localhost/openser&amp;quot;)
- modparam(&amp;quot;acc&amp;quot;, &amp;quot;db_extra&amp;quot;,
- 	&amp;quot;src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd&amp;quot;)
- 
- 
- # ----- usrloc params -----
- /* uncomment the following lines if you want to enable DB persistency
-    for location entries */
- modparam(&amp;quot;usrloc&amp;quot;, &amp;quot;db_mode&amp;quot;,   2)
- modparam(&amp;quot;usrloc&amp;quot;, &amp;quot;db_url&amp;quot;,
- 	&amp;quot;mysql://openser:openserrw@localhost/openser&amp;quot;)
- 
- # ----- auth_db params -----
- /* uncomment the following lines if you want to enable the DB based
-    authentication */
- modparam(&amp;quot;auth_db&amp;quot;, &amp;quot;calculate_ha1&amp;quot;, yes)
- modparam(&amp;quot;auth_db&amp;quot;, &amp;quot;password_column&amp;quot;, &amp;quot;password&amp;quot;)
- modparam(&amp;quot;auth_db&amp;quot;, &amp;quot;db_url&amp;quot;,
- 	&amp;quot;mysql://openser:openserrw@localhost/openser&amp;quot;)
- modparam(&amp;quot;auth_db&amp;quot;, &amp;quot;load_credentials&amp;quot;, &amp;quot;&amp;quot;)
- 
- 
- # ----- alias_db params -----
- /* uncomment the following lines if you want to enable the DB based
-    aliases */
- #modparam(&amp;quot;alias_db&amp;quot;, &amp;quot;db_url&amp;quot;,
- #	&amp;quot;mysql://openser:openserrw@localhost/openser&amp;quot;)
- 
- 
- # ----- domain params -----
- /* uncomment the following lines to enable multi-domain detection
-    support */
- #modparam(&amp;quot;domain&amp;quot;, &amp;quot;db_url&amp;quot;,
- #	&amp;quot;mysql://openser:openserrw@localhost/openser&amp;quot;)
- #modparam(&amp;quot;domain&amp;quot;, &amp;quot;db_mode&amp;quot;, 1)   # Use caching
- 
- 
- # ----- multi-module params -----
- /* uncomment the following line if you want to enable multi-domain support
-    in the modules (dafault off) */
- #modparam(&amp;quot;alias_db|auth_db|usrloc|uri_db&amp;quot;, &amp;quot;use_domain&amp;quot;, 1)
- 
- 
- # ----- presence params -----
- /* uncomment the following lines if you want to enable presence */
- modparam(&amp;quot;presence|presence_xml&amp;quot;, &amp;quot;db_url&amp;quot;,
- 	&amp;quot;mysql://openser:openserrw@localhost/openser&amp;quot;)
- modparam(&amp;quot;presence_xml&amp;quot;, &amp;quot;force_active&amp;quot;, 1)
- modparam(&amp;quot;presence&amp;quot;, &amp;quot;server_address&amp;quot;, &amp;quot;sip:192.168.1.23:5060&amp;quot;)
- modparam(&amp;quot;presence_xml&amp;quot;, &amp;quot;disable_bla&amp;quot;, 1)
- 
- # -- nathelper
- modparam(&amp;quot;nathelper&amp;quot;, &amp;quot;rtpproxy_sock&amp;quot;, &amp;quot;udp:127.0.0.1:7722&amp;quot;)
- modparam(&amp;quot;nathelper&amp;quot;, &amp;quot;natping_interval&amp;quot;, 30)
- modparam(&amp;quot;nathelper&amp;quot;, &amp;quot;ping_nated_only&amp;quot;, 1)
- modparam(&amp;quot;nathelper&amp;quot;, &amp;quot;sipping_bflag&amp;quot;, 7)
- modparam(&amp;quot;nathelper&amp;quot;, &amp;quot;sipping_from&amp;quot;, &amp;quot;sip:pinger@kamailio.org&amp;quot;)
- modparam(&amp;quot;registrar|nathelper&amp;quot;, &amp;quot;received_avp&amp;quot;, &amp;quot;$avp(i:80)&amp;quot;)
- modparam(&amp;quot;usrloc&amp;quot;, &amp;quot;nat_bflag&amp;quot;, 6)
- 
- ####### Routing Logic ########
- 
- 
- # main request routing logic
- 
- route{
- 
- 	if (!mf_process_maxfwd_header(&amp;quot;10&amp;quot;)) {
- 		sl_send_reply(&amp;quot;483&amp;quot;,&amp;quot;Too Many Hops&amp;quot;);
- 		exit;
- 	}
- 
- 	# NAT detection
- 	route(NAT);
- 
- 	if (has_totag()) {
- 		# sequential request withing a dialog should
- 		# take the path determined by record-routing
- 		if (loose_route()) {
- 			if (is_method(&amp;quot;BYE&amp;quot;)) {
- 				setflag(1); # do accounting ...
- 				setflag(3); # ... even if the transaction fails
- 			}
- 			route(RELAY);
- 		} else {
- 			if (is_method(&amp;quot;SUBSCRIBE&amp;quot;) &amp;amp;&amp;amp; uri == myself) {
- 				# in-dialog subscribe requests
- 				route(PRESENCE);
- 				exit;
- 			}
- 			if ( is_method(&amp;quot;ACK&amp;quot;) ) {
- 				if ( t_check_trans() ) {
- 					# non loose-route, but stateful ACK; must be an ACK after a 487 or e.g. 404 from upstream server
- 					t_relay();
- 					exit;
- 				} else {
- 					# ACK without matching transaction ... ignore and discard.\n&amp;quot;);
- 					exit;
- 				}
- 			}
- 			sl_send_reply(&amp;quot;404&amp;quot;,&amp;quot;Not here&amp;quot;);
- 		}
- 		exit;
- 	}
- 
- 	#initial requests
- 
- 	# CANCEL processing
- 	if (is_method(&amp;quot;CANCEL&amp;quot;))
- 	{
- 		if (t_check_trans())
- 			t_relay();
- 		exit;
- 	}
- 
- 	t_check_trans();
- 
- 	# authentication
- 	route(AUTH);
- 
- 	# record routing for dialog forming requests (in case they are routed)
- 	if (is_method(&amp;quot;INVITE|SUBSCRIBE&amp;quot;))
- 		record_route();
- 
- 	# account only INVITEs
- 	if (is_method(&amp;quot;INVITE&amp;quot;)) {
- 		setflag(1); # do accounting
- 	}
- 	if (!uri==myself)
- 	/* replace with following line if multi-domain support is used */
- 	##if (!is_uri_host_local())
- 	{
- 		append_hf(&amp;quot;P-hint: outbound\r\n&amp;quot;); 
- 		# if you have some interdomain connections via TLS
- 		##if($rd==&amp;quot;tls_domain1.net&amp;quot;) {
- 		##	t_relay(&amp;quot;tls:domain1.net&amp;quot;);
- 		##	exit;
- 		##} else if($rd==&amp;quot;tls_domain2.net&amp;quot;) {
- 		##	t_relay(&amp;quot;tls:domain2.net&amp;quot;);
- 		##	exit;
- 		##}
- 		route(RELAY);
- 	}
- 
- 	# requests for my domain
- 
- 	if( is_method(&amp;quot;PUBLISH|SUBSCRIBE&amp;quot;)) {
- 		route(PRESENCE);
- 	}
- 
- 	if (is_method(&amp;quot;REGISTER&amp;quot;))
- 	{
- 		if (isflagset(5))
- 			setbflag(6);
- 		if (!save(&amp;quot;location&amp;quot;))
- 			sl_reply_error();
- 
- 		exit;
- 	}
- 
- 	if ($rU==&amp;quot;&amp;quot;) {
- 		# request with no Username in RURI
- 		sl_send_reply(&amp;quot;484&amp;quot;,&amp;quot;Address Incomplete&amp;quot;);
- 		exit;
- 	}
- 
- 	# apply DB based aliases (uncomment to enable)
- 	##alias_db_lookup(&amp;quot;dbaliases&amp;quot;);
- 
- 	if (!lookup(&amp;quot;location&amp;quot;)) {
- 		switch ($rc) {
- 			case -1:
- 			case -3:
- 				t_newtran();
- 				t_reply(&amp;quot;404&amp;quot;, &amp;quot;Not Found&amp;quot;);
- 				exit;
- 			case -2:
- 				sl_send_reply(&amp;quot;405&amp;quot;, &amp;quot;Method Not Allowed&amp;quot;);
- 				exit;
- 		}
- 	}
- 
- 	# when routing via usrloc, log the missed calls also
- 	setflag(2);
- 
- 	route(RELAY);
- }
- 
- 
- route[RELAY] {
- 	if (check_route_param(&amp;quot;nat=yes&amp;quot;)) {
- 		setbflag(&amp;quot;6&amp;quot;);
- 	}
- 	if (isflagset(5) || isbflagset(&amp;quot;6&amp;quot;)) {
- 		route(RTPPROXY);
- 	}
- 
- 	/* example how to enable some additional event routes */
- 	if (is_method(&amp;quot;INVITE&amp;quot;)) {
- 		#t_on_branch(&amp;quot;BRANCH_ONE&amp;quot;);
- 		t_on_reply(&amp;quot;REPLY_ONE&amp;quot;);
- 		t_on_failure(&amp;quot;FAIL_ONE&amp;quot;);
- 	}
- 
- 	if (!t_relay()) {
- 		sl_reply_error();
- 	}
- 	exit;
- }
- 
- 
- # Presence route
- /* uncomment the whole following route for enabling presence server */
- route[PRESENCE]
- {
- 	if (!t_newtran())
- 	{
- 		sl_reply_error();
- 		exit;
- 	};
- 
- 	if(is_method(&amp;quot;PUBLISH&amp;quot;))
- 	{
- 		handle_publish();
- 		t_release();
- 	}
- 	else
- 	if( is_method(&amp;quot;SUBSCRIBE&amp;quot;))
- 	{
- 		handle_subscribe();
- 		t_release();
- 	}
- 	exit;
- 	
- 	# if presence enabled, this part will not be executed
- 	if (is_method(&amp;quot;PUBLISH&amp;quot;) || $rU!=&amp;quot;&amp;quot;)
- 	{
- 		sl_send_reply(&amp;quot;404&amp;quot;, &amp;quot;Not here&amp;quot;);
- 		exit;
- 	}
- 	return;
- }
- 
- # Authentication route
- /* uncomment the whole following route for enabling authentication */
- route[AUTH] {
- 	if (is_method(&amp;quot;REGISTER&amp;quot;))
- 	{
- 		# authenticate the REGISTER requests (uncomment to enable auth)
- 		if (! (www_authorize(&amp;quot;&amp;quot;, &amp;quot;subscriber&amp;quot;)))
- 		{
- 			www_challenge(&amp;quot;&amp;quot;, &amp;quot;0&amp;quot;);
- 			exit;
- 		}
- 
- 		if ($au!=$tU) 
- 		{
- 			sl_send_reply(&amp;quot;403&amp;quot;,&amp;quot;Forbidden auth ID&amp;quot;);
- 			exit;
- 		}
- 	} else {
- 		# authenticate if from local subscriber (uncomment to enable auth)
- 		if (from_uri==myself)
- 		{
- 			if (!proxy_authorize(&amp;quot;&amp;quot;, &amp;quot;subscriber&amp;quot;)) {
- 				proxy_challenge(&amp;quot;&amp;quot;, &amp;quot;0&amp;quot;);
- 				exit;
- 			}
- 			if (is_method(&amp;quot;PUBLISH&amp;quot;))
- 			{
- 				if ($au!=$tU) {
- 					sl_send_reply(&amp;quot;403&amp;quot;,&amp;quot;Forbidden auth ID&amp;quot;);
- 					exit;
- 				}
- 			} else {
- 				if ($au!=$fU) {
- 					sl_send_reply(&amp;quot;403&amp;quot;,&amp;quot;Forbidden auth ID&amp;quot;);
- 					exit;
- 				}
- 			}
- 
- 			consume_credentials();
- 			# caller authenticated
- 		}
- 	}
- 	return;
- }
- 
- # Caller NAT detection route
- /* uncomment the whole following route for enabling Caller NAT Detection */
- route[NAT]{
- 	force_rport();
- 	if (nat_uac_test(&amp;quot;19&amp;quot;)) {
- 		if (method==&amp;quot;REGISTER&amp;quot;) {
- 			fix_nated_register();
- 		} else {
- 			fix_nated_contact();
- 		}
- 		setflag(5);
- 	}
- 	return;
- }
- 
- # RTPProxy control
- /* uncomment the whole following route for enabling RTPProxy Control */
- route[RTPROXY] {
- 	if (is_method(&amp;quot;BYE&amp;quot;)) {
- 		unforce_rtp_proxy();
- 	} else if (is_method(&amp;quot;INVITE&amp;quot;)){
- 		force_rtp_proxy();
- 	}
- 	if (!has_totag()) add_rr_param(&amp;quot;;nat=yes&amp;quot;);
- 	return;
- }
- 
- branch_route[BRANCH_ONE] {
- 	xdbg(&amp;quot;new branch at $ru\n&amp;quot;);
- }
- 
- 
- onreply_route[REPLY_ONE] {
- 	xdbg(&amp;quot;incoming reply\n&amp;quot;);
- 
- 	if ((isflagset(5) || isbflagset(&amp;quot;6&amp;quot;)) &amp;amp;&amp;amp; status=~&amp;quot;(183)|(2[0-9][0-9])&amp;quot;) {
- 		force_rtp_proxy();
- 	}
- 	if (isbflagset(&amp;quot;6&amp;quot;)) {
- 		fix_nated_contact();
- 	}
- }
- 
- 
- failure_route[FAIL_ONE] {
- 	if (is_method(&amp;quot;INVITE&amp;quot;)
- 			&amp;amp;&amp;amp; (isbflagset(&amp;quot;6&amp;quot;) || isflagset(5))) {
- 		unforce_rtp_proxy();
- 	}
- 
- 	if (t_is_canceled()) {
- 		exit;
- 	}
- 
- 	# uncomment the following lines if you want to block client 
- 	# redirect based on 3xx replies.
- 	##if (t_check_status(&amp;quot;3[0-9][0-9]&amp;quot;)) {
- 	##	t_reply(&amp;quot;404&amp;quot;,&amp;quot;Not found&amp;quot;);
- 	##	exit;
- 	##}
- 
- 	# uncomment the following lines if you want to redirect the failed 
- 	# calls to a different new destination
- 	##if (t_check_status(&amp;quot;486|408&amp;quot;)) {
- 	##	sethostport(&amp;quot;192.168.2.100:5060&amp;quot;);
- 	##	append_branch();
- 	##	# do not set the missed call flag again
- 	##	t_relay();
- 	##}
- }
- 
- &amp;lt;/code&amp;gt;
- 
- 
- 
- ===== 3. Run it =====
- 
- You must have the database used by Kamailio (OpenSER) 1.5.x created. The name of the database is **openser**. If you installed Kamailio (OpenSER) 1.5.x from SVN using the Dokuwiki guidelines (http://www.kamailio.org/dokuwiki/doku.php/install:kamailio-1.5.x-from-svn), then you should do:
- 
- &amp;lt;code&amp;gt;
- /usr/local/sbin/kamdbctl create
- &amp;lt;/code&amp;gt;
- 
- Start SIP Router with the config above:
- 
- &amp;lt;code&amp;gt;
- /usr/local/sbin/ser -f /usr/local/etc/ser/kamailio.cfg
- &amp;lt;/code&amp;gt;
- 
- ===== 4. Remarks =====
- 
- &amp;lt;hi #98fb98&amp;gt;Please contribute here with remarks and comments.&amp;lt;/hi&amp;gt;
- 
-   * load kex module for Kamailio core specific extensions
-   * load tmx module for Kamailio TM specific extensions
-   * avp_aliases is now a parameter of pv module
- 
- ===== 5. FAQ =====
- 
-   * **Q**: Why binary is named ser?
-     * **A**: It is the default name for SIP Router binary. In the future, the packaged version will differ from what is now. However, right now, it is the short of: &amp;quot;**SIP E Router**&amp;quot; where **E** comes from any of:
-       * Exceptional
-       * Excellent
-       * Exotic (as Kamailio name origins)
-       * Express (the initial project name)
-       * Extraordinary
-       * ...
  

&lt;/pre&gt;</description>
    </item>
    <item rdf:about="http://sip-router.org/wiki/migration/kamailio-module-docbook?rev=1240561304&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-04-24T10:21:44+02:00</dc:date>
        <title>migration:kamailio-module-docbook</title>
        <link>http://sip-router.org/wiki/migration/kamailio-module-docbook?rev=1240561304&amp;do=diff</link>
        <description>&lt;pre&gt;
@@ -23,7 +23,8 @@
  include $(docbook_dir)/Makefile.module
  &amp;lt;/code&amp;gt;
  
  * replace in the **Makefile** the name of the file **modulename.xml** from the assignment of **docs** variable with the name of your main docbook file. See above for example of **dispatcher** module.
+ * write your **modulename.xml** and other docbook files you include in it
  
- You are done. Add the new **Makefile** to repository and then commit and upload to sip-router.org GIT.
+ You are done. Add the new **Makefile** and the docbook files to repository, then commit and upload to sip-router.org GIT.
  

&lt;/pre&gt;</description>
    </item>
    <item rdf:about="http://sip-router.org/wiki/migration/kamailio-tips?rev=1260467261&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-12-10T18:47:41+02:00</dc:date>
        <title>migration:kamailio-tips</title>
        <link>http://sip-router.org/wiki/migration/kamailio-tips?rev=1260467261&amp;do=diff</link>
        <description>&lt;pre&gt;
@@ -89,9 +89,9 @@
  ===== Module parameters =====
  
    * [b]tm onreply_avp_mode[/b] does not exist
  
- In SIP Router, AVPs that are set in request route are always visible in branch and failure routes. Not confirmed yet if they are visible in onreply_route - the behaviour controlled by this Kamailio parameter.
+ In SIP Router, AVPs that are set in request route are always visible in branch, failure, and onreply_route.  In other words, SIP Router behaves like Kamailio when onreply_avp_mode is set to value 1.
  
    * [b]tm fr_timer, fr_inv_timer, and contacts_avp[/b] AVP value syntax
  
  In SIP Router, AVP value of tm module parameters fr_timer, fr_inv_timer, and contacts_avp is currently written without $avp(), for example, &amp;quot;i:705&amp;quot;.  This is to be fixed.

&lt;/pre&gt;</description>
    </item>
    <item rdf:about="http://sip-router.org/wiki/migration/module_differences?rev=1242047024&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-05-11T15:03:44+02:00</dc:date>
        <title>migration:module_differences</title>
        <link>http://sip-router.org/wiki/migration/module_differences?rev=1242047024&amp;do=diff</link>
        <description>&lt;pre&gt;
@@ -1 +1,46 @@
+ ====== Module Differences ======
+ This page lists known differences between ser and kamailio implementation of certain modules. These differences need to be resolved before the module can be merged and moved into ''modules'' directory.
+ 
+ ==== msilo ====
+ In ser module there is this:
+ 
+ registrar (string)
+ 
+ The SIP address used to inform users that destination of their message
+ is not online and the message will be delivered next time when that
+ user goes online. If the parameter is not set, the module will not
+ send any notification. All requests intended for this SIP address will
+ not be stored for lately delivery.
+ 
+ Default value is &amp;quot;NULL&amp;quot;.
+ 
+ Example 5. Set the registrar parameter
+ 
+   ...
+   modparam(&amp;quot;msilo&amp;quot;, &amp;quot;registrar&amp;quot;, &amp;quot;sip:registrar@iptel.org&amp;quot;)
+   ...
+ 
+ and the corresponding thing in kamailio is this:
+ 
+ 1.3.3. from_address (string)
+ 
+ The SIP address used to inform users that destination of their
+ message is not online and the message will be delivered next
+ time when that user goes online. If the parameter is not set,
+ the module will not send any notification. It can contain
+ pseudo-variables.
+ 
+ Default value is &amp;quot;NULL&amp;quot;.
+ 
+ Example 1.3. Set the &amp;quot;from_address&amp;quot; parameter
+ 
+   ...
+   modparam(&amp;quot;msilo&amp;quot;, &amp;quot;from_address&amp;quot;, &amp;quot;sip:registrar@example.org&amp;quot;)
+   modparam(&amp;quot;msilo&amp;quot;, &amp;quot;from_address&amp;quot;, &amp;quot;sip:$rU@example.org&amp;quot;)
+ 
+ 
+ Also, the ser version of the module has a different database table,
+ we use uids to identify owners of stored messages. This is something we use
+ and need to preserve.
+ 
  

&lt;/pre&gt;</description>
    </item>
    <item rdf:about="http://sip-router.org/wiki/migration/new-features-for-k-users?rev=1257417381&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-11-05T11:36:21+02:00</dc:date>
        <title>migration:new-features-for-k-users</title>
        <link>http://sip-router.org/wiki/migration/new-features-for-k-users?rev=1257417381&amp;do=diff</link>
        <description>&lt;pre&gt;
@@ -1,25 +1,4 @@
  ====== Features For Kamailio Users ======
  
- This page collects the features inherited by SIP Router from SIP Express Router (SER) and Kamailio users can benefit of.
- 
- &amp;lt;hi #98fb98&amp;gt;Work in progress. Started from benefits web page. Please add anything you see missing here.&amp;lt;/hi&amp;gt;
- 
-   * updates to transport layers: UDP, TCP/TLS and SCTP
-   * asynchronous TCP sending
-   * asynchronous message processing support
-   * access to new features in parts like: memory managers, locking and synchronization, timers, DNS
-   * build framework that allow creation of libraries from code, thus ability to make core more lightweight and remove duplications in an efficient way
-   * several config file goodies
-     * send route - route called just before sending the message, meaning it will show the final content (headers and body updated) and makes available the destination IP address - more flexibility in handling DNS blacklists and filters
-     * timer route - route called in a timer base
-     * reload of some config variables, routes with names, flags with names
-   * a bunch of useful modules:
-     * db_ops - database operations
-     * iptrtpproxy - nat traversal using kernel space for media relaying
-     * auth identity
-     * cfg_db, cfg_rpc, ctl, timer, eval and few more
-   * tools
-     * web interface: serweb
-     * control tool in Python: serctl
-     * command line application (similar to Asterisk cli)
+ * see: http://www.kamailio.org/dokuwiki/doku.php/features:new-in-3.0.x
  

&lt;/pre&gt;</description>
    </item>
    <item rdf:about="http://sip-router.org/wiki/migration/ser-2.1-migration?rev=1244106353&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2009-06-04T11:05:53+02:00</dc:date>
        <title>migration:ser-2.1-migration</title>
        <link>http://sip-router.org/wiki/migration/ser-2.1-migration?rev=1244106353&amp;do=diff</link>
        <description>&lt;pre&gt;
@@ -1,3 +1,3 @@
  ====== Migration from ser 2.1 ======
  
- See [[admin_guide:migrate|Administration Guide/Migrate]].
+ See [[admin_guide:migrate|Administration Guide / Migrating From Older Versions]].

&lt;/pre&gt;</description>
    </item>
</rdf:RDF>
