[sr-dev] git:5.5:7e6cc68e: kazoo: fixed json body in example

Daniel-Constantin Mierla miconda at gmail.com
Wed Sep 22 08:41:57 CEST 2021


Module: kamailio
Branch: 5.5
Commit: 7e6cc68ee6ba80513c3e2138ad9ba408d6fe29a4
URL: https://github.com/kamailio/kamailio/commit/7e6cc68ee6ba80513c3e2138ad9ba408d6fe29a4

Author: Sergey Safarov <s.safarov at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-09-22T08:40:45+02:00

kazoo: fixed json body in example

(cherry picked from commit 38ba61170abdfeb189f7b05d6daf19f15378fab9)

---

Modified: src/modules/kazoo/doc/kazoo_admin.xml

---

Diff:  https://github.com/kamailio/kamailio/commit/7e6cc68ee6ba80513c3e2138ad9ba408d6fe29a4.diff
Patch: https://github.com/kamailio/kamailio/commit/7e6cc68ee6ba80513c3e2138ad9ba408d6fe29a4.patch

---

diff --git a/src/modules/kazoo/doc/kazoo_admin.xml b/src/modules/kazoo/doc/kazoo_admin.xml
index 6b236ed50a..ef3b41890b 100644
--- a/src/modules/kazoo/doc/kazoo_admin.xml
+++ b/src/modules/kazoo/doc/kazoo_admin.xml
@@ -624,7 +624,7 @@ modparam("kazoo", "pua_mode", 0)
         <title><function>kazoo_publish</function> usage</title>
         <programlisting format="linespecific">
 ...
-$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)+ " }";
+$var(amqp_payload_request) = $_s({"Event-Category" : "directory", "Event-Name" : "reg_success", "Contact" : "$(ct{s.escape.common}{s.replace,\','}{s.replace,$$,})", "Call-ID" : "$ci", "Realm" : "$fd", "Username" : "$fU", "From-User" : "$fU", "From-Host" : "$fd", "To-User" : "$tU", "To-Host" : "$td", "User-Agent" : "$(ua{s.escape.common}{s.replace,\','}{s.replace,$$,})" });
 $var(amqp_routing_key) = "registration.success." + $(fd{kz.encode}) + "." + $fU;
 kazoo_publish("callmgr", $var(amqp_routing_key), $var(amqp_payload_request)); 
 ...




More information about the sr-dev mailing list