# $Id$ # # ----------- global configuration parameters ------------------------ debug=7 fork=no log_stderror=yes check_via=no # (cmd. line: -v) dns=no # (cmd. line: -r) rev_dns=no # (cmd. line: -R) listen=192.168.0.1 port=5000 children=4 # ------------------ module loading ---------------------------------- loadmodule "modules/sl/sl.so" loadmodule "modules/tm/tm.so" loadmodule "modules/rr/rr.so" loadmodule "modules/maxfwd/maxfwd.so" # ----------------- setting module-specific parameters --------------- # ------------------------- request routing logic ------------------- # main routing logic route{ if (len_gt( max_len )) { sl_send_reply("513", "Message too big"); break; }; # we record-route all messages -- to make sure that # subsequent messages will go through our proxy; that's # particularly good if upstream and downstream entities # use different transport protocol record_route(); # loose-route processing loose_route(); # forward to current uri now; use stateful forwarding; that # works reliably even if we forward from TCP to UDP if( method == "INVITE" or method == "ACK" ) { if(!t_relay_to("192.168.0.1","5010")){ sl_reply_error(); }; } else { if(!t_relay()){ sl_reply_error(); }; }; }