Module: kamailio Branch: master Commit: 793788196669499aa633e2495a372449ba4db4e0 URL: https://github.com/kamailio/kamailio/commit/793788196669499aa633e2495a372449...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2018-06-12T11:51:34+02:00
dispatcher: docs - updated sample config
---
Modified: src/modules/dispatcher/doc/dispatcher.cfg
---
Diff: https://github.com/kamailio/kamailio/commit/793788196669499aa633e2495a372449... Patch: https://github.com/kamailio/kamailio/commit/793788196669499aa633e2495a372449...
---
diff --git a/src/modules/dispatcher/doc/dispatcher.cfg b/src/modules/dispatcher/doc/dispatcher.cfg index f5634e45a6..7c2610ccf0 100644 --- a/src/modules/dispatcher/doc/dispatcher.cfg +++ b/src/modules/dispatcher/doc/dispatcher.cfg @@ -118,10 +118,8 @@ modparam("tm", "fr_inv_timer", 40000) modparam("dispatcher", "db_url", DBURL) modparam("dispatcher", "table_name", "dispatcher") 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)") -modparam("dispatcher", "sock_avp", "$avp(AVP_SOCK)") +modparam("dispatcher", "xavp_dst", "_dsdst_") +modparam("dispatcher", "xavp_ctx", "_dsctx_")
####### Routing Logic ########
@@ -133,25 +131,27 @@ request_route { # per request initial checks route(REQINIT);
- # handle requests within SIP dialogs - route(WITHINDLG); - - ### only initial requests (no To tag) - # CANCEL processing - if (is_method("CANCEL")) - { - if (t_check_trans()) - t_relay(); + if (is_method("CANCEL")) { + if (t_check_trans()) { + route(RELAY); + } exit; }
# handle retransmissions - if(t_precheck_trans()) { + if (!is_method("ACK")) { + if(t_precheck_trans()) { + t_check_trans(); + exit; + } t_check_trans(); - exit; } - t_check_trans(); + + # handle requests within SIP dialogs + route(WITHINDLG); + + ### only initial requests (no To tag)
# record routing for dialog forming requests (in case they are routed) # - remove preloaded route headers @@ -259,7 +259,7 @@ route[DISPATCH] { send_reply("404", "No destination"); exit; } - xlog("L_DBG", "--- SCRIPT: going to <$ru> via <$du>\n"); + xdbg("--- SCRIPT: going to <$ru> via <$du> (attrs: $xavp(_dsdst_=>attrs))\n"); t_on_failure("RTF_DISPATCH"); route(RELAY); exit; @@ -274,6 +274,7 @@ failure_route[RTF_DISPATCH] { if (t_check_status("500") or (t_branch_timeout() and !t_branch_replied())) { if(ds_next_dst()) { + xdbg("--- SCRIPT: retrying to <$ru> via <$du> (attrs: $xavp(_dsdst_=>attrs))\n"); t_on_failure("RTF_DISPATCH"); route(RELAY); exit;