Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ####### Defined Values #########
- #!define MULTIDOMAIN 0
- # - flags
- # FLT_ - per transaction (message) flags
- # FLB_ - per branch flags
- #!define FLT_ACC 1
- #!define FLT_ACCMISSED 2
- #!define FLT_ACCFAILED 3
- #!define FLT_NATS 5
- #!define FLB_NATB 6
- #!define FLB_NATSIPPING 7
- ####### Global Parameters #########
- debug=2
- log_stderror=no
- memdbg=5
- memlog=5
- log_facility=LOG_LOCAL0
- fork=yes
- children=4
- /* port to listen to
- * - can be specified more than once if needed to listen on many ports */
- port=5060
- ####### Modules Section ########
- # set paths to location of modules
- mpath="/usr/local/lib64/kamailio/modules_k/:/usr/local/lib64/kamailio/modules/"
- loadmodule "mi_fifo.so"
- loadmodule "kex.so"
- loadmodule "tm.so"
- loadmodule "tmx.so"
- loadmodule "sl.so"
- loadmodule "rr.so"
- loadmodule "pv.so"
- loadmodule "maxfwd.so"
- loadmodule "usrloc.so"
- loadmodule "registrar.so"
- loadmodule "textops.so"
- loadmodule "siputils.so"
- loadmodule "xlog.so"
- loadmodule "sanity.so"
- loadmodule "ctl.so"
- loadmodule "mi_rpc.so"
- loadmodule "acc.so"
- loadmodule "dispatcher.so"
- # ----------------- setting module-specific parameters ---------------
- # ----- mi_fifo params -----
- modparam("mi_fifo", "fifo_name", "/tmp/kamailio_fifo")
- # ----- tm params -----
- # auto-discard branches from previous serial forking leg
- modparam("tm", "failure_reply_mode", 3)
- # default retransmission timeout: 30sec
- modparam("tm", "fr_timer", 30000)
- # default invite retransmission timeout after 1xx: 120sec
- modparam("tm", "fr_inv_timer", 120000)
- # ----- rr params -----
- # add value to ;lr param to cope with most of the UAs
- modparam("rr", "enable_full_lr", 1)
- # do not append from tag to the RR (no need for this script)
- modparam("rr", "append_fromtag", 0)
- # ----- registrar params -----
- modparam("registrar", "method_filtering", 1)
- /* uncomment the next line to disable parallel forking via location */
- # modparam("registrar", "append_branches", 0)
- /* uncomment the next line not to allow more than 10 contacts per AOR */
- #modparam("registrar", "max_contacts", 10)
- # ----- acc params -----
- /* what special events should be accounted ? */
- modparam("acc", "early_media", 0)
- modparam("acc", "report_ack", 0)
- modparam("acc", "report_cancels", 0)
- /* by default ww do not adjust the direct of the sequential requests.
- if you enable this parameter, be sure the enable "append_fromtag"
- in "rr" module */
- modparam("acc", "detect_direction", 0)
- /* account triggers (flags) */
- modparam("acc", "log_flag", FLT_ACC)
- modparam("acc", "log_missed_flag", FLT_ACCMISSED)
- modparam("acc", "log_extra",
- "src_user=$fU;src_domain=$fd;dst_ouser=$tU;dst_user=$rU;dst_domain=$rd")
- modparam("acc", "failed_transaction_flag", FLT_ACCFAILED)
- # ----- dispatcher params -----
- modparam("dispatcher", "list_file", "/usr/local/etc/kamailio/dispatcher.list")
- modparam("dispatcher", "flags", 2)
- modparam("dispatcher", "dst_avp", "$avp(AVP_DST)")
- modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)")
- modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)")
- ####### Routing Logic ########
- # Main SIP request routing logic
- route {
- if ( !mf_process_maxfwd_header("10") )
- {
- sl_send_reply("483","To Many Hops");
- exit;
- }
- # select from first dst group by round-robin
- if(!ds_select_dst("1", "4"))
- {
- sl_send_reply("500", "No destination available");
- exit;
- }
- t_on_failure("RTF_DISPATCH");
- if(!t_relay())
- {
- sl_reply_error();
- exit;
- }
- }
- # dispatcher failure routing block
- failure_route[RTF_DISPATCH] {
- if (t_is_canceled()) {
- exit;
- }
- # select next destination only for local timeout
- if (t_branch_timeout() && !t_branch_replied())
- {
- if(ds_next_dst())
- {
- t_on_failure("RTF_DISPATCH");
- t_relay();
- exit;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement