<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=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 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;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</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=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal>I need help setting up carrierroute using the rewrite prefix
and the strip function.&nbsp; It seem like every time I use the Rewrite Prfix
function the carrierroute module will rewrite the prefix, but then I don&#8217;t
get certain reply messages on kamailio. At least from what I can see on the
log. &nbsp;<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>&nbsp;INFO:carrierroute:cr_do_route: uri 5555550001 was
rewritten to sip:0115555550001@aslab.commx.net, carrier 1, domain 10<o:p></o:p></p>

<p class=MsoNormal>&nbsp;INFO:carrierroute:rewrite_uri_recursor: URI or prefix
tree nodes empty, empty rule list<o:p></o:p></p>

<p class=MsoNormal>&nbsp;INFO:carrierroute:cr_do_route: rewrite_uri_recursor
doesn't complete, uri 0115555550001, carrier 1, domain 10<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Is this normal behavior?&nbsp; I also noticed that some
messages coming back from the host are not being processed by kamailio. For
example on this particular call I purposely &nbsp;get a 604 from the server.
The thing is I can&#8217;t process a failure route for this message, because
kamailio doesn&#8217;t see is, even though it is being sent back to the server.&nbsp;
<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Also when I use the Strip function is looks like
carrierroute does a second lookup on the route table. In the example below I am
calling a number using the prefix 551&#8230; The route table is below.&nbsp; <o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>+----+---------+--------+--------------+-------+------+------+-------+-----------------+----------------+----------------+------------------------+<o:p></o:p></p>

<p class=MsoNormal>| id | carrier | domain | scan_prefix&nbsp; | flags | mask |
prob | strip | rewrite_host&nbsp;&nbsp;&nbsp; | rewrite_prefix | rewrite_suffix
| description&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|<o:p></o:p></p>

<p class=MsoNormal>+----+---------+--------+--------------+-------+------+------+-------+-----------------+----------------+----------------+------------------------+<o:p></o:p></p>

<p class=MsoNormal>| 30 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |
551&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|&nbsp;&nbsp;&nbsp;&nbsp; 0 |&nbsp;&nbsp;&nbsp; 0 |&nbsp;&nbsp;&nbsp; 1
|&nbsp;&nbsp;&nbsp;&nbsp; 2 | 10.10.10.1&nbsp;&nbsp;&nbsp;
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;|
LD-1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <o:p></o:p></p>

<p class=MsoNormal>| 31 |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1 |
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|&nbsp;&nbsp;&nbsp;&nbsp; 0 |&nbsp;&nbsp;&nbsp; 0 |&nbsp;&nbsp;&nbsp; 1
|&nbsp;&nbsp;&nbsp;&nbsp; 0 | 10.10.10.1&nbsp;&nbsp;&nbsp;&nbsp;
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
| LD&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Log for that call <o:p></o:p></p>

<p class=MsoNormal>INFO:carrierroute:cr_do_route: uri 5515555550004 was
rewritten to sip:15555550004@10.10.10.1, carrier 1, domain 1<o:p></o:p></p>

<p class=MsoNormal>INFO:carrierroute:cr_do_route: uri 15555550004 was rewritten
to sip:15555550004@10.10.10.1, carrier 1, domain 1<o:p></o:p></p>

<p class=MsoNormal>&nbsp;Carrier found!! (&quot;1&quot;,
&quot;131.226.0.144&quot;, &quot;15555550004&quot;, &quot;15555550004&quot;,
&quot;COMMX-LD&quot;);<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Now please note that if I remove route id 31 then the call log
looks like it is below:<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>&nbsp;INFO:carrierroute:cr_do_route: uri 5515555550004 was
rewritten to sip:15555550004@10.10.10.1, carrier 1, domain 1<o:p></o:p></p>

<p class=MsoNormal>&nbsp;INFO:carrierroute:rewrite_uri_recursor: URI or prefix
tree nodes empty, empty rule list<o:p></o:p></p>

<p class=MsoNormal>&nbsp;INFO:carrierroute:cr_do_route: rewrite_uri_recursor
doesn't complete, uri 15555550004, carrier 1, domain 1<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Please help!!!<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>Carlos<o:p></o:p></p>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>It will also help if there was&nbsp; complete routing
example using carrierroute v 1.5.0, since the one in the wiki is outdated.
Thanks.<o:p></o:p></p>

</div>

</body>

</html>