Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # --- global parameters
- #
- debug=9
- fork=yes
- log_stderror=no
- log_facility=log_local7
- check_via=no
- #reply_to_via=no
- sip_warning=no
- children=10
- port=5060
- dns=no
- rev_dns=no
- disable_tcp=yes
- # --- load modules
- mpath="/usr/lib/opensips/modules/"
- loadmodule "sl.so"
- loadmodule "tm.so"
- loadmodule "rr.so"
- loadmodule "maxfwd.so"
- loadmodule "usrloc.so"
- loadmodule "registrar.so"
- loadmodule "textops.so"
- loadmodule "mi_fifo.so"
- loadmodule "db_text.so"
- loadmodule "nat_traversal.so"
- loadmodule "nathelper.so"
- loadmodule "signaling.so"
- loadmodule "uri.so"
- loadmodule "sipmsgops.so"
- # --- module params
- modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
- modparam("db_text", "db_mode", 1)
- modparam("rr", "enable_double_rr", 0)
- modparam("tm", "wt_timer", 30)
- # this is the timer that determines how much should
- # wait before deciding that a dialer is down
- modparam("tm", "fr_timer", 3)
- modparam("tm", "fr_inv_timer", 120)
- modparam("tm", "disable_6xx_block", 1)
- # request routing logic
- route
- {
- # xlog("L_INFO", "RECV: $rm, $fu, $ru\n");
- # sanity checks
- if (!mf_process_maxfwd_header("10")) {
- sl_send_reply("483","Too Many Hops");
- exit;
- }
- if (msg:len >= max_len) {
- sl_send_reply("513", "Message too big");
- exit;
- }
- # Only grab initial INVITEs
- if (is_method("INVITE") && !has_totag()) {
- record_route();
- route(1);
- }
- if (has_totag()) {
- # Anything else we should use the record-routing headers to handle
- if (loose_route()) {
- if (!t_relay()) {
- sl_reply_error();
- }
- exit;
- } else {
- if (is_method("ACK")) {
- if (t_check_trans()) {
- # non loose-route, but stateful ACK; must be an ACK after a 487 or poss. 404
- # from upstream server
- t_relay();
- exit;
- } else {
- # ACK without matching transaction - ignore and discard
- exit;
- }
- }
- sl_send_reply("404","Not here");
- }
- }
- if (!t_relay()) {
- sl_reply_error();
- }
- }
- route[1] {
- rewritehost("Destination.Me.com");
- # send it out now; use stateful forwarding as it works reliably
- # even for UDP2TCP
- if (!t_relay()) {
- sl_reply_error();
- }
- exit;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement