<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello,<br>
    <br>
    finally I had the time to look at the documents you sent. The
    problem is that you have recursive execution of do_routing("0") from
    do_routing("0").<br>
    <br>
    This happens because you have route[4] like:<br>
    <br>
    route[4] {<br>
    &nbsp; if (!do_routing("0")) {<br>
    &nbsp;&nbsp;&nbsp; send_reply("503", "No Rules matching the URI");<br>
    &nbsp;&nbsp;&nbsp; exit;<br>
    &nbsp; }<br>
    }<br>
    <br>
    route[4] is executed from request_route. But then, in database
    dr_routes table, for the prefix 961 you are using for testing, the
    routeid value is 4, meaning that, when do_routing("0") is matching
    will execute the route[4] from the config. Which again is calling
    do_routing("0") that matches again and executes again route[4] and
    so on ...<br>
    <br>
    At some point the OS kills kamailio, resulting in a crash reported
    at random lines of code -- these were misleading so far, because at
    some of them was an impossible code fault crash condition.<br>
    <br>
    So, remove 4 from routeid column in the database dr_rules table.<br>
    <br>
    Cheers,<br>
    Daniel<br>
    <br>
    On 3/2/12 9:57 AM, Daniel-Constantin Mierla wrote:
    <blockquote cite="mid:4F508B6B.1050809@gmail.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      By the way, in the config you sent in the very first email, you do
      do_routing("0"), but I could not see rules with id 0. Can you add
      such rules or use the id from the rules? Just to see if this is
      related or not, it should not crash even if the id is missing.<br>
      <br>
      Daniel<br>
      <br>
      On 3/1/12 3:52 PM, Fatima Chahrour~Vanrise Support wrote:
      <blockquote cite="mid:05b401ccf7ba$e91ecf70$bb5c6e50$@com"
        type="cite">
        <meta http-equiv="Content-Type" content="text/html;
          charset=ISO-8859-1">
        <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:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","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:"Courier New";
        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.EmailStyle21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EmailStyle22
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle23
        {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">
          <div>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hello,<o:p></o:p></span></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Full

                version output is:<o:p></o:p></span></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">debian:/usr/local/etc/kamailio#

                /usr/local/sbin/kamailio -V<o:p></o:p></span></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">version:

                kamailio 3.2.2 (i386/linux) 5fc59c<o:p></o:p></span></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">flags:

                STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS,
                USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK,
                SHM_MEM, SHM_MMAP, PKG_MALLOC, DBG_QM_MALLOC, USE_FUTEX,
                FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE,
                USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST,
                HAVE_RESOLV_RES<o:p></o:p></span></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">ADAPTIVE_WAIT_LOOPS=1024,

                MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE
                1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB<o:p></o:p></span></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">poll

                method support: poll, epoll_lt, epoll_et, sigio_rt,
                select.<o:p></o:p></span></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">id:

                5fc59c <o:p></o:p></span></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">compiled

                on 06:46:26 Feb 28 2012 with gcc 4.3.2<o:p></o:p></span></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thanks

                in advance.<o:p></o:p></span></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">F.Chahrour<o:p></o:p></span></p>
          </div>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;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:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">
                  Daniel-Constantin Mierla [<a moz-do-not-send="true"
                    class="moz-txt-link-freetext"
                    href="mailto:miconda@gmail.com">mailto:miconda@gmail.com</a>]
                  <br>
                  <b>Sent:</b> Thursday, March 01, 2012 3:44 PM<br>
                  <b>To:</b> SIP Router - Kamailio (OpenSER) and SIP
                  Express Router (SER) - Users Mailing List<br>
                  <b>Cc:</b> Fatima Chahrour~Vanrise Support<br>
                  <b>Subject:</b> Re: [SR-Users] DRouting cause Kamailio
                  3.2 to stop<o:p></o:p></span></p>
            </div>
          </div>
          <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
          <p class="MsoNormal">Hello,<br>
            <br>
            can you send also the full version - -the output of
            '/usr/local/sbin/kamailio -V'<br>
            <br>
            Based on the backtrace, I could not match a valid line in
            the source code that could cause a crash.<br>
            <br>
            Also, you haven't sent the output of 'bt full' -- you sent
            only from 'bt', first part just limited number of printed
            line. Do 'bt full' in gdb and sent the output.<br>
            <br>
            Cheers,<br>
            Daniel<br>
            <br>
            On 3/1/12 11:02 AM, Fatima Chahrour~Vanrise Support wrote: <o:p></o:p></p>
          <div>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hi

                Daniel,</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Please

                find output attached.</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Waiting

                your feedback.</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thanks,</span><o:p></o:p></p>
            <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">F.Chahrour</span><o:p></o:p></p>
          </div>
          <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:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">
                  Daniel-Constantin Mierla [<a moz-do-not-send="true"
                    href="mailto:miconda@gmail.com">mailto:miconda@gmail.com</a>]
                  <br>
                  <b>Sent:</b> Thursday, March 01, 2012 11:34 AM<br>
                  <b>To:</b> SIP Router - Kamailio (OpenSER) and SIP
                  Express Router (SER) - Users Mailing List<br>
                  <b>Cc:</b> Fatima Chahrour~Vanrise Support<br>
                  <b>Subject:</b> Re: [SR-Users] DRouting cause Kamailio
                  3.2 to stop</span><o:p></o:p></p>
            </div>
          </div>
          <p class="MsoNormal">&nbsp;<o:p></o:p></p>
          <p class="MsoNormal">Hello,<br>
            <br>
            that's the core file, do:<br>
            <br>
            gdb /usr/local/sbin/kamailio /core<br>
            <br>
            The send out the output from the gdb commands:<br>
            <br>
            bt<br>
            bt full<br>
            <br>
            Cheers,<br>
            Daniel<br>
            <br>
            On 3/1/12 10:03 AM, Fatima Chahrour~Vanrise Support wrote: <o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Dear

              Daniel,</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thanks

              for your reply..</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">I&#8217;d

              like to ask you too if my script in my first post that am
              using in the routing area is correct?</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">I
              found file named core in the &#8216;/&#8217; location as you
              mentioned. </span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">When

              I open it using #cat core, the opened file go crazy and
              writes strange characters and it ending with the below:</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">/usr/local/sbin/kamailio-P/var/run/kamailio.pid-f/usr/local/etc/kamailio//kamailio.cfgSSH_AGENT_PID=3234GPG_AGENT_INFO=/tmp/seahorse-jKaZEU/S.gpg-agent:3246:1TERM=xtermDESKTOP_STARTUP_ID=SHELL=/bin/bashGTK_RC_FILES=/etc/gtk/gtkrc:/home/vanrise/.gtkrc-1.2-gnome2WINDOWID=33580848USER=rootGNOME_KEYRING_SOCKET=/tmp/keyring-ZKxFck/socketSSH_AUTH_SOCK=/tmp/keyring-ZKxFck/sshUSERNAME=vanriseSESSION_MANAGER=local/debian:/tmp/.ICE-unix/3188MAIL=/var/mail/rootPATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/DESKTOP_SESSION=defaultGDM_XSERVER_LOCATION=localPWD=/usr/local/etc/kamailioLANG=en_US.UTF-8GDM_LANG=en_US.UTF-8GDMSESSION=defaultSHLVL=4HOME=/rootGNOME_DESKTOP_SESSION_ID=DefaultLOGNAME=rootDBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-sH8atcWdX4,guid=f0dcba443f8fd1d5267161364f4dd99dXDG_DATA_DIRS=/usr/local/share/:/usr/share/:/usrdebian:/#

              62;9;c62;9</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Sorry,

              I&#8217;ve just realized an info that I should mention and would
              be helpful, am running this Kamailio on a debian Lenny
              VMware as a trial before migrating it to its server.</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Thank

              you,</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">F.Chahrour</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
          <p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;color:windowtext">
              Daniel-Constantin Mierla <a moz-do-not-send="true"
                href="mailto:[mailto:miconda@gmail.com]">[mailto:miconda@gmail.com]</a>
              <br>
              <b>Sent:</b> Thursday, March 01, 2012 10:15 AM<br>
              <b>To:</b> SIP Router - Kamailio (OpenSER) and SIP Express
              Router (SER) - Users Mailing List<br>
              <b>Cc:</b> Fatima Chahrour~Vanrise Support; <a
                moz-do-not-send="true"
                href="mailto:sr-users-bounces@lists.sip-router.org">sr-users-bounces@lists.sip-router.org</a><br>
              <b>Subject:</b> Re: [SR-Users] DRouting cause Kamailio 3.2
              to stop</span><o:p></o:p></p>
          <p class="MsoNormal">&nbsp;<o:p></o:p></p>
          <p class="MsoNormal">Hello,<br>
            <br>
            have you found the core file in /var/log/? It is a strange
            location unless you started with -w /var/log. The core file
            is named usually 'core' or core.pid (replace pid with same
            number, like, 'core.1234'). The default location in in '/'
            unless there is a different location set via -w or enforced
            by operating system (e.g., mac os x puts it in
            '/corefiles').<br>
            <br>
            Hope it helps to locate the core file and send the
            backtrace.<br>
            <br>
            Cheers,<br>
            Daniel<br>
            <br>
            On 3/1/12 9:05 AM, Fatima Chahrour~Vanrise Support wrote: <o:p></o:p></p>
          <pre><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">I also tried :</span> <span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">#gdb /usr/local/sbin/kamailio &nbsp;/var/log/core.file</span><o:p></o:p></pre>
          <pre><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; (gdb) bt</span><o:p></o:p></pre>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">And

              got No Stack..</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">BR,</span><o:p></o:p></p>
          <p class="MsoNormal"><span
style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">F.Chahrour</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="color:#1F497D">&nbsp;</span><o:p></o:p></p>
          <p class="MsoNormal">&nbsp; </p>
        </div>
      </blockquote>
      <br>
      <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla -- <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.asipto.com">http://www.asipto.com</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://linkedin.com/in/miconda">http://linkedin.com/in/miconda</a> -- <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://twitter.com/miconda">http://twitter.com/miconda</a></pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
Kamailio Advanced Training, April 23-26, 2012, Berlin, Germany
<a class="moz-txt-link-freetext" href="http://www.asipto.com/index.php/kamailio-advanced-training/">http://www.asipto.com/index.php/kamailio-advanced-training/</a></pre>
  </body>
</html>