<p></p>
<h3>Description</h3>
<p>Example 1.21. kazoo_publish usage<br>
contains string</p>
<pre><code>$var(amqp_payload_request) = "{'Event-Category' : 'directory', 'Event-Name' : 'reg_success', 'Contact' : '" + $var(fs_contact) + "', 'Call-ID' : '" + $ci + "', 'Realm' : '" + $fd +"', 'Username' : '" + $fU + "', 'From-User' : '" + $fU + "', 'From-Host' : '" + $fd + "', 'To-User' : '" + $tU +"', 'To-Host' : '" + $td + "', 'User-Agent' : '" + $ua +"' ," + $var(register_contants)+ " }";
</code></pre>
<p>This example did not work because the string generates broken JSON:</p>
<ol>
<li>here present value <code> $var(register_contants)</code> but key is not present</li>
<li>JSON key and value must be started and terminated by <code>"</code> symbol (not by <code>'</code>)</li>
</ol>

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