Hello,
few days ago I added a new function to textops module: - set_rpl_body(body, content-type)
It can be used to set the body of a reply generated by kamailio/openser.
route { if(is_method("HELLO") && $ru == "sip:server@kamailio.org") { set_rpl_body("Hi $fn!", "text/plain"); send_reply("200", "ok"); exit; }
The insert_body() function (also new in 1.5.0) has been renamed to set_body() for better coherence. This one can be used to set the body of current processed sip message.
An an example, set_rpl_body() can be used for pull-like data transfer between servers. Using uac module (and eventually rtimer module), servers in a farm can interrogate each other and exchange data. Some useful links: http://kamailio.org/docs/modules/1.5.x/uac.html#id2467913 http://kamailio.org/docs/modules/1.5.x/rtimer.html http://kamailio.org/docs/modules/1.5.x/textops.html#id2468015
Cheers, Daniel