- updated Makefiles ( gcc-3.0 specific options, arch. specific defines section,
[sip-router] / test / th-uri.cfg
1 #
2 # configuration for TurboSIP testing
3 #
4 # $ID: $
5 #
6
7
8 debug=3          # debug level (cmd line: -dddddddddd)
9 fork=yes          # (cmd. line: -D)
10 #fork=no
11 log_stderror=yes # (cmd line: -E)
12 #log_stderror=no        # (cmd line: -E)
13
14
15 children=4
16 check_via=no     # (cmd. line: -v)
17 dns=off           # (cmd. line: -r)
18 rev_dns=off      # (cmd. line: -R)
19 #port=5070
20 listen=10.0.0.179
21 #listen=192.168.57.33
22 loop_checks=0
23 # for more info: sip_router -h
24
25 #modules
26 #loadmodule "modules/print/print.so"
27 loadmodule "modules/tm/tm.so"
28 #loadmodule "modules/rr/rr.so"
29 loadmodule "modules/maxfwd/maxfwd.so"
30
31
32 route{
33              if ( mf_is_maxfwd_present() )
34              {
35                    if ( !mf_decrement_maxfwd() )
36                    {
37                      log("SER : unable to decrement MAX_FORWARD!\n");
38                    };
39                    if ( mf_is_maxfwd_zero() )
40                    {
41                      log("SER: MAX FORWARD header is zero\n");
42                      drop();
43                    };
44              }else{
45                    mf_add_maxfwd_header( "10" );
46              };
47
48              #if (method=="INVITE")
49              #{
50               #  log("SER : runing CPL!! :)\n");
51               #  if ( !cpl_run_script() )
52                # {
53                #    log("SER : Error during running CPL script!\n");
54                # }else{
55                 #   if ( cpl_is_response_reject() )
56                   # {
57                     #   t_add_transaction();
58                       # t_send_reply("486","I am not available!");
59                        #drop();
60                  #  }else if ( cpl_is_response_redirect() ) {
61                    #      log("SER : redirect\n");
62                   # };
63                # };
64              #};
65
66              if ( !rewriteFromRoute() )
67              {
68                 log( " SER : no route found!\n");
69                 if ( method=="INVITE" )
70                 {
71                    log ("SER : INVITE found - > adding RecordRoute!\n");
72                    addRecordRoute();
73                 };
74              }
75              else
76              {
77                 log( "SER : ROUTE found! \n");
78              };
79
80              t_relay();
81 }