<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=koi8-r">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<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:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Courier New";
        color:#1F497D;
        font-weight:normal;
        font-style:normal;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:2.0cm 42.5pt 2.0cm 3.0cm;}
div.Section1
        {page:Section1;}
/* List Definitions */
@list l0
        {mso-list-id:1253398354;
        mso-list-template-ids:1048894818;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</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=RU link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Courier New";
color:#1F497D'>“sip show peer” šafter success registration (with record
route() using )?<o:p></o:p></span></p>
<p class=MsoNormal><span lang=EN-US style='font-size:11.0pt;font-family:"Courier New";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] <b>On
Behalf Of </b>toqeer ali<br>
<b>Sent:</b> Thursday, November 12, 2009 10:33 AM<br>
<b>To:</b> users@lists.kamailio.org<br>
<b>Subject:</b> [Kamailio-Users] record-route<o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<div>
<p class=MsoNormal>Let me describe my scenario:<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>SipUser1 -------register request------------> kamailio
(SIP Proxy) ------- forwarded register request-----------> Asterisk<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<ol start=1 type=1>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo1'>In the above scenario, when I register to
Asterisk through Kamailio, it works fine when I give the
"record-route()" function in the cfg file. Further, using this,
I can also call to another extension 602 which is also registered to
Asterisk but 602 cannot call to 601 which is registered via kamailio.<o:p></o:p></li>
<li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
mso-list:l0 level1 lfo1'>However, If I remove the
"record-route()" function without unregistering 601 and
restarting the server, 602 can call to 601 . <o:p></o:p></li>
</ol>
</div>
<div>
<p class=MsoNormal>route {<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> if
($fU=="601"&&is_method("INVITE"))<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> record_route();<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> rewritehost("10.0.10.111"); //asterisk
host<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> route(1);<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>}<o:p></o:p></p>
</div>
<div>
<div>
<p class=MsoNormal>route[1] {<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> # send it out now; use
stateful forwarding as it works reliably<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> # even for UDP2TCP<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> if (!t_relay()) {<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>
sl_reply_error();<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> };<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal> exit;<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>}<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>should i add anything in script further...<o:p></o:p></p>
</div>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>-- <br>
Toqeer Ali Syed<br>
<br>
Red Hat Certified Engineer<br>
mob: +92 321 9059916<o:p></o:p></p>
</div>
</div>
</body>
</html>