bidirectional
authorJiri Kuthan <jiri@iptel.org>
Fri, 11 Jan 2002 04:31:24 +0000 (04:31 +0000)
committerJiri Kuthan <jiri@iptel.org>
Fri, 11 Jan 2002 04:31:24 +0000 (04:31 +0000)
test/tx.cfg

index fabc6de..031c0c6 100644 (file)
@@ -4,7 +4,7 @@
 # $ID: $
 #
 
 # $ID: $
 #
 
-debug=1          # debug level (cmd line: -dddddddddd)
+debug=9          # debug level (cmd line: -dddddddddd)
 fork=yes          # (cmd. line: -D)
 #fork=no
 log_stderror=yes # (cmd line: -E)
 fork=yes          # (cmd. line: -D)
 #fork=no
 log_stderror=yes # (cmd line: -E)
@@ -17,7 +17,7 @@ dns=on           # (cmd. line: -r)
 rev_dns=yes      # (cmd. line: -R)
 port=5080
 #listen=127.0.0.1
 rev_dns=yes      # (cmd. line: -R)
 port=5080
 #listen=127.0.0.1
-listen=192.168.99.100
+listen=195.37.77.101
 loop_checks=1
 # for more info: sip_router -h
 
 loop_checks=1
 # for more info: sip_router -h
 
@@ -25,12 +25,13 @@ loop_checks=1
 loadmodule "modules/print/print.so"
 #loadmodule "modules/tm/tm.so"
 
 loadmodule "modules/print/print.so"
 #loadmodule "modules/tm/tm.so"
 
-route[0]{
-                       forward("bat.iptel.org", 5090);
-                       break;
-}
+#route[0]{
+#      if (method=="BYE") { forward("bat.iptel.org", 5000); }
+#      else forward("bat.iptel.org", 5090);
+#      break;
+#}
 
 
-route[1]{
+route[0]{
        log("SER: new request reveived\n");
        if ( t_lookup_request()) {
                if ( method=="ACK" )    {
        log("SER: new request reveived\n");
        if ( t_lookup_request()) {
                if ( method=="ACK" )    {
@@ -78,9 +79,15 @@ route[1]{
                                        log("SER: ERROR: t_send_reply (100)\n");
                                } else log("SER: t_send_reply ok\n");
                        };
                                        log("SER: ERROR: t_send_reply (100)\n");
                                } else log("SER: t_send_reply ok\n");
                        };
-                       if (! t_forward("bat.iptel.org", "5090")){
-                               log("SER:ERROR: t_forward (..., 5555)\n");
-                       } else log("SER: t_forward ok\n");
+                       if (method=="INVITE") {
+                               if (! t_forward("bat.iptel.org", "5090")){
+                                       log("SER:ERROR: t_forward (..., 5555)\n");
+                               } else log("SER: t_forward ok\n");
+                       } else if (method=="BYE") {
+                               if (! t_forward("bat.iptel.org", "5090")){
+                                       log("SER:ERROR: t_forward (..., 5555)\n");
+                               } else log("SER: t_forward ok\n");
+                       } else log("SER: ERROR unknwon request\n");
                        t_unref();
                };
        };
                        t_unref();
                };
        };