First your opensips configuration indicates you are using a very old version of opensips (1.6.x perhaps). There are many major changes in textops modules in newer version which fix tons of problems.<br><div><br></div><div>
Secondly i doubt if you will be able to see changes through ngrep. This tool will show you the original message received on ethernet interface, before it is handed over to opensips for processing. And since your opensips is the end-point from where the message is not routed any further (to another server), so changes you do will be invisible to ngrep.</div>
<div><br></div><div>Thank you.</div><div><br><br><div class="gmail_quote">On Thu, Feb 14, 2013 at 12:25 PM, garima sharma <span dir="ltr"><<a href="mailto:garima.sharma16@gmail.com" target="_blank">garima.sharma16@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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" target="_blank">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" target="_blank">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" target="_blank">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>}<span class="HOEnZb"><font color="#888888"><br>
<br clear="all"><br>-- <br>Thanks and Regards<br>
Garima Sharma
</font></span><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a><br>
<a href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users" target="_blank">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Muhammad Shahzad</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">------------------------------</span><span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">-----</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">CISCO Rich Media Communication Specialist (CRMCS)</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">CISCO Certified Network Associate (CCNA)</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Cell: +49 176 99 83 10 85</span><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">MSN: </span><a href="mailto:shari_786pk@hotmail.com" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)" target="_blank">shari_786pk@hotmail.com</a><br style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<span style="color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Email: </span><a href="mailto:shaheryarkh@googlemail.com" style="color:rgb(17,85,204);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)" target="_blank">shaheryarkh@googlemail.com</a>
</div>