asterisk:realtime:kamailio-3.3.x-asterisk-10.7.0-astdb

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
asterisk:realtime:kamailio-3.3.x-asterisk-10.7.0-astdb [2013/05/14 11:42] – [Config File] adminasterisk:realtime:kamailio-3.3.x-asterisk-10.7.0-astdb [2013/05/14 12:01] (current) – old revision restored (2013/05/14 09:43) admin
Line 510: Line 510:
 #!define WITH_ASTERISK #!define WITH_ASTERISK
  
-# Kamailio (OpenSER) SIP Server v4.- default configuration script+
 +# Kamailio (OpenSER) SIP Server v3.- default configuration script
 #     - web: http://www.kamailio.org #     - web: http://www.kamailio.org
 #     - git: http://sip-router.org #     - git: http://sip-router.org
Line 516: Line 517:
 # Direct your questions about this file to: <sr-users@lists.sip-router.org> # Direct your questions about this file to: <sr-users@lists.sip-router.org>
 # #
-# Refer to the Core CookBook at http://www.kamailio.org/wiki/+# Refer to the Core CookBook at http://www.kamailio.org/dokuwiki/doku.php
 # for an explanation of possible statements, functions and parameters. # for an explanation of possible statements, functions and parameters.
 # #
Line 608: Line 609:
   ALTER TABLE missed_calls ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT '';   ALTER TABLE missed_calls ADD COLUMN dst_domain VARCHAR(128) NOT NULL DEFAULT '';
 #!endif #!endif
- 
-####### Include Local Config If Exists ######### 
-import_file "kamailio-local.cfg" 
  
 ####### Defined Values ######### ####### Defined Values #########
Line 618: Line 616:
 # - database URL - used to connect to database server by modules such # - database URL - used to connect to database server by modules such
 #       as: auth_db, acc, usrloc, a.s.o. #       as: auth_db, acc, usrloc, a.s.o.
-#!ifndef DBURL +#!define DBURL "mysql://openser:openserrw@localhost/openser"
-#!define DBURL "mysql://kamailio:kamailiorw@localhost/kamailio" +
-#!endif+
 #!ifdef WITH_ASTERISK #!ifdef WITH_ASTERISK
 #!define DBASTURL "mysql://asterisk:asterisk_password@localhost/asterisk" #!define DBASTURL "mysql://asterisk:asterisk_password@localhost/asterisk"
Line 645: Line 641:
 ####### Global Parameters ######### ####### Global Parameters #########
  
-### LOG Levels: 3=DBG, 2=INFO, 1=NOTICE, 0=WARN, -1=ERR 
 #!ifdef WITH_DEBUG #!ifdef WITH_DEBUG
 debug=4 debug=4
Line 705: Line 700:
 # - by default is empty to avoid misrouting # - by default is empty to avoid misrouting
 pstn.gw_ip = "" desc "PSTN GW Address" pstn.gw_ip = "" desc "PSTN GW Address"
-pstn.gw_port = "" desc "PSTN GW Port" 
 #!endif #!endif
  
Line 715: Line 709:
 voicemail.srv_port = "5060" desc "VoiceMail Port" voicemail.srv_port = "5060" desc "VoiceMail Port"
 #!endif #!endif
 +
  
 #!ifdef WITH_ASTERISK #!ifdef WITH_ASTERISK
Line 738: Line 733:
 loadmodule "mi_fifo.so" loadmodule "mi_fifo.so"
 loadmodule "kex.so" loadmodule "kex.so"
-loadmodule "corex.so" 
 loadmodule "tm.so" loadmodule "tm.so"
 loadmodule "tmx.so" loadmodule "tmx.so"
Line 832: Line 826:
 modparam("rr", "append_fromtag", 0) modparam("rr", "append_fromtag", 0)
 #!endif #!endif
- 
  
 # ----- registrar params ----- # ----- registrar params -----
Line 914: Line 907:
  
  
-# ----- speeddial params -----+# ----- speedial params -----
 #!ifdef WITH_SPEEDDIAL #!ifdef WITH_SPEEDDIAL
 modparam("speeddial", "db_url", DBURL) modparam("speeddial", "db_url", DBURL)
Line 995: Line 988:
  # NAT detection  # NAT detection
  route(NATDETECT);  route(NATDETECT);
 +
 + # handle requests within SIP dialogs
 + route(WITHINDLG);
 +
 + ### only initial requests (no To tag)
  
  # CANCEL processing  # CANCEL processing
  if (is_method("CANCEL"))  if (is_method("CANCEL"))
  {  {
- if (t_check_trans()) { + if (t_check_trans()) 
- route(RELAY); + t_relay();
- }+
  exit;  exit;
  }  }
