bug fixes, latency stats
[sip-router] / test / xx.cfg
1 # forwarding to Cisco phone
2 #
3 # $Id$
4 #
5
6
7 debug=3          # debug level (cmd line: -dddddddddd)
8 log_stderror=yes # (cmd line: -E)
9 check_via=yes     # (cmd. line: -v)
10 dns=on           # (cmd. line: -r)
11 rev_dns=yes      # (cmd. line: -R)
12 fork=no          # (cmd. line: -D)
13 port=5080
14 #listen=127.0.0.1
15 listen=192.168.99.100
16 loop_checks=1
17 # for more info: sip_router -h
18
19 #modules
20 loadmodule "modules/print/print.so"
21 #loadmodule "modules/tm/tm.so"
22
23 route[0] {
24         forward(195.37.78.146, 5060);
25         drop;
26 }
27
28 route[1]{
29         if ( t_lookup_request()) {
30                 if ( method=="ACK" )    {
31                         t_release();
32 #                       forward(195.37.77.100, 5090 );
33 #                       forward(195.37.78.146, 5060 );
34 # once it supports ACK too
35 #                       t_forward(195.37.77.100, 5090 );
36                         t_forward("195.37.78.146", "5060" );
37                 } else {
38                         t_retransmit_reply();
39                 };
40                 t_unref();
41         } else {
42                 if (method=="ACK") {
43 #                       forward(195.37.77.100, 5090 );
44                         forward(195.37.78.146, 5060 );
45                 } else {
46                         t_add_transaction();
47                         if (method=="CANCEL") {
48                                 t_send_reply( "200", "glad to cancel");
49                         } else {
50                                 t_send_reply("100", "trying -- your call is important to us");
51                         };
52 #                       t_forward("195.37.77.100", "5090" );
53                         t_forward("195.37.78.146", "5060" );
54                         t_unref();
55                 };
56         };
57                 
58 }