Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
migration:kamailio-3.0-config [2009/05/14 09:47] miconda |
migration:kamailio-3.0-config [2009/06/26 19:27] 189.35.92.18 1) removed module name on directory references of loadmodule statements; |
||
---|---|---|---|
Line 10: | Line 10: | ||
* NAT traversal | * NAT traversal | ||
* Presence server | * Presence server | ||
+ | |||
+ | [b]IMPORTANT: | ||
===== 1. Install from GIT ===== | ===== 1. Install from GIT ===== | ||
Line 131: | Line 133: | ||
* one child | * one child | ||
- | < | + | < |
# | # | ||
# $Id: kamailio.cfg 5679 2009-03-10 09:22:27Z ibc_sf $ | # $Id: kamailio.cfg 5679 2009-03-10 09:22:27Z ibc_sf $ | ||
Line 149: | Line 151: | ||
# sed commands that help you enable such features. | # sed commands that help you enable such features. | ||
# | # | ||
- | # *** To enamble | + | # *** To enable |
# sed -i ' | # sed -i ' | ||
# | # | ||
- | # *** To enamble | + | # *** To enable |
# - enable mysql | # - enable mysql | ||
# sed -i ' | # sed -i ' | ||
# - add users using ' | # - add users using ' | ||
# | # | ||
- | # *** To enamble | + | # *** To enable |
# - enable mysql | # - enable mysql | ||
# sed -i ' | # sed -i ' | ||
# | # | ||
- | # *** To enamble | + | # *** To enable |
# - enable mysql | # - enable mysql | ||
# sed -i ' | # sed -i ' | ||
# | # | ||
- | # *** To enamble | + | # *** To enable |
# sed -i ' | # sed -i ' | ||
# - install RTPProxy: http:// | # - install RTPProxy: http:// | ||
Line 230: | Line 232: | ||
# | # | ||
- | |||
- | listen=udp: | ||
/* uncomment and configure the following line if you want Kamailio to | /* uncomment and configure the following line if you want Kamailio to | ||
bind on a specific interface/ | bind on a specific interface/ | ||
- | #listen=udp: | + | listen=udp: |
Line 244: | Line 244: | ||
/* uncomment next line for MySQL DB support */ | /* uncomment next line for MySQL DB support */ | ||
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
/* uncomment next lines for MySQL based authentication support | /* uncomment next lines for MySQL based authentication support | ||
NOTE: a DB (like db_mysql) module must be also loaded */ | NOTE: a DB (like db_mysql) module must be also loaded */ | ||
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
/* uncomment next line for aliases support | /* uncomment next line for aliases support | ||
NOTE: a DB (like db_mysql) module must be also loaded */ | NOTE: a DB (like db_mysql) module must be also loaded */ | ||
- | #loadmodule " | + | #loadmodule " |
/* uncomment next line for multi-domain support | /* uncomment next line for multi-domain support | ||
NOTE: a DB (like db_mysql) module must be also loaded | NOTE: a DB (like db_mysql) module must be also loaded | ||
NOTE: be sure and enable multi-domain support in all used modules | NOTE: be sure and enable multi-domain support in all used modules | ||
(see " | (see " | ||
- | #loadmodule " | + | #loadmodule " |
/* uncomment the next two lines for presence server support | /* uncomment the next two lines for presence server support | ||
NOTE: a DB (like db_mysql) module must be also loaded */ | NOTE: a DB (like db_mysql) module must be also loaded */ | ||
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
- | loadmodule " | + | loadmodule " |
# ----------------- setting module-specific parameters --------------- | # ----------------- setting module-specific parameters --------------- | ||
Line 391: | Line 391: | ||
modparam(" | modparam(" | ||
modparam(" | modparam(" | ||
- | |||
- | #extra testing | ||
- | modparam(" | ||
####### Routing Logic ######## | ####### Routing Logic ######## | ||
Line 406: | Line 403: | ||
exit; | exit; | ||
} | } | ||
- | |||
- | $avp(test) = 1; | ||
# NAT detection | # NAT detection | ||
- | route(4); | + | route(NAT); |
if (has_totag()) { | if (has_totag()) { | ||
Line 420: | Line 415: | ||
setflag(3); | setflag(3); | ||
} | } | ||
- | route(1); | + | route(RELAY); |
} else { | } else { | ||
if (is_method(" | if (is_method(" | ||
# in-dialog subscribe requests | # in-dialog subscribe requests | ||
- | route(2); | + | route(PRESENCE); |
exit; | exit; | ||
} | } | ||
Line 455: | Line 450: | ||
# authentication | # authentication | ||
- | route(3); | + | route(AUTH); |
# record routing for dialog forming requests (in case they are routed) | # record routing for dialog forming requests (in case they are routed) | ||
Line 478: | Line 473: | ||
## exit; | ## exit; | ||
##} | ##} | ||
- | route(1); | + | route(RELAY); |
} | } | ||
Line 484: | Line 479: | ||
if( is_method(" | if( is_method(" | ||
- | route(2); | + | route(PRESENCE); |
} | } | ||
if (is_method(" | if (is_method(" | ||
{ | { | ||
+ | if (isflagset(5)) | ||
+ | setbflag(6); | ||
if (!save(" | if (!save(" | ||
sl_reply_error(); | sl_reply_error(); | ||
Line 520: | Line 517: | ||
setflag(2); | setflag(2); | ||
- | route(1); | + | route(RELAY); |
} | } | ||
- | route[1] { | + | route[RELAY] { |
if (check_route_param(" | if (check_route_param(" | ||
setbflag(" | setbflag(" | ||
} | } | ||
if (isflagset(5) || isbflagset(" | if (isflagset(5) || isbflagset(" | ||
- | route(5); | + | route(RTPPROXY); |
} | } | ||
/* example how to enable some additional event routes */ | /* example how to enable some additional event routes */ | ||
if (is_method(" | if (is_method(" | ||
- | # | + | # |
- | t_on_reply(" | + | t_on_reply(" |
- | t_on_failure(" | + | t_on_failure(" |
} | } | ||
Line 548: | Line 545: | ||
# Presence route | # Presence route | ||
/* uncomment the whole following route for enabling presence server */ | /* uncomment the whole following route for enabling presence server */ | ||
- | route[2] | + | route[PRESENCE] |
{ | { | ||
if (!t_newtran()) | if (!t_newtran()) | ||
Line 580: | Line 577: | ||
# Authentication route | # Authentication route | ||
/* uncomment the whole following route for enabling authentication */ | /* uncomment the whole following route for enabling authentication */ | ||
- | route[3] { | + | route[AUTH] { |
if (is_method(" | if (is_method(" | ||
{ | { | ||
Line 625: | Line 622: | ||
# Caller NAT detection route | # Caller NAT detection route | ||
/* uncomment the whole following route for enabling Caller NAT Detection */ | /* uncomment the whole following route for enabling Caller NAT Detection */ | ||
- | route[4]{ | + | route[NAT]{ |
force_rport(); | force_rport(); | ||
if (nat_uac_test(" | if (nat_uac_test(" | ||
Line 640: | Line 637: | ||
# RTPProxy control | # RTPProxy control | ||
/* uncomment the whole following route for enabling RTPProxy Control */ | /* uncomment the whole following route for enabling RTPProxy Control */ | ||
- | route[5] { | + | route[RTPROXY] { |
if (is_method(" | if (is_method(" | ||
unforce_rtp_proxy(); | unforce_rtp_proxy(); | ||
Line 650: | Line 647: | ||
} | } | ||
- | branch_route[1] { | + | branch_route[BRANCH_ONE] { |
xdbg(" | xdbg(" | ||
} | } | ||
- | onreply_route[1] { | + | onreply_route[REPLY_ONE] { |
xdbg(" | xdbg(" | ||
Line 667: | Line 664: | ||
- | failure_route[1] { | + | failure_route[FAIL_ONE] { |
if (is_method(" | if (is_method(" | ||
&& | && | ||
Line 695: | Line 692: | ||
</ | </ | ||
+ | |||
+ | |||
===== 3. Run it ===== | ===== 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:// | ||
+ | |||
+ | < | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Start SIP Router with the config above: | ||
< | < | ||
Line 703: | Line 710: | ||
===== 4. Remarks ===== | ===== 4. Remarks ===== | ||
+ | |||
+ | <hi # | ||
* load kex module for Kamailio core specific extensions | * load kex module for Kamailio core specific extensions |