From kbushong@carnegietechnologies.com Wed Mar 29 20:49:04 2017 From: Kevin Bushong To: sr-users@lists.kamailio.org Subject: [SR-Users] Problems with avp_db_load Date: Wed, 29 Mar 2017 18:48:56 +0000 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1134249777==" --===============1134249777== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable I am using the avpops module to read from a mysql database to look for CFWD i= nformation for the call. When a call is placed, it appears the command avp_d= b_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. 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, th= at works perfectly. When moving the code to kamailio 4.4.4 on Debian 8, Jess= ie, mysql Ver 14.14 Distrib 5.5.53 the avp_db_load returns no information. Here is the snippet of the code we are using. Since I am not used to trouble= shooting kamailio, please let me know what other information you need. Thanks, Kevin Code snippet: #!ifdef WITH_CFWD xlog ("$TF Call to $rU made it into WITH_CFWD in route[LOCATION] bloc= k\n"); # Call forwarding is enabled, so lets do a lookup to pull all AVP's f= or possible call forwarding types/destinations # Below line should load all AVP's into memory from DB for the userna= me portion of the TO: field from table usr_preferences xlog("script should load from DB usr_preferences next"); avp_db_load("$tU","s/usr_preferences"); # This line i simple want to print to log when the avp load is comple= te and what the values are (for debug purposes only and should typically be c= ommented out) xlog("DB load should be complete"); xlog("SCRIPT: $TF Call Forwarding Unconditional set to $avp(Unconditi= onal)\n"); xlog("SCRIPT: $TF Call Forwarding NoAnswer set to $avp(NoAnswer)\n"); xlog("SCRIPT: $TF Call Forwarding Busy set to $avp(Busy)\n"); avp_print(); # Check to see if the AVP's are set and if so put them in log for log= ging purposes if(is_avp_set("$avp(Unconditional)")) xlog("SCRIPT: $TF Call Forwarding Unconditional set to $avp(Unconditi= onal)\n"); if(is_avp_set("$avp(NoAnswer)")) xlog("SCRIPT: $TF Call Forwarding NoAnswer set to $avp(NoAnswer)\n"); if(is_avp_set("$avp(Busy)")) xlog("SCRIPT: $TF Call Forwarding Busy set to $avp(Busy)\n"); t_set_fr(16000, 15000); # set fr invite timeout to 16s and no respons= e at all to 15s to meet the specs for call fowarding no answer ringtime # If Call fowarding Unconditional is set, we need to change the diale= d number and sent it off to the original users trunk from subscriber table # Check to see if unconditional is set if(is_avp_set("$avp(Unconditional)")) # Shove this call into route [PSTN_CFWD] Block route("PSTN_CFWD"); Here is the syslog for the same snippet: 09:29 2017 Call to 15703771055 made it into WITH_CFWD in route[LOCATION] block Mar 29 14:09:29 Limitless-Calling-Server /usr/local/sbin/kamailio[7831]: ERRO= R: