| 1 | # |
|---|
| 2 | # openser configuration for its use as msrp conference focus |
|---|
| 3 | # |
|---|
| 4 | |
|---|
| 5 | alias=localhost |
|---|
| 6 | alias=example.com |
|---|
| 7 | alias=ag-projects.com |
|---|
| 8 | |
|---|
| 9 | ####### Global Parameters ######### |
|---|
| 10 | |
|---|
| 11 | debug=3 |
|---|
| 12 | log_stderror=no |
|---|
| 13 | log_facility=LOG_LOCAL0 |
|---|
| 14 | |
|---|
| 15 | fork=yes |
|---|
| 16 | children=1 |
|---|
| 17 | |
|---|
| 18 | /* uncomment the following lines to enable debugging */ |
|---|
| 19 | debug=6 |
|---|
| 20 | #fork=no |
|---|
| 21 | log_stderror=yes |
|---|
| 22 | |
|---|
| 23 | port=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 | |
|---|
| 29 | mpath="lib" |
|---|
| 30 | |
|---|
| 31 | loadmodule "sl.so" |
|---|
| 32 | loadmodule "tm.so" |
|---|
| 33 | loadmodule "rr.so" |
|---|
| 34 | loadmodule "maxfwd.so" |
|---|
| 35 | loadmodule "usrloc.so" |
|---|
| 36 | loadmodule "registrar.so" |
|---|
| 37 | loadmodule "textops.so" |
|---|
| 38 | loadmodule "mi_datagram.so" |
|---|
| 39 | loadmodule "uri_db.so" |
|---|
| 40 | loadmodule "uri.so" |
|---|
| 41 | loadmodule "xlog.so" |
|---|
| 42 | loadmodule "acc.so" |
|---|
| 43 | |
|---|
| 44 | loadmodule "db_mysql.so" |
|---|
| 45 | loadmodule "presence.so" |
|---|
| 46 | loadmodule "dialog.so" |
|---|
| 47 | loadmodule "pua.so" |
|---|
| 48 | loadmodule "pua_mi.so" |
|---|
| 49 | loadmodule "nat_traversal.so" |
|---|
| 50 | |
|---|
| 51 | loadmodule "presence_xcapdiff.so" |
|---|
| 52 | |
|---|
| 53 | modparam("mi_datagram", "socket_name", "/var/run/openser/socket") |
|---|
| 54 | |
|---|
| 55 | # add value to ;lr param to cope with most of the UAs |
|---|
| 56 | modparam("rr", "enable_full_lr", 1) |
|---|
| 57 | # do not append from tag to the RR (no need for this script) |
|---|
| 58 | modparam("rr", "append_fromtag", 0) |
|---|
| 59 | |
|---|
| 60 | modparam("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 */ |
|---|
| 68 | modparam("uri_db", "use_uri_table", 0) |
|---|
| 69 | modparam("uri_db", "db_url", "") |
|---|
| 70 | |
|---|
| 71 | /* what sepcial events should be accounted ? */ |
|---|
| 72 | modparam("acc", "early_media", 1) |
|---|
| 73 | modparam("acc", "report_ack", 1) |
|---|
| 74 | modparam("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 */ |
|---|
| 78 | modparam("acc", "detect_direction", 0) |
|---|
| 79 | /* account triggers (flags) */ |
|---|
| 80 | modparam("acc", "failed_transaction_flag", 3) |
|---|
| 81 | modparam("acc", "log_flag", 1) |
|---|
| 82 | modparam("acc", "log_missed_flag", 2) |
|---|
| 83 | /* uncomment the following lines to enable DB accounting also */ |
|---|
| 84 | modparam("acc", "db_flag", 1) |
|---|
| 85 | modparam("acc", "db_missed_flag", 2) |
|---|
| 86 | |
|---|
| 87 | modparam("usrloc", "db_mode", 0) |
|---|
| 88 | |
|---|
| 89 | modparam("presence", "db_url", |
|---|
| 90 | "mysql://openser:openser@localhost/openser") |
|---|
| 91 | #modparam("presence", "server_address", "sip:192.168.1.2:5060") |
|---|
| 92 | |
|---|
| 93 | modparam("pua", "db_url", |
|---|
| 94 | "mysql://openser:openser@localhost/openser") |
|---|
| 95 | |
|---|
| 96 | |
|---|
| 97 | modparam("tm", "fr_timer", 10) |
|---|
| 98 | |
|---|
| 99 | modparam("presence_xcapdiff", "enable_presence", 1) |
|---|
| 100 | modparam("presence_xcapdiff", "enable_pua", 1) |
|---|
| 101 | |
|---|
| 102 | modparam("dialog", "dlg_flag", 4) |
|---|
| 103 | |
|---|
| 104 | route{ |
|---|
| 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 | } |
|---|