<html><body bgcolor="#FFFFFF"><div><div>Hello Danial,</div><div><br></div><div>Hereby details:</div><div>My current working 1st scenario is a call generated from A-party x-lite registered on kamalio, this call is routed based on kamailio lcr routing module which add prefix and send prefix to 3CX then 3CX forward the call to B-party x-lite, registered on 3CX, successfully.</div><div><br></div><div>In kamailio.cfg routing logic I only used :</div><div><br></div><div>...</div><div>If (is_method("INVITE"))</div><div>{ if(!load_gateway("1")) {</div><div>sl_send_reply("503", "unable to load gateways");</div><div>Exit; &nbsp;}</div><div><br></div><span class="Apple-style-span" style="-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); "><div>{ if(! next_gateway()) {</div><div>sl_send_reply("503", "unable to find gateways");</div><div>Exit; &nbsp;}</div></span><div>&nbsp;Route(1);</div><div>....</div><div><br></div><div>Now, my target is to register also the A-party x-lite to 3CX where I added a rule in 3CX to forward the call comming to kamailio to take the route desicion and act.</div><div><br></div><div>So, here I need to know how can I tell kamailio to accept the call from 3CX? this is what I meant by configuring 3CX on kamailio.</div><div><br></div><div>I have weakness in the routing logic configuration, could you please help in this too! What is the required replacement on the above to be done?</div><div><br></div><div>Moreover, I appreciate if you provide with docs or tutorials that can help me understand more kamailio's routing logic functions!</div><div><br></div><div>Much appreciated.</div><div><br></div><div>Thanks in advance.</div><div><br></div><div>F Chahrour</div><div><br></div><div>Sent from iPhone</div><div><br>On Aug 29, 2012, at 9:21 PM, Daniel-Constantin Mierla &lt;<a href="mailto:miconda@gmail.com"><a href="mailto:miconda@gmail.com">miconda@gmail.com</a></a>&gt; wrote:<br><br></div><div></div><blockquote type="cite"><div>
    Hello,<br>
    <br>
    <div class="moz-cite-prefix">On 8/29/12 3:31 PM, Fatima
      Chahrour~Vanrise Support wrote:<br>
    </div>
    <blockquote cite="mid:04ee01cd85ea$8af4e880$a0deb980$@com" type="cite">
      
      
      <style><!--
/* Font Definitions */
@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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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]-->
      <div class="WordSection1">
        <p class="MsoNormal">Dears,<o:p></o:p></p>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <p class="MsoNormal">I have an installed 3CX where I want to
          generate a call from it to the Kamailo to get a list of
          suppliers to terminate the call to.<o:p></o:p></p>
        <p class="MsoNormal">Thus, the Kamailio should act as a sip
          redirect to the 3CX (for routing decision).<o:p></o:p></p>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <p class="MsoNormal">Have you tried such configuration before?
          And how do I configure the 3CX on the Kamailio?<o:p></o:p></p>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
      </div>
    </blockquote>
    I don't understand what you expect from 'configure the 3CX on the
    Kamailio', can you add more details ?<br>
    <br>
    For sending a redirect, practically you have to update request uri
    and then send the 3xx reply, like:<br>
    <br>
    $ru = <a class="moz-txt-link-rfc2396E" href="sip:newnumber@newdomain.com">"sip:newnumber@newdomain.com"</a>;<br>
    send_reply("302", "Redirected";<br>
    <br>
    If you need to put more contacts in the redirect reply, then add:<br>
    <br>
    km_append_branch("uri");<br>
    <br>
    uri parameter can contain variables.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <blockquote cite="mid:04ee01cd85ea$8af4e880$a0deb980$@com" type="cite">
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla - <a class="moz-txt-link-freetext" href="http://www.asipto.com"></a><a href="http://www.asipto.com"><a href="http://www.asipto.com">http://www.asipto.com</a></a>
<a class="moz-txt-link-freetext" href="http://twitter.com/#!/miconda"></a><a href="http://twitter.com/#!/miconda"><a href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a></a> - <a class="moz-txt-link-freetext" href="http://www.linkedin.com/in/miconda"></a><a href="http://www.linkedin.com/in/miconda"><a href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a></a>
Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - <a class="moz-txt-link-freetext" href="http://asipto.com/u/kat"></a><a href="http://asipto.com/u/kat"><a href="http://asipto.com/u/kat">http://asipto.com/u/kat</a></a></pre>
  

</div></blockquote></div><div></div></body></html>