<div><div dir="auto">Hello,</div><div dir="auto"><br></div><div dir="auto">You’re only pasting the dispatcher route.</div><div dir="auto"><br></div><div dir="auto">You need to follow the script logic. An invite comes in, how does it know the call is coming from the client and has to be sent to freeSWITCH? Conversely, how does it know it’s coming from freeswitch?</div><div dir="auto"><br></div><div dir="auto">Probably using the permissions module with </div></div><div><div><a href="https://kamailio.org/docs/modules/3.1.x/modules_k/permissions.html#id2528655">https://kamailio.org/docs/modules/3.1.x/modules_k/permissions.html#id2528655</a></div><div dir="auto"><br></div><div dir="auto">You can check if the $si is the freeswitch, then send to clientB</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 22 Nov 2019 at 11:40, Daniel-Constantin Mierla <<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">
  
    
  
  <div>
    <p>Hello,</p>
    <p>there is something wrong in your config file, failing to detect
      the traffic from freeswitch. Load debugger module and enable
      cfgtrace logging, then see what actions are executed in the
      configuration file, maybe you can spot what goes wrong there.</p>
    <p>Otherwise, to get more help from the mailing lists, the full
      config is needed.</p>
    <p>Cheers,<br>
      Daniel<br>
    </p></div><div>
    <div>On 22.11.19 09:51, Gaurav Bmotra wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">hi <br>
        i m using kamailio 5.3 as register server and using dispatcher i
        m dendign the calls to freeswitch ..
        <div><br>
        </div>
        <div>but the issue is then freeswitch send back call to kamailio
          after processing media ... it should go back to client but it
          again send call to freeswitch ,, which create the loop and
          hangup the call with (<span style="font-family:Ubuntu;font-size:12px;background-color:rgba(255,255,255,0.701961);color:rgb(200,0,0)">Temporarily
            Unavailable (code: 480)</span>)<br>
          <br>
          <b>what i want <br>
          </b>client1------>Kamailio------>FS-----Kamailio----->Client2<br>
          <br>
          <b>but I am getting this </b></div>
        <div>
          <div>client1------>Kamailio------>FS-----Kamailio----->FS----->kamailio----->FS<br>
            <br>
            <b>Routing Logic<br>
            </b>-------------------------------<br>
            if(!ds_is_from_list()) {                                    
                                                                       
               </div>
          <div>   route(DISPATCH);                                      
                                                                       
                        }                           <br>
          </div>
          <div>--------</div>
          <div># Dispatch requests                                      
                                                                       
                                                                       
                                                           <br>
            route[DISPATCH] {                                          
                                                                       
                                                                       
                                                         <br>
                    # round robin dispatching on gateways group '1'    
                                                                       
                                                                       
                                                         <br>
                    if(!ds_select_dst("1", "4")) {                      
                                                                       
                                                                       
                                                        <br>
                            send_reply("404", "No destination");        
                                                                       
                                                                       
                                                        <br>
                            exit;                                      
                                                                       
                                                                       
                                                         <br>
                    }                                                  
                                                                       
                                                                       
                                                         <br>
                    xdbg("--- SCRIPT: going to <$ru> via
            <$du> (attrs: $xavp(_dsdst_=>attrs))\n");          
                                                                       
                                                                       
                    <br>
                    t_on_failure("RTF_DISPATCH");                      
                                                                       
                                                                       
                                                         <br>
                    route(RELAY);                                      
                                                                       
                                                                       
                                                         <br>
                    exit;                                              
                                                                       
                                                                       
                                                         <br>
            }                                                          
                                                                       
                                                                       
                                                         <br>
                                                                       
                                                                       
                                                                       
                                                         <br>
            # Try next destionations in failure route                  
                                                                       
                                                                       
                                                         <br>
            failure_route[RTF_DISPATCH] {                              
                                                                       
                                                                       
                                                         <br>
                    xnotice("RTF_DISPATCH: $rm $rU [$ci]");            
                                                                       
                                                                       
                                                         <br>
                    if (t_is_canceled()) {                              
                                                                       
                                                                       
                                                        <br>
                            exit;                                      
                                                                       
                                                                       
                                                         <br>
                    }                                                  
                                                                       
                                                                       
                                                         <br>
                    # next DST - only for 500 or local timeout          
                                                                       
                                                                       
                                                        <br>
                    if (t_check_status("(^5)")                          
                                                                       
                                                                       
                                                        <br>
                                    or (t_branch_timeout() and
            !t_branch_replied())) {                                    
                                                                       
                                                                  <br>
                            xnotice("RTF_DISPATCH: WARNING $du is broken
            and marked as inactive");                                  
                                                                       
                                                        <br>
                             # ds_mark_dst("ip");                      
                                                                       
                                                                       
                                                         <br>
                            if(ds_next_dst()) {                        
                                                                       
                                                                       
                                                         <br>
                                    #xdbg("--- SCRIPT: retrying to
            <$ru> via <$du> (attrs:
            $xavp(_dsdst_=>attrs))\n");                              
                                                                       
                                        <br>
                                    t_on_failure("RTF_DISPATCH");      
                                                                       
                                                                       
                                                         <br>
                                    route(RELAY);                      
                                                                       
                                                                       
                                                         <br>
                                    exit;                              
                                                                       
                                                                       
                                                         <br>
                            }                                          
                                                                       
                                                                       
                                                         <br>
                    }                                                  
                                                                       
                                                                       
                                                         <br>
            }                                                        <br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          -- <br>
          <div dir="ltr" data-smartmail="gmail_signature">
            <div dir="ltr">
              <div>
                <div dir="ltr">
                  <div>
                    <div dir="ltr">
                      <div dir="ltr">
                        <div dir="ltr">
                          <div>
                            <div dir="ltr">thank you <br>
                              <br>
                              <br>
                              <br>
                              <br>
                              <br>
                              <br>
                              <br>
                              <font style="color:rgb(153,153,153)"><b>Regards:</b><br>
                                Gaurav Kumar</font><br>
                            </div>
                          </div>
                          <div><br>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <pre style="font-family:monospace">_______________________________________________
Kamailio (SER) - Users Mailing List
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" style="font-family:monospace">sr-users@lists.kamailio.org</a>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" target="_blank" style="font-family:monospace">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <pre cols="72" style="font-family:monospace">-- 
Daniel-Constantin Mierla -- <a href="http://www.asipto.com" target="_blank" style="font-family:monospace">www.asipto.com</a>
<a href="http://www.twitter.com/miconda" target="_blank" style="font-family:monospace">www.twitter.com/miconda</a> -- <a href="http://www.linkedin.com/in/miconda" target="_blank" style="font-family:monospace">www.linkedin.com/in/miconda</a>
Kamailio World Conference - April 27-29, 2020, in Berlin -- <a href="http://www.kamailioworld.com" target="_blank" style="font-family:monospace">www.kamailioworld.com</a></pre>
  </div>

_______________________________________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Regards,</div><div><br></div>David Villasmil<div>email: <a href="mailto:david.villasmil.work@gmail.com" target="_blank">david.villasmil.work@gmail.com</a></div><div>phone: +34669448337</div></div></div>