Hi<br><br>I am trying to use textops modules with standalone presence server. The opensips server starts without error but the replace_body change done in is_method(PUBLISH) is not reflected during testing.<br><br>The changes in PUBLISH messages seen in ngrep is not changed. kindly help<br>
<br>#<br># $Id$<br>#<br># simple quick-start config script - Stand-alone presence server<br>#<br> <br># ----------- global configuration parameters ------------------------<br> <br>debug=3 # debug level (cmd line: -dddddddddd)<br>
fork=yes<br>log_stderror=no # (cmd line: -E)<br>children=4<br><br>listen=udp:<a href="http://192.168.1.100:5065">192.168.1.100:5065</a><br>port=5065<br><br>#dns=no<br>#rev_dns=no<br><br># ------------------ module loading ----------------------------------<br>
<br>#set module path<br>mpath="/usr/lib/opensips/modules/"<br><br>loadmodule "db_mysql.so"<br>loadmodule "sl.so"<br>loadmodule "signaling.so"<br>loadmodule "maxfwd.so"<br>
loadmodule "textops.so"<br>loadmodule "tm.so"<br>loadmodule "rr.so"<br>loadmodule "exec.so"<br>loadmodule "presence.so"<br>loadmodule "presence_xml.so"<br>loadmodule "avpops.so"<br>
loadmodule "mi_fifo.so"<br>loadmodule "usrloc.so"<br>loadmodule "pua.so"<br>loadmodule "pua_usrloc.so"<br>loadmodule "registrar.so"<br><br><br> <br># ----------------- setting module-specific parameters ---------------<br>
modparam("usrloc", "db_mode", 2)<br>modparam("usrloc", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")<br><br># -- presence params --<br>modparam("presence|presence_xml", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")<br>
<br>modparam("presence_xml", "force_active", 1)<br> <br>modparam("presence", "server_address", "sip:<a href="http://192.168.1.100:5065">192.168.1.100:5065</a>")<br><br>modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")<br>
<br><br>modparam("pua", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")<br>modparam("pua_usrloc", "default_domain", "192.168.1.100")<br>modparam("pua_usrloc", "presence_server", "sip:<a href="http://192.168.1.100:5065">192.168.1.100:5065</a>")<br>
<br># ------------------------- request routing logic -------------------<br> <br># main routing logic<br> <br>route{<br> # initial sanity checks -- messages with<br> # max_forwards==0, or excessively long requests<br>
if (!mf_process_maxfwd_header("10")) {<br> sl_send_reply("483","Too Many Hops");<br> exit;<br> };<br> <br> <br> if (!is_method("SUBSCRIBE|PUBLISH")) {<br>
sl_send_reply("488", "Not Acceptable Here");<br> exit;<br> }<br> <br><br> <br> <b> if ((is_method("PUBLISH")) && ($fU=="bob")) {<br><br> replace_body_all("closed", "open");<br>
}</b><br> <br><br><br> # presence handling<br> if (! t_newtran())<br> {<br> sl_reply_error();<br> exit;<br> };<br> <br> if(is_method("PUBLISH"))<br> {<br><br> handle_publish();<br>
<br> }<br><br> else<br> if( is_method("SUBSCRIBE"))<br> {<br> <br> handle_subscribe();<br> <br> };<br> <br> exit;<br>}<br><br clear="all"><br>-- <br>Thanks and Regards<br>
Garima Sharma