<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:新細明體;
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@新細明體";
        panose-1:2 2 5 0 0 0 0 0 0 0;}
@font-face
        {font-family:微軟正黑體;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@微軟正黑體";
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
/* Page Definitions */
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="ZH-TW" link="#0563C1" vlink="#954F72" style="text-justify-trim:punctuation">
<div class="WordSection1">
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">Hi admins,<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">I'm kinda new in this group and I'm not quite sure if I'm posting in a correct way, advise if I'm wrong.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">below is my post.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">------------------------------------------------------------------------------------------------------------------------------------<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">I would like to activate Dispatcher module for apply Load Balance functionality purpose.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">but it's been hard to complete so far, I wonder if you can give me some advise in below situation.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">we have 2 Kamailios, the version is 4.3.3 ; we use domain for the SIP registration.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">we want to make Kamailios work in double active mode for SIP load balancing,<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">we have a F5 to do the domain name round robin to make two UAC regitering under two UAS.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">I have put the "route(DISPATCH) b4 PSTN in request_route.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">when I try to make UAC-A call to UAC-B, it appears 407 proxy authentication required.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">we wiresharked, UAS has sent INVITE to UAS-B, but UAS-B sent the error code 407 to UAS-A<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">Is the configuration has to be set to "UAS-B accepting INVITE of UAS-A" ?<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">or the UAS-A should carrying the auth info into UAS-B ?<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">detail configuration as below.<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">------------------------------------------------------------------------------------------------------------------------------------<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">dispatcher params<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">modparam("dispatcher", "list_file", "/usr/local/etc/kamailio/dispatcher.list")<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">modparam("dispatcher", "flags", 1)<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">modparam("dispatcher", "dst_avp", "$avp(AVP_DST)")<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">modparam("dispatcher", "grp_avp", "$avp(AVP_GRP)")<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">modparam("dispatcher", "cnt_avp", "$avp(AVP_CNT)")<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">modparam("dispatcher", "sock_avp", "$avp(AVP_SOCK)")<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">modparam("dispatcher", "ds_ping_interval", 30)<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">modparam("dispatcher", "ds_ping_from", "sip:kamailio1@awesomedomain.com")<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">modparam("dispatcher", "ds_ping_method", "OPTIONS")<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">modparam("dispatcher", "ds_probing_mode", 1)<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">modparam("dispatcher", "ds_probing_threshold", 1)<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">DISPATCHER Routing<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">route[DISPATCH] {<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D"># round robin dispatching on gateways group '1'<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">        if(!ds_select_dst("1", "4")) {<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">                send_reply("404", "No destination");<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">                exit;<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">                }<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">        xdbg("--- SCRIPT: going to <$ru> via <$du>\n");<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">        t_on_failure("RTF_DISPATCH");<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">        route(RELAY);<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">        exit;<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">        }<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D"># Re-route in case of failure<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">failure_route[RTF_DISPATCH] {<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">        if (t_is_canceled()) {<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">        exit;<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">        }<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D"># next node - only for 500 or local timeout<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">        if (t_check_status("500") || (t_branch_timeout() && !t_branch_replied())) {<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">                if(ds_next_dst()) {<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">                        t_on_failure("RTF_DISPATCH");<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">                        route(RELAY);<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">                        exit;<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">                }<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">        }<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">}<o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">Best Regards,</span><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="line-height:12.0pt;background:white"><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:#1F497D">Rex Lin</span><span lang="EN-US" style="font-size:10.5pt;font-family:"微軟正黑體",sans-serif;color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>