<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p>Hello,</p>
    <p>can you run with debug=3 in kamailio.cfg and send all the debug
      messages printed in syslog for this situation?</p>
    <p>Cheers,<br>
      Daniel<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 29.03.17 20:48, Kevin Bushong wrote:<br>
    </div>
    <blockquote
cite="mid:DM3PR20MB08415741A1619876EE426F55A4350@DM3PR20MB0841.namprd20.prod.outlook.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <meta name="Generator" content="Microsoft Word 15 (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;}
/* 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;
        font-family:"Calibri",sans-serif;}
@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">I am using the avpops module to read from a
          mysql database to look for CFWD information for the call.
           When a call is placed, it appears the command avp_db_load
          attempts to read the file but all values come back as NULL. 
          There are no messages in the log and of course the call does
          not process correctly.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">We are using a config that is exactly the
          same on a 4.3.4 version of kamailio using cento 6.7, with a
          local version of mysql  Ver 14.14 Distrib 5.1.73, that works
          perfectly.  When moving the code to kamailio 4.4.4 on Debian
          8, Jessie, mysql  Ver 14.14 Distrib 5.5.53 the avp_db_load
          returns no information.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Here is the snippet of the code we are
          using.  Since I am not used to troubleshooting kamailio,
          please let me know what other information you need.<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Thanks,<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Kevin<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Code snippet:<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">#!ifdef WITH_CFWD<o:p></o:p></p>
        <p class="MsoNormal">        xlog ("$TF Call to $rU made it into
          WITH_CFWD in route[LOCATION] block\n");<o:p></o:p></p>
        <p class="MsoNormal">        # Call forwarding is enabled, so
          lets do a lookup to pull all AVP's for possible call
          forwarding types/destinations<o:p></o:p></p>
        <p class="MsoNormal">        # Below line should load all AVP's
          into memory from DB for the username portion of the TO: field
          from table usr_preferences<o:p></o:p></p>
        <p class="MsoNormal">        xlog("script should load from DB
          usr_preferences next");<o:p></o:p></p>
        <p class="MsoNormal">       
          avp_db_load("$tU","s/usr_preferences");<o:p></o:p></p>
        <p class="MsoNormal">        # This line i simple want to print
          to log when the avp load is complete and what the values are
          (for debug purposes only and should typically be commented
          out)<o:p></o:p></p>
        <p class="MsoNormal">        xlog("DB load should be complete");<o:p></o:p></p>
        <p class="MsoNormal">        xlog("SCRIPT: $TF Call Forwarding
          Unconditional set to $avp(Unconditional)\n");<o:p></o:p></p>
        <p class="MsoNormal">        xlog("SCRIPT: $TF Call Forwarding
          NoAnswer set to $avp(NoAnswer)\n");<o:p></o:p></p>
        <p class="MsoNormal">        xlog("SCRIPT: $TF Call Forwarding
          Busy set to $avp(Busy)\n");<o:p></o:p></p>
        <p class="MsoNormal">        avp_print();<o:p></o:p></p>
        <p class="MsoNormal">        # Check to see if the AVP's are set
          and if so put them in log for logging purposes<o:p></o:p></p>
        <p class="MsoNormal">       
          if(is_avp_set("$avp(Unconditional)"))<o:p></o:p></p>
        <p class="MsoNormal">        xlog("SCRIPT: $TF Call Forwarding
          Unconditional set to $avp(Unconditional)\n");<o:p></o:p></p>
        <p class="MsoNormal">        if(is_avp_set("$avp(NoAnswer)"))<o:p></o:p></p>
        <p class="MsoNormal">        xlog("SCRIPT: $TF Call Forwarding
          NoAnswer set to $avp(NoAnswer)\n");<o:p></o:p></p>
        <p class="MsoNormal">        if(is_avp_set("$avp(Busy)"))<o:p></o:p></p>
        <p class="MsoNormal">        xlog("SCRIPT: $TF Call Forwarding
          Busy set to $avp(Busy)\n");<o:p></o:p></p>
        <p class="MsoNormal">        t_set_fr(16000, 15000); # set fr
          invite timeout to 16s and no response at all to 15s to meet
          the specs for call fowarding no answer ringtime<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">        # If Call fowarding Unconditional
          is set, we need to change the dialed number and sent it off to
          the original users trunk from subscriber table<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">        # Check to see if unconditional is
          set<o:p></o:p></p>
        <p class="MsoNormal">       
          if(is_avp_set("$avp(Unconditional)"))<o:p></o:p></p>
        <p class="MsoNormal">        # Shove this call into route
          [PSTN_CFWD] Block<o:p></o:p></p>
        <p class="MsoNormal">        route("PSTN_CFWD");<o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal">Here is the syslog for the same snippet:<o:p></o:p></p>
        <p class="MsoNormal">09:29 2017 Call to 15703771055 made it into
          WITH_CFWD in route[LOCATION] block<o:p></o:p></p>
        <p class="MsoNormal">Mar 29 14:09:29 Limitless-Calling-Server
          /usr/local/sbin/kamailio[7831]: ERROR: <script>: script
          should load from DB usr_preferences next<o:p></o:p></p>
        <p class="MsoNormal">Mar 29 14:09:29 Limitless-Calling-Server
          /usr/local/sbin/kamailio[7831]: ERROR: <script>: DB load
          should be complete<o:p></o:p></p>
        <p class="MsoNormal">Mar 29 14:09:29 Limitless-Calling-Server
          /usr/local/sbin/kamailio[7831]: ERROR: <script>: SCRIPT:
          Wed Mar 29 14:09:29 2017 Call Forwarding Unconditional set to
          <null><o:p></o:p></p>
        <p class="MsoNormal">Mar 29 14:09:29 Limitless-Calling-Server
          /usr/local/sbin/kamailio[7831]: ERROR: <script>: SCRIPT:
          Wed Mar 29 14:09:29 2017 Call Forwarding NoAnswer set to
          <null><o:p></o:p></p>
        <p class="MsoNormal">Mar 29 14:09:29 Limitless-Calling-Server
          /usr/local/sbin/kamailio[7831]: ERROR: <script>: SCRIPT:
          Wed Mar 29 14:09:29 2017 Call Forwarding Busy set to
          <null><o:p></o:p></p>
        <p class="MsoNormal">Mar 29 14:09:29 Limitless-Calling-Server
          /usr/local/sbin/kamailio[7831]: INFO: avpops
          [avpops_impl.c:1473]: ops_print_avp(): p=0x7f440ed86f90,
          flags=0x0113<o:p></o:p></p>
        <p class="MsoNormal">Mar 29 14:09:29 Limitless-Calling-Server
          /usr/local/sbin/kamailio[7831]: INFO: avpops
          [avpops_impl.c:1477]: ops_print_avp():
          #011#011#011name=<direction><o:p></o:p></p>
        <p class="MsoNormal">Mar 29 14:09:29 Limitless-Calling-Server
          /usr/local/sbin/kamailio[7831]: INFO: avpops
          [avpops_impl.c:1485]: ops_print_avp():
          #011#011#011val_str=<INCOMING / 8><o:p></o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p class="MsoNormal"><o:p> </o:p></p>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a>
<a class="moz-txt-link-freetext" href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Daniel-Constantin Mierla
<a class="moz-txt-link-abbreviated" href="http://www.twitter.com/miconda">www.twitter.com/miconda</a> -- <a class="moz-txt-link-abbreviated" href="http://www.linkedin.com/in/miconda">www.linkedin.com/in/miconda</a>
Kamailio Advanced Training - May 22-24 (USA) - <a class="moz-txt-link-abbreviated" href="http://www.asipto.com">www.asipto.com</a>
Kamailio World Conference - May 8-10, 2017 - <a class="moz-txt-link-abbreviated" href="http://www.kamailioworld.com">www.kamailioworld.com</a></pre>
  </body>
</html>