Skip to content

Commit

Permalink
dispatcher: Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
liviuchircu committed Apr 16, 2019
1 parent 38114fb commit 01b3dac
Show file tree
Hide file tree
Showing 4 changed files with 173 additions and 169 deletions.
30 changes: 14 additions & 16 deletions modules/dispatcher/doc/dispatcher.cfg
Expand Up @@ -2,40 +2,38 @@
# sample config file for dispatcher module
#

debug_mode=yes
listen = udp:*:5060

children=2
check_via=no # (cmd. line: -v)
dns=off # (cmd. line: -r)
rev_dns=off # (cmd. line: -R)
port=5060
udp_workers = 2
check_via = off # (cmd. line: -v)
dns = off # (cmd. line: -r)
rev_dns = off # (cmd. line: -R)

# for more info: opensips -h

# ------------------ module loading ----------------------------------
mpath="/usr/local/lib/opensips/modules/"
mpath = "/usr/lib/x86_64-linux-gnu/opensips/modules"

loadmodule "maxfwd.so"
loadmodule "signaling.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "db_mysql.so"
loadmodule "dispatcher.so"

loadmodule "proto_udp.so"

# ----------------- setting module-specific parameters ---------------
# -- dispatcher params --

modparam("dispatcher", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")

route{
if ( !mf_process_maxfwd_header("10") )
{
send_reply("483","To Many Hops");
route {
if (!mf_process_maxfwd_header(10)) {
send_reply(483, "Too Many Hops");
exit;
};
}

if ( !ds_select_dst("2", "0") ) {
send_reply("500","Unable to route");
if (!ds_select_dst(2, 0)) {
send_reply(503, "Service Unavailable");
exit;
}

Expand Down

0 comments on commit 01b3dac

Please sign in to comment.