<p></p>
<h3>Description</h3>
<p>Add a redis_cmd() call with more than two %s insertions. Kamailio throws parse errors at startup. See below for example and log messages.</p>
<h3>Troubleshooting</h3>
<p>This line works fine:<br>
<code>redis_cmd("kam_redis", "SET %s %s-bar, "test_key", "foo" "r");</code></p>
<p>This one does not:<br>
<code>redis_cmd("kam_redis", "SET %s %s-%s, "test_key", "foo", "bar, "r");</code></p>
<h4>Reproduction</h4>
<p>Add a line like this:<br>
<code>redis_cmd("kam_redis", "SET %s %s-%s, "test_key", "foo", "bar, "r");</code></p>
<h4>Log Messages</h4>
<pre><code>2020-08-13T16:39:05.468806+00:00,vagrant-ubuntu-xenial-64: CRITICAL: <core> [core/cfg.y:3517]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 424, column 117: Too many arguments
2020-08-13T16:39:05.472800+00:00,vagrant-ubuntu-xenial-64: CRITICAL: <core> [core/cfg.y:3517]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 424, column 117: '('')' expected (function call)
2020-08-13T16:39:05.473289+00:00,vagrant-ubuntu-xenial-64: CRITICAL: <core> [core/cfg.y:3517]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 424, column 117: bad command: missing ';'?
2020-08-13T16:39:05.473927+00:00,vagrant-ubuntu-xenial-64: ERROR: <core> [core/cfg.y:3363]: yyparse(): function used inside params of another function: xlog
2020-08-13T16:39:05.475417+00:00,vagrant-ubuntu-xenial-64: CRITICAL: <core> [core/cfg.y:3517]: yyerror_at(): parse error in config file /etc/kamailio/kamailio.cfg, line 426, column 9: use of function execution inside params not allowed`

</code></pre>
<h3>Additional Information</h3>
<ul>
<li><strong>Kamailio Version</strong> - output of <code>kamailio -v</code></li>
</ul>
<pre><code>version: kamailio 5.2.7 (x86_64/linux)                                                                                                                                                                                          
flags: STATS: Off, USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144 MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown 
compiled with gcc 5.4.0

</code></pre>
<p>I have confirmed the issue with the available later version packages as well.</p>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<p>Ubuntu 16.04</p>

<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/2456">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZON42KZVCD54D2QZRLSCPIGVANCNFSM4QKYUAOA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZMM2NUYPFSLWUJNHALSCPIGVA5CNFSM4QKYUAOKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4KG47FEA.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/2456",
"url": "https://github.com/kamailio/kamailio/issues/2456",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>