<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=utf-8"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Times New Roman \, serif";}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
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;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
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";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle24
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle25
        {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]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><div><p class=MsoNormal><span style='color:#1F497D'>Hi Daniel,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p></div><p class=MsoNormal><span style='color:#1F497D'>The call is not redirected to 1<sup>st</sup> kamailio, below is the call trace where 2<sup>nd</sup>  kamailio(192.168.111.139) send request to 192.168.111.15 which is the gateway in the lcr rule instead of sending this invite to 192.168.111.138.</span><span style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal style='margin-left:1.0in'><span style='color:#1F497D'>U 192.168.111.139:5060 -&gt; 192.168.111.15:5060 </span><span style='color:red'>(shouldn’t this be 192.168.111.138:5060 instead??)<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in'><span style='color:#1F497D'>INVITE sip:22#96135050@192.168.111.15 SIP/2.0.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in'><span style='color:#1F497D'>Record-Route: &lt;sip:192.168.111.139;lr=on&gt;.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in'><span style='color:#1F497D'>Record-Route: &lt;sip:192.168.111.138;lr=on&gt;.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in'><span style='color:#1F497D'>Via: SIP/2.0/UDP 192.168.111.139;branch=z9hG4bK5757.5b3b1975.0.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in'><span style='color:#1F497D'>Via: SIP/2.0/UDP 192.168.111.138;branch=z9hG4bK5757.50ff9264.0.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in'><span style='color:#1F497D'>Via: SIP/2.0/UDP 192.168.52.139:12650;received=192.168.111.11;branch=z9hG4bK-d8754z-85008205ba3ea607-1---d8754z-;rport=12650.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in'><span style='color:#1F497D'>Max-Forwards: 68.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in'><span style='color:#1F497D'>Contact: &lt;sip:106@192.168.111.11:12650&gt;.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in'><span style='color:#1F497D'>To: &quot;96135050&quot;&lt;sip:96135050@192.168.111.138&gt;.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in'><span style='color:#1F497D'>From: &quot;106&quot;&lt;sip:106@192.168.111.138&gt;;tag=56645478.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in'><span style='color:#1F497D'>Call-ID: ZjJlYWYzZmJmYmJlMGE0MmYxYWUwYjYwZmY5MmJkMjg..<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in'><span style='color:#1F497D'>CSeq: 1 INVITE.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in'><span style='color:#1F497D'>Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in'><span style='color:#1F497D'>Content-Type: application/sdp.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in'><span style='color:#1F497D'>User-Agent: X-Lite release 1100l stamp 47546.<o:p></o:p></span></p><p class=MsoNormal style='margin-left:1.0in'><span style='color:#1F497D'>Content-Length: 477.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>This is my Kamailio routing logic configured on the 1st Kamailio to forward any call from 1<sup>st</sup> kamialio to 2<sup>nd</sup> kamailio:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>if (is_method(&quot;INVITE&quot;))<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>{<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Sethostport(“192.168.111.139:5060”);<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Append_branch();<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>}<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>My problem is here</span><span style='font-family:Wingdings;color:#1F497D'>à</span><span style='color:#1F497D'> This is my Kamailio routing configured on 2<sup>nd</sup> kamailio which I want from it to send back the call, with lcr_gateway already defined, to 1<sup>st</sup> Kamailio:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>if (is_method(&quot;INVITE&quot;))<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>                {<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>                  if (!load_gws(&quot;1&quot;)) {<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>                  sl_send_reply(&quot;503&quot;, &quot;Unable to load gateways&quot;);<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>                  exit;<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>                                                   }<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>                  if(!next_gw()){<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>                  sl_send_reply(&quot;503&quot;, &quot;Unable to find a gateway&quot;);<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>                  exit;}<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>                                <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>                  route(1);<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>                  $ru=&quot;sip:.*@192.168.111.138&quot;;<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>                  send_reply(&quot;302&quot;,&quot;rEdIrEcTeD&quot;);<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>                   km_append_branch(&quot;uri&quot;);<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>}<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Am looking through many documents but can’t achieve my target, I want the 2<sup>nd</sup> Kamailio, which has LCR configured on it, to send back to 1<sup>st</sup> Kamailio the gateway from lcr_gateways with 302 redirect message.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>My questions are:<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>How to achieve this? <o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Do you suggest any document that help?<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Do I need to load any specific module?<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Thanks,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>F Chahrour<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> Daniel-Constantin Mierla [mailto:miconda@gmail.com] <br><b>Sent:</b> Wednesday, September 05, 2012 9:38 AM<br><b>To:</b> Fatima Chahrour~Vanrise Support<br><b>Cc:</b> 'SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List'<br><b>Subject:</b> Re: [SR-Users] FW: Kamailio as sipRedirect<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>Hello,<br>You set r-uri ($ru) to an IP address only -- it has to be a full SIP URI.<br><br>Cheers,<br>Daniel<o:p></o:p></p><div><p class=MsoNormal>On 9/4/12 5:34 PM, Fatima Chahrour~Vanrise Support wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='color:#1F497D'>Hello,</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>Thanks for your reply.. am able to make the call reach from 3CX to Kamailio using the src_ip, thank you, but still not able to redirect the call invite from Kamailio to 3CX and send the 302 message.</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><div><p class=MsoNormal><span style='color:#1F497D'>Kamailio instead of 3CX</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>192.168.111.138</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p></div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><br><br><br><br><br><img width=212 height=77 id="_x0000_i1040" src="cid:image001.png@01CD8B87.B8C8B6E0"><o:p></o:p></span></p><div><p class=MsoNormal><span style='color:#1F497D'>Kamailio</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>192.168.111.139</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p></div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><br></span><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#1F497D'>&nbsp;</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal><img width=44 height=12 id="_x0000_i1041" src="cid:image002.png@01CD8B87.B8C8B6E0"><img width=44 height=12 id="_x0000_i1042" src="cid:image003.png@01CD8B87.B8C8B6E0"><span style='color:#1F497D'>Phone A &nbsp;(192.168.111.11)</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><div><p class=MsoNormal style='margin-left:312.0pt'><span style='font-size:9.0pt;color:#1F497D'>302</span><o:p></o:p></p></div><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif";color:#1F497D'>Phone B (192.168.111.10)</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>Herby what am putting in my routing:</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal>If (is_method(&quot;INVITE&quot;))<o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal>{ if(!load_gateway(&quot;1&quot;)) {<o:p></o:p></p><p class=MsoNormal>sl_send_reply(&quot;503&quot;, &quot;unable to load gateways&quot;);<o:p></o:p></p><p class=MsoNormal>Exit; &nbsp;}<o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal>{ if(! next_gateway()) {<o:p></o:p></p><p class=MsoNormal>sl_send_reply(&quot;503&quot;, &quot;unable to find gateways&quot;);<o:p></o:p></p><p class=MsoNormal>Exit; &nbsp;}<o:p></o:p></p><p class=MsoNormal>Route(1);<o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman , serif","serif"'>$ru = <a href="%22sip:.*@192.168.111.138%22">&quot;192.168.111.138&quot;</a>;<br>send_reply(&quot;302&quot;, &quot;Redirected&quot;;</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman , serif","serif"'>Km_append_branch(“uri”);</span><o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman , serif","serif"'>Exit;<br><br><br></span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>What am I doing is wrong in the above script? And causing “call failed”! attached ‘test.txt’ the ngrep capture if needed.</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>Your help is highly appreciated.</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>&nbsp;</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>Kind Regards,</span><o:p></o:p></p><p class=MsoNormal><span style='color:#1F497D'>F Chahrour</span><o:p></o:p></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> <a href="mailto:sr-users-bounces@lists.sip-router.org">sr-users-bounces@lists.sip-router.org</a> [<a href="mailto:sr-users-bounces@lists.sip-router.org">mailto:sr-users-bounces@lists.sip-router.org</a>] <b>On Behalf Of </b>Daniel-Constantin Mierla<br><b>Sent:</b> Thursday, August 30, 2012 10:56 AM<br><b>To:</b> Fatima Chahrour<br><b>Cc:</b> SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) - Users Mailing List<br><b>Subject:</b> Re: [SR-Users] FW: Kamailio as sipRedirect</span><o:p></o:p></p></div></div><p class=MsoNormal>&nbsp;<o:p></o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>Hello,<br><br>if you know the IP address of 3CX, then you can skip authentication for that, like:<br><br>if(src_ip==__3cx_ip__) {<br>&nbsp; # don't do authentication for the traffic coming here<br><br>}<br><br>You can use permission module to store the a list of ip addresses and then use functions from that module to match against source ip of requests, as alternative to above, providing more flexibility when dealing with lot of trusted ip addresses.<br><br>Cheers,<br>Daniel<o:p></o:p></p><div><p class=MsoNormal>On 8/29/12 9:15 PM, Fatima Chahrour wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><div><p class=MsoNormal>Hello Danial,<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>Hereby details:<o:p></o:p></p></div><div><p class=MsoNormal>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.<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>In kamailio.cfg routing logic I only used :<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>...<o:p></o:p></p></div><div><p class=MsoNormal>If (is_method(&quot;INVITE&quot;))<o:p></o:p></p></div><div><p class=MsoNormal>{ if(!load_gateway(&quot;1&quot;)) {<o:p></o:p></p></div><div><p class=MsoNormal>sl_send_reply(&quot;503&quot;, &quot;unable to load gateways&quot;);<o:p></o:p></p></div><div><p class=MsoNormal>Exit; &nbsp;}<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>{ if(! next_gateway()) {<o:p></o:p></p></div><div><p class=MsoNormal>sl_send_reply(&quot;503&quot;, &quot;unable to find gateways&quot;);<o:p></o:p></p></div><div><p class=MsoNormal>Exit; &nbsp;}<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;Route(1);<o:p></o:p></p></div><div><p class=MsoNormal>....<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>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.<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>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.<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>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?<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>Moreover, I appreciate if you provide with docs or tutorials that can help me understand more kamailio's routing logic functions!<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>Much appreciated.<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>Thanks in advance.<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>F Chahrour<o:p></o:p></p></div><div><p class=MsoNormal>&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal>Sent from iPhone<o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><br>On Aug 29, 2012, at 9:21 PM, Daniel-Constantin Mierla &lt;<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt; wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal style='margin-bottom:12.0pt'>Hello,<o:p></o:p></p><div><p class=MsoNormal>On 8/29/12 3:31 PM, Fatima Chahrour~Vanrise Support wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal>Dears,<o:p></o:p></p><p class=MsoNormal>&nbsp;<o:p></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>&nbsp;<o:p></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>&nbsp;<o:p></o:p></p></blockquote><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman , serif","serif"'>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 href="sip:newnumber@newdomain.com">&quot;sip:newnumber@newdomain.com&quot;</a>;<br>send_reply(&quot;302&quot;, &quot;Redirected&quot;;<br><br>If you need to put more contacts in the redirect reply, then add:<br><br>km_append_branch(&quot;uri&quot;);<br><br>uri parameter can contain variables.<br><br>Cheers,<br>Daniel<br><br><br></span><o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman , serif","serif"'><br><br><br></span><o:p></o:p></p><pre>-- <o:p></o:p></pre><pre>Daniel-Constantin Mierla - <a href="http://www.asipto.com">http://www.asipto.com</a><o:p></o:p></pre><pre><a href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a><o:p></o:p></pre><pre>Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - <a href="http://asipto.com/u/kat">http://asipto.com/u/kat</a><o:p></o:p></pre></div></blockquote></div></blockquote><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman , serif","serif"'><br><br><br></span><o:p></o:p></p><pre>-- <o:p></o:p></pre><pre>Daniel-Constantin Mierla - <a href="http://www.asipto.com">http://www.asipto.com</a><o:p></o:p></pre><pre><a href="http://twitter.com/#%21/miconda">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a><o:p></o:p></pre><pre>Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - <a href="http://asipto.com/u/kat">http://asipto.com/u/kat</a><o:p></o:p></pre></blockquote><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><br><br><o:p></o:p></span></p><pre>-- <o:p></o:p></pre><pre>Daniel-Constantin Mierla - <a href="http://www.asipto.com">http://www.asipto.com</a><o:p></o:p></pre><pre><a href="http://twitter.com/#!/miconda">http://twitter.com/#!/miconda</a> - <a href="http://www.linkedin.com/in/miconda">http://www.linkedin.com/in/miconda</a><o:p></o:p></pre><pre>Kamailio Advanced Training, Berlin, Nov 5-8, 2012 - <a href="http://asipto.com/u/kat">http://asipto.com/u/kat</a><o:p></o:p></pre></div></body></html>