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
Next revision Both sides next revision
migration:kamailio-3.0-config [2009/05/14 09:55]
miconda
migration:kamailio-3.0-config [2009/05/27 09:49]
miconda set names for routes
Line 10: Line 10:
   * NAT traversal   * NAT traversal
   * Presence server   * Presence server
 +
 +[b]IMPORTANT: check the tips page: http://sip-router.org/wiki/migration/kamailio-tips[/b]
  
 ===== 1. Install from GIT ===== ===== 1. Install from GIT =====
Line 131: Line 133:
   * 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 149: Line 151:
 # 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 230: Line 232:
 #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 391: Line 391:
 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 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); # ... 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 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("PUBLISH|SUBSCRIBE")) {  if( is_method("PUBLISH|SUBSCRIBE")) {
- route(2);+ route(PRESENCE);
  }  }
  
Line 520: Line 515:
  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 548: Line 543:
 # 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 575:
 # 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 625: Line 620:
 # 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 640: Line 635:
 # 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 650: Line 645:
 } }
  
-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 667: Line 662:
  
  
-failure_route[1] {+failure_route[FAIL_ONE] {
  if (is_method("INVITE")  if (is_method("INVITE")
  && (isbflagset("6") || isflagset(5))) {  && (isbflagset("6") || isflagset(5))) {
Line 695: Line 690:
  
 </code> </code>
 +
 +
  
 ===== 3. Run it ===== ===== 3. Run it =====

Navigation

Wiki

Other

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