<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 14 (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;
        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]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi there,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I need some help here to understand why  the query in <span style="font-family:"Times New Roman","serif"">
[usrloc_db.c:1084] </span>is empty. This causes the linking of contact to IMPU to fail.<o:p></o:p></p>
<p class="MsoNormal">I’m using Kamailio 5.0.4.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [impurecord.c:1284]: unref_subscription_unsafe(): un-reffing subscription [rafi@mnc001.mcc001.3gppnetwork.org] - was [3]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_registrar_scscf [save.c:519]: update_contacts_helper(): updating the contacts for IMPU <sip:rafi@mnc001.mcc001.3gppnetwork.org><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_registrar_scscf [save.c:137]: calc_contact_expires(): Calculated expires for contact is 600000<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_registrar_scscf [save.c:548]: update_contacts_helper(): Need to update contact: <sip:rafi@192.168.10.48:57230;transport=udp>: q_value [-1],sos: [0],expires [600000]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_registrar_scscf [save.c:550]: update_contacts_helper(): packing contact information<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_registrar_scscf [save.c:556]: update_contacts_helper(): adding/updating contact based on prior existence<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [impurecord.c:748]: get_scontact(): looking for contact [sip:rafi@192.168.10.48:57230;transport=udp] in slot 300<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_registrar_scscf [save.c:562]: update_contacts_helper(): inserting new contact<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [impurecord.c:562]: insert_scontact(): INSERTing ucontact in usrloc module<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [ucontact.c:118]: new_ucontact(): Checking param [+g.3gpp.cs-voice]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [ucontact.c:118]: new_ucontact(): Checking param [+g.3gpp.icsi-ref]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [ucontact.c:118]: new_ucontact(): Checking param [audio]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [ucontact.c:118]: new_ucontact(): Checking param [+g.oma.sip-im.large-message]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [ucontact.c:118]: new_ucontact(): Checking param [+g.3gpp.smsip]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [ucontact.c:118]: new_ucontact(): Checking param [language]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [ucontact.c:118]: new_ucontact(): Checking param [+g.oma.sip-im]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [ucontact.c:118]: new_ucontact(): Checking param [expires]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [ucontact.c:173]: new_ucontact(): generating hash based on [sip:rafi@192.168.10.48:57230;transport=udp]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [impurecord.c:280]: mem_insert_scontact(): Created new contact in memory with AOR: [sip:rafi@192.168.10.48:57230;transport=udp] and hash [300]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [usrloc_db.c:289]: db_insert_ucontact(): DB: inserting ucontact [sip:rafi@192.168.10.48:57230;transport=udp]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [usrloc_db.c:311]: db_insert_ucontact(): Converted params to string to insert into db: [+g.3gpp.cs-voice;+g.3gpp.icsi-ref=urn%3Aurn-7%3A3gpp-application.ims.iari.gsma-vs;audio;+g.oma.sip-im.large-message;+g.3gpp.smsip;language=en,fr;+g.oma.sip-im;expires=600000]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [udomain.c:843]: ref_contact_unsafe(): incrementing ref count on contact [sip:rafi@192.168.10.48:57230;transport=udp], was 1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [impurecord.c:1225]: link_contact_to_impu(): number of contacts for IMPU [sip:rafi@mnc001.mcc001.3gppnetwork.org] is 1<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [usrloc_db.c:1065]: db_link_contact_to_impu(): DB: linking contact to IMPU<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [usrloc_db.c:1084]: db_link_contact_to_impu(): QUERY IS [] and len is 0<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) ERROR: db_mysql [km_dbase.c:128]: db_mysql_submit_query(): driver error on query: Query was empty (1065)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) ERROR: <core> [db_query.c:181]: db_do_raw_query(): error while submitting query<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) ERROR: ims_usrloc_scscf [usrloc_db.c:1086]: db_link_contact_to_impu(): Unable to link impu-contact in DB - impu [sip:rafi@mnc001.mcc001.3gppnetwork.org], contact [sip:rafi@192.168.10.48:57230;transport=udp]<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) ERROR: ims_usrloc_scscf [impurecord.c:1227]: link_contact_to_impu(): Failed to update DB linking contact [sip:rafi@192.168.10.48:57230;transport=udp] to IMPU [sip:rafi@mnc001.mcc001.3gppnetwork.org]...continuing
 but db will be out of sync!<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:"Times New Roman","serif"">10(13882) DEBUG: ims_usrloc_scscf [udomain.c:852]: unref_contact_unsafe(): decrementing ref count on contact [sip:rafi@192.168.10.48:57230;transport=udp], was 2<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best Regards,<o:p></o:p></p>
<p class="MsoNormal">Rafael A.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>