- 
- # handle requests within SIP dialogs 
- route(WITHINDLG); 
- 
- ### only initial requests (no To tag) 
  
  t_check_trans();  t_check_trans();
Line 1050: Line 1042:
  # user location service  # user location service
  route(LOCATION);  route(LOCATION);
 +
 + route(RELAY);
 } }
  
Line 1057: Line 1051:
  # enable additional event routes for forwarded requests  # enable additional event routes for forwarded requests
  # - serial forking, RTP relaying handling, a.s.o.  # - serial forking, RTP relaying handling, a.s.o.
- if (is_method("INVITE|BYE|SUBSCRIBE|UPDATE")) { + if (is_method("INVITE|SUBSCRIBE")) { 
- if(!t_is_set("branch_route")) t_on_branch("MANAGE_BRANCH"); + t_on_branch("MANAGE_BRANCH"); 
-+ t_on_reply("MANAGE_REPLY");
- if (is_method("INVITE|SUBSCRIBE|UPDATE")) { +
- if(!t_is_set("onreply_route")) t_on_reply("MANAGE_REPLY");+
  }  }
  if (is_method("INVITE")) {  if (is_method("INVITE")) {
- if(!t_is_set("failure_route")) t_on_failure("MANAGE_FAILURE");+ t_on_failure("MANAGE_FAILURE");
  }  }
  
Line 1114: Line 1106:
  # take the path determined by record-routing  # take the path determined by record-routing
  if (loose_route()) {  if (loose_route()) {
- route(DLGURI); 
  if (is_method("BYE")) {  if (is_method("BYE")) {
  setflag(FLT_ACC); # do accounting ...  setflag(FLT_ACC); # do accounting ...
  setflag(FLT_ACCFAILED); # ... even if the transaction fails  setflag(FLT_ACCFAILED); # ... even if the transaction fails
  }  }
- else if ( is_method("ACK") ) {+ if ( is_method("ACK") ) {
  # ACK is forwarded statelessy  # ACK is forwarded statelessy
  route(NATMANAGE);  route(NATMANAGE);
- } 
- else if ( is_method("NOTIFY") ) { 
- # Add Record-Route for in-dialog NOTIFY as per RFC 6665. 
- record_route(); 
  }  }
  route(RELAY);  route(RELAY);
Line 1139: Line 1126:
  # must be an ACK after a 487  # must be an ACK after a 487
  # or e.g. 404 from upstream server  # or e.g. 404 from upstream server
- route(RELAY);+ t_relay();
  exit;  exit;
  } else {  } else {
Line 1176: Line 1163:
 route[LOCATION] { route[LOCATION] {
  
-#!ifdef WITH_SPEEDDIAL+#!ifdef WITH_SPEEDIAL
  # search for short dialing - 2-digit extension  # search for short dialing - 2-digit extension
  if($rU=~"^[0-9][0-9]$")  if($rU=~"^[0-9][0-9]$")
Line 1220: Line 1207:
  setflag(FLT_ACCMISSED);  setflag(FLT_ACCMISSED);
  }  }
- 
- route(RELAY); 
- exit; 
 } }
  
Line 1313: Line 1297:
  fix_nated_register();  fix_nated_register();
  } else {  } else {
- add_contact_alias();+ fix_nated_contact();
  }  }
  setflag(FLT_NATS);  setflag(FLT_NATS);
Line 1343: Line 1327:
  if (is_reply()) {  if (is_reply()) {
  if(isbflagset(FLB_NATB)) {  if(isbflagset(FLB_NATB)) {
- add_contact_alias();+ fix_nated_contact();
  }  }
- } 
-#!endif 
- return; 
-} 
- 
-# URI update for dialog requests 
-route[DLGURI] { 
-#!ifdef WITH_NAT 
- if(!isdsturiset()) { 
- handle_ruri_alias(); 
  }  }
 #!endif #!endif
Line 1390: Line 1364:
  }  }
  
- if (strempty($sel(cfg_get.pstn.gw_port))) { + $ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip);
- $ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip); +
- } else { +
- $ru = "sip:" + $rU + "@" + $sel(cfg_get.pstn.gw_ip) + ":" +
- + $sel(cfg_get.pstn.gw_port); +
- }+
  
  route(RELAY);  route(RELAY);
Line 1523: Line 1492:
 } }
 #!endif #!endif
 +
  
 </code> </code>

100%


Copyright 2010-2020 Asipto.com