<h3>Description</h3>
<p>I have kamailio.cfg file for configuration and Lua files for processing messages. What I observed is PHONUM module is not initialized during startup. And when using phonenum module it fails. I am invoking phonenum module in lua with "KSR.phonenum.match". This is in continuation to issue <a href="https://github.com/kamailio/kamailio/issues/1883" data-hovercard-type="issue" data-hovercard-url="/kamailio/kamailio/issues/1883/hovercard">1883</a>, which i cannot reopen.Please check this and let me know any further logs required.</p>
<h3>Troubleshooting</h3>
<h4>Reproduction</h4>
<ol>
<li>cfg file only have configuration</li>
<li>Invoke phonemun module through KEMI "KSR.phonenum.match" in other file</li>
<li>Test to validate phonenum</li>
</ol>
<h4>Debugging Data</h4>
<pre><code>(paste your debugging data here)
</code></pre>
<h4>Log Messages</h4>
<pre><code>Aug 29 08:33:27 ip-10-130-74-105 /usr/local/sbin/kamailio[2157]: DEBUG: app_lua [app_lua_sr.c:1655]: sr_kemi_lua_exec_func_ex(): param[0] for: isflagset is int: 1
Aug 29 08:33:27 ip-10-130-74-105 /usr/local/sbin/kamailio[2157]: DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[0] for: match is str: +919876543210
Aug 29 08:33:27 ip-10-130-74-105 /usr/local/sbin/kamailio[2157]: DEBUG: app_lua [app_lua_sr.c:1651]: sr_kemi_lua_exec_func_ex(): param[1] for: match is str: src
Aug 29 08:33:27 ip-10-130-74-105 /usr/local/sbin/kamailio[2157]: DEBUG: phonenum [phonenum_pv.c:312]: phonenum_update_pv(): container not found: +919876543210
Aug 29 08:33:27 ip-10-130-74-105 /usr/local/sbin/kamailio[2157]: DEBUG: app_lua [app_lua_sr.c:934]: lua_sr_pv_get_val(): pv get: $rc
Aug 29 08:33:27 ip-10-130-74-105 /usr/local/sbin/kamailio[2157]: DEBUG: [core/pvapi.c:371]: pv_cache_add(): pvar [$rc] added in cache
Aug 29 08:33:27 ip-10-130-74-105 /usr/local/sbin/kamailio[2157]: DEBUG: app_lua [app_lua_sr.c:934]: lua_sr_pv_get_val(): pv get: $phn(src=>valid)
Aug 29 08:33:27 ip-10-130-74-105 /usr/local/sbin/kamailio[2157]: DEBUG: phonenum [phonenum_pv.c:162]: pv_parse_phonenum_name(): phonenum [src] - key [valid]
</code></pre>
<h4>SIP Traffic</h4>
<pre><code>(paste your sip traffic here)
</code></pre>
<h3>Possible Solutions</h3>
<p>In kamailio.cfg if I add some dummy route(as below) then Phonenum module is initialized and it is working as expected.<br>
route[PHONENUM] {<br>
if($phn(src=>valid)==1) {<br>
xlog("dummy route\n");<br>
}<br>
}</p>
<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>(paste your output here)
</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<pre><code>(paste your output here)
</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/2052?email_source=notifications&email_token=ABO7UZLKTE2LDMTWYAUSC4LQHTIK3A5CNFSM4IS3FYX2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HIXPEXQ">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZN64X6KF6ACYCMGBKLQHTIK3ANCNFSM4IS3FYXQ">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABO7UZLALMKQU3Y4LSSHGXTQHTIK3A5CNFSM4IS3FYX2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HIXPEXQ.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/2052?email_source=notifications\u0026email_token=ABO7UZLKTE2LDMTWYAUSC4LQHTIK3A5CNFSM4IS3FYX2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HIXPEXQ",
"url": "https://github.com/kamailio/kamailio/issues/2052?email_source=notifications\u0026email_token=ABO7UZLKTE2LDMTWYAUSC4LQHTIK3A5CNFSM4IS3FYX2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HIXPEXQ",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>