Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
migration:kamailio-3.0-config [2009/05/14 13:33]
miconda
migration:kamailio-3.0-config [2009/07/14 18:01]
82.113.106.158
Line 11: Line 11:
   * Presence server   * Presence server
  
-[b]IMPORTANT: check the tips page: http://sip-router.org/wiki/migration/kamailio-tips[/b]+[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] 
  
 ===== 1. Install from GIT ===== ===== 1. Install from GIT =====
Line 133: Line 136:
   * one child   * one child
  
-<code>+<code c>
 # #
 # $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 151: Line 154:
 # sed commands that help you enable such features. # sed commands that help you enable such features.
 # #
-# *** To enamble mysql execute:+# *** To enable mysql execute:
 #     sed -i 's///g' kamailio.cfg #     sed -i 's///g' kamailio.cfg
 # #
-# *** To enamble authentication execute:+# *** To enable authentication execute:
 #     - enable mysql #     - enable mysql
 #     sed -i 's///g' kamailio.cfg #     sed -i 's///g' kamailio.cfg
 #     - add users using 'kamctl' #     - add users using 'kamctl'
 # #
-# *** To enamble persistent user location execute:+# *** To enable persistent user location execute:
 #     - enable mysql #     - enable mysql
 #     sed -i 's///g' kamailio.cfg #     sed -i 's///g' kamailio.cfg
 # #
-# *** To enamble presence server execute:+# *** To enable presence server execute:
 #     - enable mysql #     - enable mysql
 #     sed -i 's///g' kamailio.cfg #     sed -i 's///g' kamailio.cfg
 # #
-# *** To enamble nat traversal execute:+# *** To enable nat traversal execute:
 #     sed -i 's///g' kamailio.cfg #     sed -i 's///g' kamailio.cfg
 #     - install RTPProxy: http://www.rtpproxy.org #     - install RTPProxy: http://www.rtpproxy.org
Line 232: Line 235:
 #tls_ca_list     = "/usr/local/etc/kamailio/tls/user/user-calist.pem" #tls_ca_list     = "/usr/local/etc/kamailio/tls/user/user-calist.pem"
  
- 
-listen=udp:192.168.1.23:5060 
  
 /* 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/port/proto (default bind on all available) */    bind on a specific interface/port/proto (default bind on all available) */
-#listen=udp:192.168.1.2:5060+listen=udp:192.168.1.23:5060
  
  
Line 246: Line 247:
  
 /* uncomment next line for MySQL DB support */ /* uncomment next line for MySQL DB support */
-loadmodule "modules/db_mysql/db_mysql.so" +loadmodule "modules/db_mysql.so" 
-loadmodule "modules_k/mi_fifo/mi_fifo.so" +loadmodule "modules_k/mi_fifo.so" 
-loadmodule "modules_k/mi_datagram/mi_datagram.so" +loadmodule "modules_k/mi_datagram.so" 
-loadmodule "modules_k/kex/kex.so" +loadmodule "modules_k/kex.so" 
-loadmodule "modules_k/sl/sl.so" +loadmodule "modules_k/sl.so" 
-loadmodule "modules/tm/tm.so" +loadmodule "modules/tm.so" 
-loadmodule "modules_k/tmx/tmx.so" +loadmodule "modules_k/tmx.so" 
-loadmodule "modules_k/rr/rr.so" +loadmodule "modules_k/rr.so" 
-loadmodule "modules_k/pv/pv.so" +loadmodule "modules_k/pv.so" 
-loadmodule "modules_k/maxfwd/maxfwd.so" +loadmodule "modules_k/maxfwd.so" 
-loadmodule "modules_k/usrloc/usrloc.so" +loadmodule "modules_k/usrloc.so" 
-loadmodule "modules_k/registrar/registrar.so" +loadmodule "modules_k/registrar.so" 
-loadmodule "modules_k/textops/textops.so" +loadmodule "modules_k/textops.so" 
-loadmodule "modules_k/uri_db/uri_db.so" +loadmodule "modules_k/uri_db.so" 
-loadmodule "modules_k/siputils/siputils.so" +loadmodule "modules_k/siputils.so" 
-loadmodule "modules_k/xlog/xlog.so" +loadmodule "modules_k/xlog.so" 
-loadmodule "modules_k/acc/acc.so"+loadmodule "modules_k/acc.so"
 /* 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 "modules_k/auth/auth.so" +loadmodule "modules_k/auth.so" 
-loadmodule "modules_k/auth_db/auth_db.so"+loadmodule "modules_k/auth_db.so"
 /* 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 "modules_k/alias_db/alias_db.so"+#loadmodule "modules_k/alias_db.so"
 /* 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 "multi-module params" section ) */          (see "multi-module params" section ) */
-#loadmodule "modules_k/domain/domain.so"+#loadmodule "modules_k/domain.so"
 /* 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 "modules_k/presence/presence.so" +loadmodule "modules_k/presence.so" 
-loadmodule "modules_k/presence_xml/presence_xml.so"+loadmodule "modules_k/presence_xml.so"
  
-loadmodule "modules_k/nathelper/nathelper.so"+loadmodule "modules_k/nathelper.so"
  
 # ----------------- setting module-specific parameters --------------- # ----------------- setting module-specific parameters ---------------
Line 393: Line 394:
 modparam("registrar|nathelper", "received_avp", "$avp(i:80)") modparam("registrar|nathelper", "received_avp", "$avp(i:80)")
 modparam("usrloc", "nat_bflag", 6) modparam("usrloc", "nat_bflag", 6)
- 
-#extra testing 
-modparam("pv", "avp_aliases", "test=i:11;st=s:asd") 
  
 ####### Routing Logic ######## ####### Routing Logic ########
Line 408: Line 406:
  exit;  exit;
  }  }
- 
- $avp(test) = 1; 
  
  # NAT detection  # NAT detection
- route(4);+ route(NAT);
  
  if (has_totag()) {  if (has_totag()) {
Line 422: Line 418:
  setflag(3); # ... even if the transaction fails  setflag(3); # ... even if the transaction fails
  }  }
- route(1);+ route(RELAY);
  } else {  } else {
  if (is_method("SUBSCRIBE") && uri == myself) {  if (is_method("SUBSCRIBE") && uri == myself) {
  # in-dialog subscribe requests  # in-dialog subscribe requests
- route(2);+ route(PRESENCE);
  exit;  exit;
  }  }
Line 457: Line 453:
  
  # 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 480: Line 476:
  ## exit;  ## exit;
  ##}  ##}
- route(1);+ route(RELAY);
  }  }
  
Line 486: Line 482:
  
  if( is_method("PUBLISH|SUBSCRIBE")) {  if( is_method("PUBLISH|SUBSCRIBE")) {
- route(2);+ route(PRESENCE);
  }  }
  
  if (is_method("REGISTER"))  if (is_method("REGISTER"))
  {  {
 + if (isflagset(5))
 + setbflag(6);
  if (!save("location"))  if (!save("location"))
  sl_reply_error();  sl_reply_error();
Line 522: Line 520:
  setflag(2);  setflag(2);
  
- route(1);+ route(RELAY);
 } }
  
  
-route[1] {+route[RELAY] {
  if (check_route_param("nat=yes")) {  if (check_route_param("nat=yes")) {
  setbflag("6");  setbflag("6");
  }  }
  if (isflagset(5) || isbflagset("6")) {  if (isflagset(5) || isbflagset("6")) {
- route(5);+ route(RTPPROXY);
  }  }
  
  /* example how to enable some additional event routes */  /* example how to enable some additional event routes */
  if (is_method("INVITE")) {  if (is_method("INVITE")) {
- #t_on_branch("1"); + #t_on_branch("BRANCH_ONE"); 
- t_on_reply("1"); + t_on_reply("REPLY_ONE"); 
- t_on_failure("1");+ t_on_failure("FAIL_ONE");
  }  }
  
Line 550: Line 548:
 # 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 582: Line 580:
 # 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("REGISTER"))  if (is_method("REGISTER"))
  {  {
Line 627: Line 625:
 # 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("19")) {  if (nat_uac_test("19")) {
Line 642: Line 640:
 # 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("BYE")) {  if (is_method("BYE")) {
  unforce_rtp_proxy();  unforce_rtp_proxy();
Line 652: Line 650:
 } }
  
-branch_route[1] {+branch_route[BRANCH_ONE] {
  xdbg("new branch at $ru\n");  xdbg("new branch at $ru\n");
 } }
  
  
-onreply_route[1] {+onreply_route[REPLY_ONE] {
  xdbg("incoming reply\n");  xdbg("incoming reply\n");
  
Line 669: Line 667:
  
  
-failure_route[1] {+failure_route[FAIL_ONE] {
  if (is_method("INVITE")  if (is_method("INVITE")
  && (isbflagset("6") || isflagset(5))) {  && (isbflagset("6") || isflagset(5))) {
Line 697: Line 695:
  
 </code> </code>
 +
 +
  
 ===== 3. Run it ===== ===== 3. Run it =====

Navigation

Wiki

Other

QR Code
QR Code migration:kamailio-3.0-config (generated for current page)