root/openser/openser.cfg

Revision 215, 3.2 kB (checked in by Denis Bilenko <denis@ag-projects.com>, 4 months ago)

openser.cfg: added fix_contact()

Line 
1#
2# openser configuration for its use as msrp conference focus
3#
4
5alias=localhost
6alias=example.com
7alias=ag-projects.com
8
9####### Global Parameters #########
10
11debug=3
12log_stderror=no
13log_facility=LOG_LOCAL0
14
15fork=yes
16children=1
17
18/* uncomment the following lines to enable debugging */
19debug=6
20#fork=no
21log_stderror=yes
22
23port=5060
24
25/* uncomment and configure the following line if you want openser to 
26   bind on a specific interface/port/proto (default bind on all available) */
27#listen=udp:192.168.1.2:5060
28
29mpath="lib"
30
31loadmodule "sl.so"
32loadmodule "tm.so"
33loadmodule "rr.so"
34loadmodule "maxfwd.so"
35loadmodule "usrloc.so"
36loadmodule "registrar.so"
37loadmodule "textops.so"
38loadmodule "mi_datagram.so"
39loadmodule "uri_db.so"
40loadmodule "uri.so"
41loadmodule "xlog.so"
42loadmodule "acc.so"
43
44loadmodule "db_mysql.so"
45loadmodule "presence.so"
46loadmodule "dialog.so"
47loadmodule "pua.so"
48loadmodule "pua_mi.so"
49loadmodule "nat_traversal.so"
50
51loadmodule "presence_xcapdiff.so"
52
53modparam("mi_datagram", "socket_name", "/var/run/openser/socket")
54
55# add value to ;lr param to cope with most of the UAs
56modparam("rr", "enable_full_lr", 1)
57# do not append from tag to the RR (no need for this script)
58modparam("rr", "append_fromtag", 0)
59
60modparam("registrar", "method_filtering", 1)
61/* uncomment the next line to disable parallel forking via location */
62# modparam("registrar", "append_branches", 0)
63/* uncomment the next line not to allow more than 10 contacts per AOR */
64#modparam("registrar", "max_contacts", 10)
65
66/* by default we disable the DB support in the module as we do not need it
67   in this configuration */
68modparam("uri_db", "use_uri_table", 0)
69modparam("uri_db", "db_url", "")
70
71/* what sepcial events should be accounted ? */
72modparam("acc", "early_media", 1)
73modparam("acc", "report_ack", 1)
74modparam("acc", "report_cancels", 1)
75/* by default ww do not adjust the direct of the sequential requests.
76   if you enable this parameter, be sure the enable "append_fromtag"
77   in "rr" module */
78modparam("acc", "detect_direction", 0)
79/* account triggers (flags) */
80modparam("acc", "failed_transaction_flag", 3)
81modparam("acc", "log_flag", 1)
82modparam("acc", "log_missed_flag", 2)
83/* uncomment the following lines to enable DB accounting also */
84modparam("acc", "db_flag", 1)
85modparam("acc", "db_missed_flag", 2)
86
87modparam("usrloc", "db_mode",   0)
88
89modparam("presence", "db_url",
90         "mysql://openser:openser@localhost/openser")
91#modparam("presence", "server_address", "sip:192.168.1.2:5060")
92
93modparam("pua", "db_url",
94         "mysql://openser:openser@localhost/openser")
95
96
97modparam("tm", "fr_timer", 10)
98
99modparam("presence_xcapdiff", "enable_presence", 1)
100modparam("presence_xcapdiff", "enable_pua", 1)
101
102modparam("dialog", "dlg_flag", 4)
103
104route{
105
106        if (!mf_process_maxfwd_header("10")) {
107                sl_send_reply("483","Too Many Hops");
108                exit;
109        }
110
111    if (method=='SUBSCRIBE') {
112        if (client_nat_test("3")) {
113            fix_contact();
114        }       
115       
116        handle_subscribe();
117        exit;
118    }
119    if ( method=='PUBLISH') {
120        handle_publish();
121        exit;
122    }
123
124        t_check_trans();
125
126        if ($rU==NULL) {
127                # request with no Username in RURI
128                sl_send_reply("484","Address Incomplete");
129                exit;
130        }
131
132    t_newtran();
133    t_reply("404", "Not Found");
134}
Note: See TracBrowser for help on using the browser.