<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=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;}
@font-face
        {font-family:"Segoe UI Emoji";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
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="FR" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">I ended up using dialplan module with a new partition dedicated to CLID.<br>
<br>
<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="mso-fareast-language:FR">De :</span></b><span style="mso-fareast-language:FR"> Users <users-bounces@lists.opensips.org>
<b>De la part de</b> Wadii ELMAJDI | Evenmedia<br>
<b>Envoyé :</b> lundi 19 décembre 2022 15:44<br>
<b>À :</b> OpenSIPS users mailling list <users@lists.opensips.org><br>
<b>Objet :</b> [OpenSIPS-Users] REPLICATION / SQL_CACHER / Local CacheDB Collection<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">Hello ,<br>
<br>
I am trying to cache an entire MySQL table containing CLIDs/Clients Mapping.<br>
My use case is to check pre every call , if the $fU used belongs to the client (via its ip source).<br>
I am using SQL CACHER (ondemand = 0) mode module, my opensips box is clustered.<br>
the cached_url for SQL_CACHER is a local collection (cachedb_url=local:///clid)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">I am getting an error that I cannot use an opensips replicatedcache db :
<br>
<br>
<br>
</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Dec 19 15:31:18 primary /usr/sbin/opensips[41751]: ERROR:sql_cacher:db_init_test_conn: Cannot use an OpenSIPS replicated cached<br>
Dec 19 15:31:18 primary /usr/sbin/opensips[41751]: ERROR:sql_cacher:mod_init: Failed to validate db conns for cache entry</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Dec 19 15:31:18 primary /usr/sbin/opensips[41751]: ERROR:core:init_mod: failed to initialize module sql_cacher</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">Dec 19 15:31:18 primary /usr/sbin/opensips[41751]: ERROR:core:main: error while initializing modules<br>
<br>
I can use cachedb_local module elsewhere, all cached data is replicated via the cluster with no problem. I don’t see why it causes such problem only when using SQLCACHER.<br>
<br>
Is there anyway to exclude one specific collection from the replication mode ?  is there any better approach for my use case ?<br>
<br>
I know I can use REDIS or MongoDB for such use case, but I’m trying to lower the numbers of servers to monitor
</span><span lang="EN-US" style="font-family:"Segoe UI Emoji",sans-serif">😊</span><span lang="EN-US"><br>
<br>
<br>
Thank you<br>
<br>
<br>
<br>
<br>
</span><o:p></o:p></p>
</div>
</body>
</html>