[sr-dev] [kamailio/kamailio] mod kazoo: wrong kazoo_publish example (#2627)

sergey-safarov notifications at github.com
Sun Feb 7 12:26:03 CET 2021



### Description

Example 1.21. kazoo_publish usage
contains string
```
$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)+ " }";
```

This example did not work because the string generates broken JSON:
1. here present value ` $var(register_contants)` but key is not present
2. JSON key and value must be started and terminated by `"` symbol (not by `'`)


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2627
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210207/38c813b3/attachment.htm>


More information about the sr-dev mailing list