<p></p>
<p>Hi,</p>
<p>There is one more issue. ims_usrloc_pcscf's  db_insert_pcontact function is not able to write protocol value into database.</p>
<p><a href="https://github.com/kamailio/kamailio/blob/c3629f877500373028d2c7cdefd976cddda31c15/src/modules/ims_usrloc_pcscf/usrloc_db.c#L243">https://github.com/kamailio/kamailio/blob/c3629f877500373028d2c7cdefd976cddda31c15/src/modules/ims_usrloc_pcscf/usrloc_db.c#L243</a></p>
<p>In db_insert_pcontact function, Value array's length is 16, but while inserting, this value is given as 15. So contact's protocol value which is the last item of the array is not being written to the database.</p>
<pre><code>int db_insert_pcontact(struct pcontact* _c)
{
....
        db_key_t keys[16] = {
                                &domain_col,
                                &aor_col,
                                &received_col,
                                &received_port_col, &received_proto_col,
                                &path_col,          &rinstance_col,
                                &rx_session_id_col, &reg_state_col,
                                &expires_col,               &service_routes_col,
                                &socket_col,                &public_ids_col, &host_col, &port_col, &protocol_col
        };
        db_val_t values[16];
...
...
        if (ul_dbf.insert(ul_dbh, keys, values, 15) < 0) {
                LM_ERR("inserting contact in db failed\n");
                return -1;
        }

        return 0;
}
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2871#issuecomment-936220889">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZLJ7YM3W5CFBLHYVWLUFREB3ANCNFSM5FN5ZSFA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/ABO7UZO3MHAJUVIBZFTMQ63UFREB3A5CNFSM5FN5ZSFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOG7GZRWI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2871#issuecomment-936220889",
"url": "https://github.com/kamailio/kamailio/issues/2871#issuecomment-936220889",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>