# # $Id$ # # example script showing both types of forking; # incoming message is foked in parallel to # 'nobody' and 'parallel', if no positive reply # appears with final_response timer, nonsense # is retried (serial forking); than, destination # 'foo' is given last chance # ----------- global configuration parameters ------------------------ debug=3 fork=no log_stderror=yes # (cmd line: -E) check_via=no # (cmd. line: -v) dns=no # (cmd. line: -r) syn_branch=1 reply_to_via=0 # advertise IP address in Via (as opposed to advertising DNS name # which is annoying for downstream servers and some phones can # not handle DNS at all) listen=195.37.77.100 # ------------------ module loading ---------------------------------- loadmodule "../sip_router/modules/sl/sl.so" loadmodule "../sip_router/modules/print/print.so" #loadmodule "../sip_router/modules/tm/tm.so" # ----------------- setting module-specific parameters --------------- # -- tm params -- modparam("tm", "fr_timer", 10 ) modparam("tm", "fr_inv_timer", 5 ) # ------------------------- request routing logic ------------------- # main routing logic route{ # for testing purposes, simply okay all REGISTERs if (method=="REGISTER") { log("REGISTER"); sl_send_reply("200", "ok"); break; }; # print a message if a call was missed seturi("sip:nobody@iptel.org"); /* parallel branch to sink port -- that will make it wait until timer hits */ append_branch("sip:parallel@iptel.org:9"); t_on_negative("1"); # start parallel forking to nobody and wer.xmla log(1,"about to relay\n"); t_relay(); } reply_route[1] { rewriteuri("sip:nonsense@iptel.org"); append_branch(); log(1,"first redirection\n"); t_on_negative("2"); } reply_route[2] { rewriteuri("sip:foo@iptel.org"); log(1, "second redirection\n"); append_branch(); }