[OpenSIPS-Users] Textops Module Integration with presence. Changes not visible--> replace_body_all

garima sharma garima.sharma16 at gmail.com
Thu Feb 14 12:25:03 CET 2013


Hi

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.

The changes in PUBLISH messages seen in ngrep is not changed. kindly help

#
# $Id$
#
# simple quick-start config script - Stand-alone presence server
#

# ----------- global configuration parameters ------------------------

debug=3 # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no # (cmd line: -E)
children=4

listen=udp:192.168.1.100:5065
port=5065

#dns=no
#rev_dns=no

# ------------------ module loading ----------------------------------

#set module path
mpath="/usr/lib/opensips/modules/"

loadmodule "db_mysql.so"
loadmodule "sl.so"
loadmodule "signaling.so"
loadmodule "maxfwd.so"
loadmodule "textops.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "exec.so"
loadmodule "presence.so"
loadmodule "presence_xml.so"
loadmodule "avpops.so"
loadmodule "mi_fifo.so"
loadmodule "usrloc.so"
loadmodule "pua.so"
loadmodule "pua_usrloc.so"
loadmodule "registrar.so"



# ----------------- setting module-specific parameters ---------------
 modparam("usrloc", "db_mode", 2)
modparam("usrloc", "db_url", "mysql://opensips:opensipsrw@localhost
/opensips")

# -- presence params --
modparam("presence|presence_xml", "db_url",
"mysql://opensips:opensipsrw@localhost/opensips")

modparam("presence_xml", "force_active", 1)

modparam("presence", "server_address", "sip:192.168.1.100:5065")

modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")


modparam("pua", "db_url", "mysql://opensips:opensipsrw@localhost/opensips")
modparam("pua_usrloc", "default_domain", "192.168.1.100")
modparam("pua_usrloc", "presence_server", "sip:192.168.1.100:5065")

# ------------------------- request routing logic -------------------

# main routing logic

route{
    # initial sanity checks -- messages with
    # max_forwards==0, or excessively long requests
    if (!mf_process_maxfwd_header("10")) {
        sl_send_reply("483","Too Many Hops");
        exit;
    };


     if (!is_method("SUBSCRIBE|PUBLISH")) {
        sl_send_reply("488", "Not Acceptable Here");
        exit;
    }



   * if ((is_method("PUBLISH")) && ($fU=="bob")) {

    replace_body_all("closed", "open");
    }*



    # presence handling
    if (! t_newtran())
    {
        sl_reply_error();
        exit;
     };

    if(is_method("PUBLISH"))
    {

        handle_publish();

    }

    else
    if( is_method("SUBSCRIBE"))
    {

        handle_subscribe();

    };

    exit;
}


-- 
Thanks and Regards
Garima Sharma
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20130214/18e62664/attachment.htm>


More information about the Users mailing list