[Kamailio-Users] textops: new function - set_rpl_body(...)
Daniel-Constantin Mierla
miconda at gmail.com
Thu Jan 29 18:10:14 CET 2009
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 at 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
--
Daniel-Constantin Mierla
http://www.asipto.com
More information about the Users
mailing list