فهرست منبع

scripts Moved to examples

Jiri Kuthan 23 سال پیش
والد
کامیت
3d3dda2db3
4فایلهای تغییر یافته به همراه4 افزوده شده و 197 حذف شده
  1. 4 1
      etc/iptel.cfg
  2. 0 72
      etc/onr.cfg
  3. 0 43
      etc/redirect.cfg
  4. 0 81
      etc/uas.cfg

+ 4 - 1
etc/iptel.cfg

@@ -269,8 +269,11 @@ route{
 	if (uri=~"sip:9042@") {
 		seturi("sip:[email protected]");
 	};
+#	if (uri=~"sip:17@") {
+#		seturi("sip:[email protected]");
+#	};
 	if (uri=~"sip:17@") {
-		seturi("sip:[email protected]");
+		seturi("sip:henry@sip.sinnreich.net");
 	};
 	if (uri=~"sip:jirim@"  ) {
 		seturi("sip:[email protected]");

+ 0 - 72
etc/onr.cfg

@@ -1,72 +0,0 @@
-#
-# $Id$
-#
-# example script showing both types of forking;
-# incoming message is foked in parallel to
-# 'nobody' and 'parallel', if no positive reply
-# appears with final_response timer, nonsense
-# is retried (serial forking); than, destination
-# 'foo' is given last chance
-
-# ----------- global configuration parameters ------------------------
-
-debug=3
-fork=no
-log_stderror=yes	# (cmd line: -E)
-check_via=no # (cmd. line: -v)
-dns=no # (cmd. line: -r)
-syn_branch=1
-reply_to_via=0
-
-# advertise IP address in Via (as opposed to advertising DNS name
-# which is annoying for downstream servers and some phones can
-# not handle DNS at all)
-listen=195.37.77.100
-
-# ------------------ module loading ----------------------------------
-
-loadmodule "../sip_router/modules/sl/sl.so"
-loadmodule "../sip_router/modules/print/print.so"
-#loadmodule "../sip_router/modules/tm/tm.so"
-
-# ----------------- setting module-specific parameters ---------------
-
-# -- tm params --
-modparam("tm", "fr_timer", 10 )
-modparam("tm", "fr_inv_timer", 5 )
-
-# -------------------------  request routing logic -------------------
-
-# main routing logic
-
-route{
-	# for testing purposes, simply okay all REGISTERs
-	if (method=="REGISTER") {
-		log("REGISTER");
-		sl_send_reply("200", "ok");
-		break;
-	};
-	# print a message if a call was missed
-	seturi("sip:[email protected]");
-	/* parallel branch to sink port -- that will make it
-	   wait until timer hits
-	*/
-	append_branch("sip:[email protected]:9");
-	t_on_negative("1");
-	# start parallel forking to nobody and wer.xmla	
-	log(1,"about to relay\n");
-	t_relay();
-}
-
-reply_route[1] {
-	rewriteuri("sip:[email protected]");
-	append_branch();
-	log(1,"first redirection\n");
-	t_on_negative("2");
-}
-
-reply_route[2] {
-	rewriteuri("sip:[email protected]");
-	log(1, "second redirection\n");
-	append_branch();
-}

+ 0 - 43
etc/redirect.cfg

@@ -1,43 +0,0 @@
-#
-# $Id$
-#
-# this example shows use of ser as stateless redirect server
-#
-
-# ----------- global configuration parameters ------------------------
-
-debug=3
-fork=no
-log_stderror=yes	# (cmd line: -E)
-check_via=no # (cmd. line: -v)
-dns=no # (cmd. line: -r)
-syn_branch=1
-reply_to_via=0
-
-# advertise IP address in Via (as opposed to advertising DNS name
-# which is annoying for downstream servers and some phones can
-# not handle DNS at all)
-listen=195.37.77.100
-
-# ------------------ module loading ----------------------------------
-
-loadmodule "../sip_router/modules/sl/sl.so"
-loadmodule "../sip_router/modules/print/print.so"
-
-
-# -------------------------  request routing logic -------------------
-
-# main routing logic
-
-route{
-	# for testing purposes, simply okay all REGISTERs
-	if (method=="REGISTER") {
-		log("REGISTER");
-		sl_send_reply("200", "ok");
-		break;
-	};
-	append_branch("sip:[email protected]:9");
-	append_branch("sip:[email protected]:9");
-	sl_send_reply("300", "Redirect");
-}
-

+ 0 - 81
etc/uas.cfg

@@ -1,81 +0,0 @@
-#
-# $Id$
-#
-# this example shows usage of ser as user agent
-# server which does some functionality (in this
-# example, 'log' is used to print a notification
-# on a new transaction) and behaves statefuly
-# (e.g., it retransmits replies on request
-# retransmissions)
-
-# ----------- global configuration parameters ------------------------
-
-debug=3
-fork=no
-#children=2
-log_stderror=yes	# (cmd line: -E)
-check_via=yes     # (cmd. line: -v)
-dns=0           # (cmd. line: -r)
-rev_dns=0      # (cmd. line: -R)
-port=5068
-reply_to_via=no
-
-# advertise IP address in Via (as opposed to advertising DNS name
-# which is annoying for downstream servers and some phones can
-# not handle DNS at all)
-listen=195.37.77.100
-
-# ------------------ module loading ----------------------------------
-
-loadmodule "../sip_router/modules/sl/sl.so"
-loadmodule "../sip_router/modules/print/print.so"
-#loadmodule "../sip_router/modules/tm/tm.so"
-loadmodule "../sip_router/modules/usrloc/usrloc.so"
-
-# ----------------- setting module-specific parameters ---------------
-
-# -- usrloc params --
-
-modparam("usrloc", "use_database",   0)
-modparam("usrloc", "flush_interval", 3600)
-
-# -------------------------  request routing logic -------------------
-
-# main routing logic
-
-route{
-	# for testing purposes, simply okay all REGISTERs
-	if (method=="REGISTER") {
-		log("REGISTER");
-		sl_send_reply("200", "ok");
-		#t_replicate("localhost", "9");
-		break;
-	};
-	# print a message if a call was missed
-
-	if ( t_newtran())
-    {
-		if (method=="ACK") {
-			log("oops--ACK to a non-existent transaction");
-			drop;
-		};
-		log("New Transaction Arrived\n");
-        # do what you want to do as a sever
-		if (uri=~"a@") {
-			if (!t_reply("409", "Bizzar Error")) {
-				sl_reply_error();
-			};
-		} else if (uri=~"b@") {
-			if (!t_reply("979", "You did not expect this did you")) {
-				sl_reply_error();
-			};
-		} else {
-			if (!t_reply("699", "I don't want to chat with you")) {
-				sl_reply_error();
-			};
-		} ;
-    } else {
-		sl_reply_error();
-	};
-}
-