Trouble getting mediaproxy to work (dialog module)

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Trouble getting mediaproxy to work (dialog module)

slophoo
Opensips trace returns the following error to me:

ERROR:mediaproxy:EngageMediaProxy: engage_media_proxy requires the dialog module to be loaded and configured

I have not needed the dialog module before, but have now loaded it and it required one parameter, so I copied that from the example as well.  

loadmodule "dialog.so"
modparam("dialog", "dlg_flag",4)

it seems to be loaded, but i still get the above error when making a call and mediaproxy is not used.  What am I missing?

I'll post my entire opensips.cfg here in case it helps, maybe the issue is the order in which i call engage_media_proxy.  By the way, at the moment my goal is to get ALL calls to use mediaproxy just to verify that it works.  Later I will work out the specific NAT situations where it is needed:



#
# $Id: opensips.cfg 4423 2008-06-27 10:25:01Z henningw $
#
# OpenSIPS basic configuration script
#     by Anca Vamanu <anca@voice-system.ro>
#
# Please refer to the Core CookBook at http://www.opensips.org/dokuwiki/doku.php
# for a explanation of possible statements, functions and parameters.
# hhii

####### Global Parameters #########

debug=3
log_stderror=no
log_facility=LOG_LOCAL0

fork=yes
children=4

/* uncomment the following lines to enable debugging */
debug=6
#fork=no
log_stderror=yes

/* uncomment the next line to disable TCP (default on) */
#disable_tcp=yes

/* uncomment the next line to enable the auto temporary blacklisting of
   not available destinations (default disabled) */
#disable_dns_blacklist=no

/* uncomment the next line to enable IPv6 lookup after IPv4 dns
   lookup failures (default disabled) */
#dns_try_ipv6=yes

/* uncomment the next line to disable the auto discovery of local aliases
   based on revers DNS on IPs (default on) */
#auto_aliases=no

/* uncomment the following lines to enable TLS support  (default off) */
#disable_tls = no
#listen = tls:your_IP:5061
#tls_verify_server = 1
#tls_verify_client = 1
#tls_require_client_certificate = 0
#tls_method = TLSv1
#tls_certificate = "/usr/local/etc/opensips/tls/user/user-cert.pem"
#tls_private_key = "/usr/local/etc/opensips/tls/user/user-privkey.pem"
#tls_ca_list = "/usr/local/etc/opensips/tls/user/user-calist.pem"


port=5060

/* uncomment and configure the following line if you want opensips to
   bind on a specific interface/port/proto (default bind on all available) */
#listen=udp:192.168.1.2:5060


####### Modules Section ########

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

/* uncomment next line for MySQL DB support */
loadmodule "db_mysql.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "mi_fifo.so"
loadmodule "uri_db.so"
loadmodule "uri.so"
loadmodule "xlog.so"
loadmodule "dialog.so"
loadmodule "acc.so"
/* uncomment next lines for MySQL based authentication support
   NOTE: a DB (like db_mysql) module must be also loaded */
loadmodule "auth.so"
loadmodule "auth_db.so"
/* uncomment next line for aliases support
   NOTE: a DB (like db_mysql) module must be also loaded */
#loadmodule "alias_db.so"
/* uncomment next line for multi-domain support
   NOTE: a DB (like db_mysql) module must be also loaded
   NOTE: be sure and enable multi-domain support in all used modules
         (see "multi-module params" section ) */
loadmodule "domain.so"
/* uncomment the next two lines for presence server support
   NOTE: a DB (like db_mysql) module must be also loaded */
#loadmodule "presence.so"
#loadmodule "presence_xml.so"

loadmodule "nathelper.so"
loadmodule "mediaproxy.so"

# ----------------- setting module-specific parameters ---------------


# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")


# ----- rr params -----
# add value to ;lr param to cope with most of the UAs
modparam("rr", "enable_full_lr", 1)
# do not append from tag to the RR (no need for this script)
modparam("rr", "append_fromtag", 0)


# ----- rr params -----
modparam("registrar", "method_filtering", 1)
/* uncomment the next line to disable parallel forking via location */
# modparam("registrar", "append_branches", 0)
/* uncomment the next line not to allow more than 10 contacts per AOR */
modparam("registrar", "max_contacts", 10)

# ----- uri_db params -----
/* by default we disable the DB support in the module as we do not need it
   in this configuration */
modparam("uri_db", "use_uri_table", 0)
modparam("uri_db", "db_url", "")
modparam("registrar", "received_avp", "$avp(i:42)")

modparam("dialog","dlg_flag",4)


# ----- acc params -----
/* what sepcial events should be accounted ? */
modparam("acc", "early_media", 1)
modparam("acc", "report_ack", 1)
modparam("acc", "report_cancels", 1)
/* by default ww do not adjust the direct of the sequential requests.
   if you enable this parameter, be sure the enable "append_fromtag"
   in "rr" module */
modparam("acc", "detect_direction", 0)
/* account triggers (flags) */
modparam("acc", "failed_transaction_flag", 3)
modparam("acc", "log_flag", 1)
modparam("acc", "log_missed_flag", 2)
/* uncomment the following lines to enable DB accounting also */
modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 2)


# ----- usrloc params -----
modparam("usrloc", "db_mode",   0)
/* uncomment the following lines if you want to enable DB persistency
   for location entries */
modparam("usrloc", "db_mode",   2)
modparam("usrloc", "db_url",
        "mysql://openser:openserrw@127.0.0.1/openser")


# ----- auth_db params -----
/* uncomment the following lines if you want to enable the DB based
   authentication */
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
modparam("auth_db", "db_url",
        "mysql://openser:openserrw@127.0.0.1/openser")
modparam("auth_db", "load_credentials", "")


# ----- alias_db params -----
/* uncomment the following lines if you want to enable the DB based
   aliases */
#modparam("alias_db", "db_url",
# "mysql://opensips:opensipsrw@localhost/opensips")


# ----- domain params -----
/* uncomment the following lines to enable multi-domain detection
   support */
modparam("domain", "db_url", "mysql://openser:openserrw@127.0.0.1/openser")
modparam("domain", "db_mode", 1)   # Use caching


# ----- multi-module params -----
/* uncomment the following line if you want to enable multi-domain support
   in the modules (dafault off) */
modparam("alias_db|auth_db|usrloc|uri_db", "use_domain", 1)


# ----- presence params -----
/* uncomment the following lines if you want to enable presence */
#modparam("presence|presence_xml", "db_url", "mysql://openser:openserrw@127.0.0.1/openser")
#modparam("presence_xml", "force_active", 1)
#modparam("presence", "server_address", "sip:74.85.27.9:5060")


# ----- nathelper params -----
#modparam("nathelper", "rtpproxy_disable", 1)
modparam("nathelper", "natping_interval", 0)
modparam("nathelper","received_avp","$avp(i:42)")

#modparam("mediaproxy","natping_interval",30)
modparam("mediaproxy", "mediaproxy_socket", "/var/run/mediaproxy/dispatcher.sock")



####### Routing Logic ########


# main request routing logic

route{
        if (!mf_process_maxfwd_header("10")) {
                sl_send_reply("483","Too Many Hops");
                exit;
        }

        if (has_totag()) {
                # sequential request withing a dialog should
                # take the path determined by record-routing
                if (loose_route()) {
                        if (is_method("BYE")) {
                                setflag(1); # do accounting ...
                                setflag(3); # ... even if the transaction fails
                        }
                        route(1);
                } else {
                        /* uncomment the following lines if you want to enable presence */
                        ##if (is_method("SUBSCRIBE") && $rd == "your.server.ip.address") {
                        ## # in-dialog subscribe requests
                        ## route(2);
                        ## exit;
                        ##}
                        if ( is_method("ACK") ) {
                                if ( t_check_trans() ) {
                                        # non loose-route, but stateful ACK; must be an ACK after a 487 or e.g. 404 from upstream server
                                        t_relay();
                                        exit;
                                } else {
                                        # ACK without matching transaction ... ignore and discard.\n");
                                        exit;
                                }
                        }
                        sl_send_reply("404","Not here");
                }
                exit;
        }

        #initial requests

        # CANCEL processing
        if (is_method("CANCEL"))
        {
                if (t_check_trans())
                        t_relay();
                exit;
        }

        t_check_trans();

        # authenticate if from local subscriber (uncomment to enable auth)
        ##if (!(method=="REGISTER") && from_uri==myself)
        ##{
        ## if (!proxy_authorize("", "subscriber")) {
        ## proxy_challenge("", "0");
        ## exit;
        ## }
        ## if (!check_from()) {
        ## sl_send_reply("403","Forbidden auth ID");
        ## exit;
        ## }
        ##
        ## consume_credentials();
        ## # caller authenticated
        ##}

        # record routing
        if (!is_method("REGISTER|MESSAGE"))
                append_hf("P-hint: hello record routing\r\n");
                record_route();

        # account only INVITEs
        if (is_method("INVITE")) {
                setflag(1); # do accounting
        }
        if (!uri==myself)
        /* replace with following line if multi-domain support is used */
        ##if (!is_uri_host_local())
        {
                append_hf("P-hint: outbound\r\n");
                # if you have some interdomain connections via TLS
                ##if($rd=="tls_domain1.net") {
                ## t_relay("tls:domain1.net");
                ## exit;
                ##} else if($rd=="tls_domain2.net") {
                ## t_relay("tls:domain2.net");
                ## exit;
                ##}
                route(1);
        }

        # requests for my domain

        /* uncomment this if you want to enable presence server
           and comment the next 'if' block
           NOTE: uncomment also the definition of route[2] from  below */
        ##if( is_method("PUBLISH|SUBSCRIBE"))
        ## route(2);

        if (is_method("PUBLISH"))
        {
                append_hf("P-hint: outbound alias\r\n");
                sl_send_reply("503", "Service sort of Unavailable");
                exit;
        }
       







        if (is_method("REGISTER"))
        {
                # authenticate the REGISTER requests (uncomment to enable auth)
                ##if (!www_authorize("", "subscriber"))
                ##{
                ## www_challenge("", "0");
                ## exit;
                ##}
                ##
                ##if (!check_to())
                ##{
                ## sl_send_reply("403","Forbidden auth ID");
                ## exit;
                ##}
                append_hf("P-hint: hello register\r\n");
                if (!search("^Contact:[ ]*\*")) {
                        setflag(6);
                        fix_nated_register();
                        force_rport();
                        };
                if (!save("location"))
                        sl_reply_error();

                exit;
        }

        if ($rU==NULL) {
                # request with no Username in RURI
                sl_send_reply("484","Address Incomplete");
                exit;
        }

        # apply DB based aliases (uncomment to enable)
        ##alias_db_lookup("dbaliases");

        if (!lookup("location")) {
                switch ($retcode) {
                        case -1:
                        case -3:
                                t_newtran();
                                t_reply("404", "Not Found");
                                exit;
                        case -2:
                                sl_send_reply("405", "Method Not Allowed");
                                exit;
                }
        }

        # when routing via usrloc, log the missed calls also
        setflag(2);

        route(1);
}

route[1] {
        # for INVITEs enable some additional helper routes
        if (is_method("INVITE")) {
## #use_media_proxy();
                engage_media_proxy();
                append_hf("P-hint: setflag7|forcerport|fix_contact\r\n");
                t_on_branch("2");
                t_on_reply("2");
                t_on_failure("1");
        }

        if (!t_relay()) {
                sl_reply_error();
        };
        exit;
}


# Presence route
/* uncomment the whole following route for enabling presence
   NOTE: do not forget to enable the call of this route from the main
     route */
##route[2]
##{
## if (!t_newtran())
## {
## sl_reply_error();
## exit;
## };
##
## if(is_method("PUBLISH"))
## {
## handle_publish();
## t_release();
## }
## else
## if( is_method("SUBSCRIBE"))
## {
## handle_subscribe();
## t_release();
## }
##
## exit;
##}


branch_route[2] {
        xlog("new branch at $ru\n");
}


onreply_route[2] {
## use_media_proxy();
        append_hf("P-hint: onreplyrout\r\n)");
        xlog("incoming reply\n");
}


failure_route[1] {
        if (t_was_cancelled()) {
                exit;}

        # uncomment the following lines if you want to block client
        # redirect based on 3xx replies.
        ##if (t_check_status("3[0-9][0-9]")) {
        ##t_reply("404","Not found");
        ## exit;
        ##}

        # uncomment the following lines if you want to redirect the failed
        # calls to a different new destination
        ##if (t_check_status("486|408")) {
        ## sethostport("192.168.2.100:5060");
        ## append_branch();
        ## # do not set the missed call flag again
        ## t_relay();
        ##}
}

Reply | Threaded
Open this post in threaded view
|

Re: Trouble getting mediaproxy to work (dialog module)

Bogdan-Andrei Iancu
Hi,

Do you get something like this at statup:
    engage_media_proxy() will not work because the dialog module is not
loaded

Regards,
Bogdan


slophoo wrote:

> Opensips trace returns the following error to me:
>
> ERROR:mediaproxy:EngageMediaProxy: engage_media_proxy requires the dialog
> module to be loaded and configured
>
> I have not needed the dialog module before, but have now loaded it and it
> required one parameter, so I copied that from the example as well.  
>
> loadmodule "dialog.so"
> modparam("dialog", "dlg_flag",4)
>
> it seems to be loaded, but i still get the above error when making a call
> and mediaproxy is not used.  What am I missing?
>
> I'll post my entire opensips.cfg here in case it helps, maybe the issue is
> the order in which i call engage_media_proxy.  By the way, at the moment my
> goal is to get ALL calls to use mediaproxy just to verify that it works.
> Later I will work out the specific NAT situations where it is needed:
>
>
>
> #
> # $Id: opensips.cfg 4423 2008-06-27 10:25:01Z henningw $
> #
> # OpenSIPS basic configuration script
> #     by Anca Vamanu <[hidden email]>
> #
> # Please refer to the Core CookBook at
> http://www.opensips.org/dokuwiki/doku.php
> # for a explanation of possible statements, functions and parameters.
> # hhii
>
> ####### Global Parameters #########
>
> debug=3
> log_stderror=no
> log_facility=LOG_LOCAL0
>
> fork=yes
> children=4
>
> /* uncomment the following lines to enable debugging */
> debug=6
> #fork=no
> log_stderror=yes
>
> /* uncomment the next line to disable TCP (default on) */
> #disable_tcp=yes
>
> /* uncomment the next line to enable the auto temporary blacklisting of
>    not available destinations (default disabled) */
> #disable_dns_blacklist=no
>
> /* uncomment the next line to enable IPv6 lookup after IPv4 dns
>    lookup failures (default disabled) */
> #dns_try_ipv6=yes
>
> /* uncomment the next line to disable the auto discovery of local aliases
>    based on revers DNS on IPs (default on) */
> #auto_aliases=no
>
> /* uncomment the following lines to enable TLS support  (default off) */
> #disable_tls = no
> #listen = tls:your_IP:5061
> #tls_verify_server = 1
> #tls_verify_client = 1
> #tls_require_client_certificate = 0
> #tls_method = TLSv1
> #tls_certificate = "/usr/local/etc/opensips/tls/user/user-cert.pem"
> #tls_private_key = "/usr/local/etc/opensips/tls/user/user-privkey.pem"
> #tls_ca_list = "/usr/local/etc/opensips/tls/user/user-calist.pem"
>
>
> port=5060
>
> /* uncomment and configure the following line if you want opensips to
>    bind on a specific interface/port/proto (default bind on all available)
> */
> #listen=udp:192.168.1.2:5060
>
>
> ####### Modules Section ########
>
> #set module path
> mpath="/usr/local/lib/opensips/modules/"
>
> /* uncomment next line for MySQL DB support */
> loadmodule "db_mysql.so"
> loadmodule "sl.so"
> loadmodule "tm.so"
> loadmodule "rr.so"
> loadmodule "maxfwd.so"
> loadmodule "usrloc.so"
> loadmodule "registrar.so"
> loadmodule "textops.so"
> loadmodule "mi_fifo.so"
> loadmodule "uri_db.so"
> loadmodule "uri.so"
> loadmodule "xlog.so"
> loadmodule "dialog.so"
> loadmodule "acc.so"
> /* uncomment next lines for MySQL based authentication support
>    NOTE: a DB (like db_mysql) module must be also loaded */
> loadmodule "auth.so"
> loadmodule "auth_db.so"
> /* uncomment next line for aliases support
>    NOTE: a DB (like db_mysql) module must be also loaded */
> #loadmodule "alias_db.so"
> /* uncomment next line for multi-domain support
>    NOTE: a DB (like db_mysql) module must be also loaded
>    NOTE: be sure and enable multi-domain support in all used modules
>          (see "multi-module params" section ) */
> loadmodule "domain.so"
> /* uncomment the next two lines for presence server support
>    NOTE: a DB (like db_mysql) module must be also loaded */
> #loadmodule "presence.so"
> #loadmodule "presence_xml.so"
>
> loadmodule "nathelper.so"
> loadmodule "mediaproxy.so"
>
> # ----------------- setting module-specific parameters ---------------
>
>
> # ----- mi_fifo params -----
> modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
>
>
> # ----- rr params -----
> # add value to ;lr param to cope with most of the UAs
> modparam("rr", "enable_full_lr", 1)
> # do not append from tag to the RR (no need for this script)
> modparam("rr", "append_fromtag", 0)
>
>
> # ----- rr params -----
> modparam("registrar", "method_filtering", 1)
> /* uncomment the next line to disable parallel forking via location */
> # modparam("registrar", "append_branches", 0)
> /* uncomment the next line not to allow more than 10 contacts per AOR */
> modparam("registrar", "max_contacts", 10)
>
> # ----- uri_db params -----
> /* by default we disable the DB support in the module as we do not need it
>    in this configuration */
> modparam("uri_db", "use_uri_table", 0)
> modparam("uri_db", "db_url", "")
> modparam("registrar", "received_avp", "$avp(i:42)")
>
> modparam("dialog","dlg_flag",4)
>
>
> # ----- acc params -----
> /* what sepcial events should be accounted ? */
> modparam("acc", "early_media", 1)
> modparam("acc", "report_ack", 1)
> modparam("acc", "report_cancels", 1)
> /* by default ww do not adjust the direct of the sequential requests.
>    if you enable this parameter, be sure the enable "append_fromtag"
>    in "rr" module */
> modparam("acc", "detect_direction", 0)
> /* account triggers (flags) */
> modparam("acc", "failed_transaction_flag", 3)
> modparam("acc", "log_flag", 1)
> modparam("acc", "log_missed_flag", 2)
> /* uncomment the following lines to enable DB accounting also */
> modparam("acc", "db_flag", 1)
> modparam("acc", "db_missed_flag", 2)
>
>
> # ----- usrloc params -----
> modparam("usrloc", "db_mode",   0)
> /* uncomment the following lines if you want to enable DB persistency
>    for location entries */
> modparam("usrloc", "db_mode",   2)
> modparam("usrloc", "db_url",
> "mysql://openser:openserrw@127.0.0.1/openser")
>
>
> # ----- auth_db params -----
> /* uncomment the following lines if you want to enable the DB based
>    authentication */
> modparam("auth_db", "calculate_ha1", yes)
> modparam("auth_db", "password_column", "password")
> modparam("auth_db", "db_url",
> "mysql://openser:openserrw@127.0.0.1/openser")
> modparam("auth_db", "load_credentials", "")
>
>
> # ----- alias_db params -----
> /* uncomment the following lines if you want to enable the DB based
>    aliases */
> #modparam("alias_db", "db_url",
> # "mysql://opensips:opensipsrw@localhost/opensips")
>
>
> # ----- domain params -----
> /* uncomment the following lines to enable multi-domain detection
>    support */
> modparam("domain", "db_url", "mysql://openser:openserrw@127.0.0.1/openser")
> modparam("domain", "db_mode", 1)   # Use caching
>
>
> # ----- multi-module params -----
> /* uncomment the following line if you want to enable multi-domain support
>    in the modules (dafault off) */
> modparam("alias_db|auth_db|usrloc|uri_db", "use_domain", 1)
>
>
> # ----- presence params -----
> /* uncomment the following lines if you want to enable presence */
> #modparam("presence|presence_xml", "db_url",
> "mysql://openser:openserrw@127.0.0.1/openser")
> #modparam("presence_xml", "force_active", 1)
> #modparam("presence", "server_address", "sip:74.85.27.9:5060")
>
>
> # ----- nathelper params -----
> #modparam("nathelper", "rtpproxy_disable", 1)
> modparam("nathelper", "natping_interval", 0)
> modparam("nathelper","received_avp","$avp(i:42)")
>
> #modparam("mediaproxy","natping_interval",30)
> modparam("mediaproxy", "mediaproxy_socket",
> "/var/run/mediaproxy/dispatcher.sock")
>
>
>
> ####### Routing Logic ########
>
>
> # main request routing logic
>
> route{
> if (!mf_process_maxfwd_header("10")) {
> sl_send_reply("483","Too Many Hops");
> exit;
> }
>
> if (has_totag()) {
> # sequential request withing a dialog should
> # take the path determined by record-routing
> if (loose_route()) {
> if (is_method("BYE")) {
> setflag(1); # do accounting ...
> setflag(3); # ... even if the transaction fails
> }
> route(1);
> } else {
> /* uncomment the following lines if you want to enable presence */
> ##if (is_method("SUBSCRIBE") && $rd == "your.server.ip.address") {
> ## # in-dialog subscribe requests
> ## route(2);
> ## exit;
> ##}
> if ( is_method("ACK") ) {
> if ( t_check_trans() ) {
> # non loose-route, but stateful ACK; must be an ACK after a 487 or e.g.
> 404 from upstream server
> t_relay();
> exit;
> } else {
> # ACK without matching transaction ... ignore and discard.\n");
> exit;
> }
> }
> sl_send_reply("404","Not here");
> }
> exit;
> }
>
> #initial requests
>
> # CANCEL processing
> if (is_method("CANCEL"))
> {
> if (t_check_trans())
> t_relay();
> exit;
> }
>
> t_check_trans();
>
> # authenticate if from local subscriber (uncomment to enable auth)
> ##if (!(method=="REGISTER") && from_uri==myself)
> ##{
> ## if (!proxy_authorize("", "subscriber")) {
> ## proxy_challenge("", "0");
> ## exit;
> ## }
> ## if (!check_from()) {
> ## sl_send_reply("403","Forbidden auth ID");
> ## exit;
> ## }
> ##
> ## consume_credentials();
> ## # caller authenticated
> ##}
>
> # record routing
> if (!is_method("REGISTER|MESSAGE"))
> append_hf("P-hint: hello record routing\r\n");
> record_route();
>
> # account only INVITEs
> if (is_method("INVITE")) {
> setflag(1); # do accounting
> }
> if (!uri==myself)
> /* replace with following line if multi-domain support is used */
> ##if (!is_uri_host_local())
> {
> append_hf("P-hint: outbound\r\n");
> # if you have some interdomain connections via TLS
> ##if($rd=="tls_domain1.net") {
> ## t_relay("tls:domain1.net");
> ## exit;
> ##} else if($rd=="tls_domain2.net") {
> ## t_relay("tls:domain2.net");
> ## exit;
> ##}
> route(1);
> }
>
> # requests for my domain
>
> /* uncomment this if you want to enable presence server
>   and comment the next 'if' block
>   NOTE: uncomment also the definition of route[2] from  below */
> ##if( is_method("PUBLISH|SUBSCRIBE"))
> ## route(2);
>
> if (is_method("PUBLISH"))
> {
> append_hf("P-hint: outbound alias\r\n");
> sl_send_reply("503", "Service sort of Unavailable");
> exit;
> }
>
>
>
>
>
>
>
>
> if (is_method("REGISTER"))
> {
> # authenticate the REGISTER requests (uncomment to enable auth)
> ##if (!www_authorize("", "subscriber"))
> ##{
> ## www_challenge("", "0");
> ## exit;
> ##}
> ##
> ##if (!check_to())
> ##{
> ## sl_send_reply("403","Forbidden auth ID");
> ## exit;
> ##}
> append_hf("P-hint: hello register\r\n");
> if (!search("^Contact:[ ]*\*")) {
> setflag(6);
> fix_nated_register();
> force_rport();
> };
> if (!save("location"))
> sl_reply_error();
>
> exit;
> }
>
> if ($rU==NULL) {
> # request with no Username in RURI
> sl_send_reply("484","Address Incomplete");
> exit;
> }
>
> # apply DB based aliases (uncomment to enable)
> ##alias_db_lookup("dbaliases");
>
> if (!lookup("location")) {
> switch ($retcode) {
> case -1:
> case -3:
> t_newtran();
> t_reply("404", "Not Found");
> exit;
> case -2:
> sl_send_reply("405", "Method Not Allowed");
> exit;
> }
> }
>
> # when routing via usrloc, log the missed calls also
> setflag(2);
>
> route(1);
> }
>
> route[1] {
> # for INVITEs enable some additional helper routes
> if (is_method("INVITE")) {
> ## #use_media_proxy();
> engage_media_proxy();
> append_hf("P-hint: setflag7|forcerport|fix_contact\r\n");
> t_on_branch("2");
> t_on_reply("2");
> t_on_failure("1");
> }
>
> if (!t_relay()) {
> sl_reply_error();
> };
> exit;
> }
>
>
> # Presence route
> /* uncomment the whole following route for enabling presence
>    NOTE: do not forget to enable the call of this route from the main
>      route */
> ##route[2]
> ##{
> ## if (!t_newtran())
> ## {
> ## sl_reply_error();
> ## exit;
> ## };
> ##
> ## if(is_method("PUBLISH"))
> ## {
> ## handle_publish();
> ## t_release();
> ## }
> ## else
> ## if( is_method("SUBSCRIBE"))
> ## {
> ## handle_subscribe();
> ## t_release();
> ## }
> ##
> ## exit;
> ##}
>
>
> branch_route[2] {
> xlog("new branch at $ru\n");
> }
>
>
> onreply_route[2] {
> ## use_media_proxy();
> append_hf("P-hint: onreplyrout\r\n)");
> xlog("incoming reply\n");
> }
>
>
> failure_route[1] {
> if (t_was_cancelled()) {
> exit;}
>
> # uncomment the following lines if you want to block client
> # redirect based on 3xx replies.
> ##if (t_check_status("3[0-9][0-9]")) {
> ##t_reply("404","Not found");
> ## exit;
> ##}
>
> # uncomment the following lines if you want to redirect the failed
> # calls to a different new destination
> ##if (t_check_status("486|408")) {
> ## sethostport("192.168.2.100:5060");
> ## append_branch();
> ## # do not set the missed call flag again
> ## t_relay();
> ##}
> }
>
>
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Trouble getting mediaproxy to work (dialog module)

Jeff Pyle
Hi Bogdan,

Is there any reason that engage_media_proxy() has to run before
create_dialog()?  If it's the other way around, engage_media_proxy() doesn't
do anything, even at the highest debug level.


- Jeff



On 3/20/09 8:30 AM, "Bogdan-Andrei Iancu" <[hidden email]> wrote:

> Hi,
>
> Do you get something like this at statup:
>     engage_media_proxy() will not work because the dialog module is not
> loaded
>
> Regards,
> Bogdan
>
>
> slophoo wrote:
>> Opensips trace returns the following error to me:
>>
>> ERROR:mediaproxy:EngageMediaProxy: engage_media_proxy requires the dialog
>> module to be loaded and configured
>>
>> I have not needed the dialog module before, but have now loaded it and it
>> required one parameter, so I copied that from the example as well.
>>
>> loadmodule "dialog.so"
>> modparam("dialog", "dlg_flag",4)
>>
>> it seems to be loaded, but i still get the above error when making a call
>> and mediaproxy is not used.  What am I missing?
>>
>> I'll post my entire opensips.cfg here in case it helps, maybe the issue is
>> the order in which i call engage_media_proxy.  By the way, at the moment my
>> goal is to get ALL calls to use mediaproxy just to verify that it works.
>> Later I will work out the specific NAT situations where it is needed:
>>
>>
>>
>> #
>> # $Id: opensips.cfg 4423 2008-06-27 10:25:01Z henningw $
>> #
>> # OpenSIPS basic configuration script
>> #     by Anca Vamanu <[hidden email]>
>> #
>> # Please refer to the Core CookBook at
>> http://www.opensips.org/dokuwiki/doku.php
>> # for a explanation of possible statements, functions and parameters.
>> # hhii
>>
>> ####### Global Parameters #########
>>
>> debug=3
>> log_stderror=no
>> log_facility=LOG_LOCAL0
>>
>> fork=yes
>> children=4
>>
>> /* uncomment the following lines to enable debugging */
>> debug=6
>> #fork=no
>> log_stderror=yes
>>
>> /* uncomment the next line to disable TCP (default on) */
>> #disable_tcp=yes
>>
>> /* uncomment the next line to enable the auto temporary blacklisting of
>>    not available destinations (default disabled) */
>> #disable_dns_blacklist=no
>>
>> /* uncomment the next line to enable IPv6 lookup after IPv4 dns
>>    lookup failures (default disabled) */
>> #dns_try_ipv6=yes
>>
>> /* uncomment the next line to disable the auto discovery of local aliases
>>    based on revers DNS on IPs (default on) */
>> #auto_aliases=no
>>
>> /* uncomment the following lines to enable TLS support  (default off) */
>> #disable_tls = no
>> #listen = tls:your_IP:5061
>> #tls_verify_server = 1
>> #tls_verify_client = 1
>> #tls_require_client_certificate = 0
>> #tls_method = TLSv1
>> #tls_certificate = "/usr/local/etc/opensips/tls/user/user-cert.pem"
>> #tls_private_key = "/usr/local/etc/opensips/tls/user/user-privkey.pem"
>> #tls_ca_list = "/usr/local/etc/opensips/tls/user/user-calist.pem"
>>
>>
>> port=5060
>>
>> /* uncomment and configure the following line if you want opensips to
>>    bind on a specific interface/port/proto (default bind on all available)
>> */
>> #listen=udp:192.168.1.2:5060
>>
>>
>> ####### Modules Section ########
>>
>> #set module path
>> mpath="/usr/local/lib/opensips/modules/"
>>
>> /* uncomment next line for MySQL DB support */
>> loadmodule "db_mysql.so"
>> loadmodule "sl.so"
>> loadmodule "tm.so"
>> loadmodule "rr.so"
>> loadmodule "maxfwd.so"
>> loadmodule "usrloc.so"
>> loadmodule "registrar.so"
>> loadmodule "textops.so"
>> loadmodule "mi_fifo.so"
>> loadmodule "uri_db.so"
>> loadmodule "uri.so"
>> loadmodule "xlog.so"
>> loadmodule "dialog.so"
>> loadmodule "acc.so"
>> /* uncomment next lines for MySQL based authentication support
>>    NOTE: a DB (like db_mysql) module must be also loaded */
>> loadmodule "auth.so"
>> loadmodule "auth_db.so"
>> /* uncomment next line for aliases support
>>    NOTE: a DB (like db_mysql) module must be also loaded */
>> #loadmodule "alias_db.so"
>> /* uncomment next line for multi-domain support
>>    NOTE: a DB (like db_mysql) module must be also loaded
>>    NOTE: be sure and enable multi-domain support in all used modules
>>          (see "multi-module params" section ) */
>> loadmodule "domain.so"
>> /* uncomment the next two lines for presence server support
>>    NOTE: a DB (like db_mysql) module must be also loaded */
>> #loadmodule "presence.so"
>> #loadmodule "presence_xml.so"
>>
>> loadmodule "nathelper.so"
>> loadmodule "mediaproxy.so"
>>
>> # ----------------- setting module-specific parameters ---------------
>>
>>
>> # ----- mi_fifo params -----
>> modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
>>
>>
>> # ----- rr params -----
>> # add value to ;lr param to cope with most of the UAs
>> modparam("rr", "enable_full_lr", 1)
>> # do not append from tag to the RR (no need for this script)
>> modparam("rr", "append_fromtag", 0)
>>
>>
>> # ----- rr params -----
>> modparam("registrar", "method_filtering", 1)
>> /* uncomment the next line to disable parallel forking via location */
>> # modparam("registrar", "append_branches", 0)
>> /* uncomment the next line not to allow more than 10 contacts per AOR */
>> modparam("registrar", "max_contacts", 10)
>>
>> # ----- uri_db params -----
>> /* by default we disable the DB support in the module as we do not need it
>>    in this configuration */
>> modparam("uri_db", "use_uri_table", 0)
>> modparam("uri_db", "db_url", "")
>> modparam("registrar", "received_avp", "$avp(i:42)")
>>
>> modparam("dialog","dlg_flag",4)
>>
>>
>> # ----- acc params -----
>> /* what sepcial events should be accounted ? */
>> modparam("acc", "early_media", 1)
>> modparam("acc", "report_ack", 1)
>> modparam("acc", "report_cancels", 1)
>> /* by default ww do not adjust the direct of the sequential requests.
>>    if you enable this parameter, be sure the enable "append_fromtag"
>>    in "rr" module */
>> modparam("acc", "detect_direction", 0)
>> /* account triggers (flags) */
>> modparam("acc", "failed_transaction_flag", 3)
>> modparam("acc", "log_flag", 1)
>> modparam("acc", "log_missed_flag", 2)
>> /* uncomment the following lines to enable DB accounting also */
>> modparam("acc", "db_flag", 1)
>> modparam("acc", "db_missed_flag", 2)
>>
>>
>> # ----- usrloc params -----
>> modparam("usrloc", "db_mode",   0)
>> /* uncomment the following lines if you want to enable DB persistency
>>    for location entries */
>> modparam("usrloc", "db_mode",   2)
>> modparam("usrloc", "db_url",
>> "mysql://openser:openserrw@127.0.0.1/openser")
>>
>>
>> # ----- auth_db params -----
>> /* uncomment the following lines if you want to enable the DB based
>>    authentication */
>> modparam("auth_db", "calculate_ha1", yes)
>> modparam("auth_db", "password_column", "password")
>> modparam("auth_db", "db_url",
>> "mysql://openser:openserrw@127.0.0.1/openser")
>> modparam("auth_db", "load_credentials", "")
>>
>>
>> # ----- alias_db params -----
>> /* uncomment the following lines if you want to enable the DB based
>>    aliases */
>> #modparam("alias_db", "db_url",
>> # "mysql://opensips:opensipsrw@localhost/opensips")
>>
>>
>> # ----- domain params -----
>> /* uncomment the following lines to enable multi-domain detection
>>    support */
>> modparam("domain", "db_url", "mysql://openser:openserrw@127.0.0.1/openser")
>> modparam("domain", "db_mode", 1)   # Use caching
>>
>>
>> # ----- multi-module params -----
>> /* uncomment the following line if you want to enable multi-domain support
>>    in the modules (dafault off) */
>> modparam("alias_db|auth_db|usrloc|uri_db", "use_domain", 1)
>>
>>
>> # ----- presence params -----
>> /* uncomment the following lines if you want to enable presence */
>> #modparam("presence|presence_xml", "db_url",
>> "mysql://openser:openserrw@127.0.0.1/openser")
>> #modparam("presence_xml", "force_active", 1)
>> #modparam("presence", "server_address", "sip:74.85.27.9:5060")
>>
>>
>> # ----- nathelper params -----
>> #modparam("nathelper", "rtpproxy_disable", 1)
>> modparam("nathelper", "natping_interval", 0)
>> modparam("nathelper","received_avp","$avp(i:42)")
>>
>> #modparam("mediaproxy","natping_interval",30)
>> modparam("mediaproxy", "mediaproxy_socket",
>> "/var/run/mediaproxy/dispatcher.sock")
>>
>>
>>
>> ####### Routing Logic ########
>>
>>
>> # main request routing logic
>>
>> route{
>> if (!mf_process_maxfwd_header("10")) {
>> sl_send_reply("483","Too Many Hops");
>> exit;
>> }
>>
>> if (has_totag()) {
>> # sequential request withing a dialog should
>> # take the path determined by record-routing
>> if (loose_route()) {
>> if (is_method("BYE")) {
>> setflag(1); # do accounting ...
>> setflag(3); # ... even if the transaction fails
>> }
>> route(1);
>> } else {
>> /* uncomment the following lines if you want to enable presence */
>> ##if (is_method("SUBSCRIBE") && $rd == "your.server.ip.address") {
>> ## # in-dialog subscribe requests
>> ## route(2);
>> ## exit;
>> ##}
>> if ( is_method("ACK") ) {
>> if ( t_check_trans() ) {
>> # non loose-route, but stateful ACK; must be an ACK after a 487 or e.g.
>> 404 from upstream server
>> t_relay();
>> exit;
>> } else {
>> # ACK without matching transaction ... ignore and discard.\n");
>> exit;
>> }
>> }
>> sl_send_reply("404","Not here");
>> }
>> exit;
>> }
>>
>> #initial requests
>>
>> # CANCEL processing
>> if (is_method("CANCEL"))
>> {
>> if (t_check_trans())
>> t_relay();
>> exit;
>> }
>>
>> t_check_trans();
>>
>> # authenticate if from local subscriber (uncomment to enable auth)
>> ##if (!(method=="REGISTER") && from_uri==myself)
>> ##{
>> ## if (!proxy_authorize("", "subscriber")) {
>> ##  proxy_challenge("", "0");
>> ##  exit;
>> ## }
>> ## if (!check_from()) {
>> ##  sl_send_reply("403","Forbidden auth ID");
>> ##  exit;
>> ## }
>> ##
>> ## consume_credentials();
>> ## # caller authenticated
>> ##}
>>
>> # record routing
>> if (!is_method("REGISTER|MESSAGE"))
>> append_hf("P-hint: hello record routing\r\n");
>> record_route();
>>
>> # account only INVITEs
>> if (is_method("INVITE")) {
>> setflag(1); # do accounting
>> }
>> if (!uri==myself)
>> /* replace with following line if multi-domain support is used */
>> ##if (!is_uri_host_local())
>> {
>> append_hf("P-hint: outbound\r\n");
>> # if you have some interdomain connections via TLS
>> ##if($rd=="tls_domain1.net") {
>> ## t_relay("tls:domain1.net");
>> ## exit;
>> ##} else if($rd=="tls_domain2.net") {
>> ## t_relay("tls:domain2.net");
>> ## exit;
>> ##}
>> route(1);
>> }
>>
>> # requests for my domain
>>
>> /* uncomment this if you want to enable presence server
>>   and comment the next 'if' block
>>   NOTE: uncomment also the definition of route[2] from  below */
>> ##if( is_method("PUBLISH|SUBSCRIBE"))
>> ##  route(2);
>>
>> if (is_method("PUBLISH"))
>> {
>> append_hf("P-hint: outbound alias\r\n");
>> sl_send_reply("503", "Service sort of Unavailable");
>> exit;
>> }
>>
>>
>>
>>
>>
>>
>>
>>
>> if (is_method("REGISTER"))
>> {
>> # authenticate the REGISTER requests (uncomment to enable auth)
>> ##if (!www_authorize("", "subscriber"))
>> ##{
>> ## www_challenge("", "0");
>> ## exit;
>> ##}
>> ##
>> ##if (!check_to())
>> ##{
>> ## sl_send_reply("403","Forbidden auth ID");
>> ## exit;
>> ##}
>> append_hf("P-hint: hello register\r\n");
>> if (!search("^Contact:[ ]*\*")) {
>> setflag(6);
>> fix_nated_register();
>> force_rport();
>> };
>> if (!save("location"))
>> sl_reply_error();
>>
>> exit;
>> }
>>
>> if ($rU==NULL) {
>> # request with no Username in RURI
>> sl_send_reply("484","Address Incomplete");
>> exit;
>> }
>>
>> # apply DB based aliases (uncomment to enable)
>> ##alias_db_lookup("dbaliases");
>>
>> if (!lookup("location")) {
>> switch ($retcode) {
>> case -1:
>> case -3:
>> t_newtran();
>> t_reply("404", "Not Found");
>> exit;
>> case -2:
>> sl_send_reply("405", "Method Not Allowed");
>> exit;
>> }
>> }
>>
>> # when routing via usrloc, log the missed calls also
>> setflag(2);
>>
>> route(1);
>> }
>>
>> route[1] {
>> # for INVITEs enable some additional helper routes
>> if (is_method("INVITE")) {
>> ##  #use_media_proxy();
>> engage_media_proxy();
>> append_hf("P-hint: setflag7|forcerport|fix_contact\r\n");
>> t_on_branch("2");
>> t_on_reply("2");
>> t_on_failure("1");
>> }
>>
>> if (!t_relay()) {
>> sl_reply_error();
>> };
>> exit;
>> }
>>
>>
>> # Presence route
>> /* uncomment the whole following route for enabling presence
>>    NOTE: do not forget to enable the call of this route from the main
>>      route */
>> ##route[2]
>> ##{
>> ## if (!t_newtran())
>> ## {
>> ##  sl_reply_error();
>> ##  exit;
>> ## };
>> ##
>> ## if(is_method("PUBLISH"))
>> ## {
>> ##  handle_publish();
>> ##  t_release();
>> ## }
>> ## else
>> ## if( is_method("SUBSCRIBE"))
>> ## {
>> ##  handle_subscribe();
>> ##  t_release();
>> ## }
>> ##
>> ## exit;
>> ##}
>>
>>
>> branch_route[2] {
>> xlog("new branch at $ru\n");
>> }
>>
>>
>> onreply_route[2] {
>> ## use_media_proxy();
>> append_hf("P-hint: onreplyrout\r\n)");
>> xlog("incoming reply\n");
>> }
>>
>>
>> failure_route[1] {
>> if (t_was_cancelled()) {
>> exit;}
>>
>> # uncomment the following lines if you want to block client
>> # redirect based on 3xx replies.
>> ##if (t_check_status("3[0-9][0-9]")) {
>> ##t_reply("404","Not found");
>> ## exit;
>> ##}
>>
>> # uncomment the following lines if you want to redirect the failed
>> # calls to a different new destination
>> ##if (t_check_status("486|408")) {
>> ## sethostport("192.168.2.100:5060");
>> ## append_branch();
>> ## # do not set the missed call flag again
>> ## t_relay();
>> ##}
>> }
>>
>>
>>  
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Trouble getting mediaproxy to work (dialog module)

Bogdan-Andrei Iancu
Hi Jeff,

there is no dependency (as order) between engage_media_proxy()  and
create_dialog(). you can call them in whatever order.

there is no debug because engage_media_proxy() is simply setting a
flag...the action is done later in some calbacks.

Regards,
Bogdan

Jeff Pyle wrote:

> Hi Bogdan,
>
> Is there any reason that engage_media_proxy() has to run before
> create_dialog()?  If it's the other way around, engage_media_proxy() doesn't
> do anything, even at the highest debug level.
>
>
> - Jeff
>
>
>
> On 3/20/09 8:30 AM, "Bogdan-Andrei Iancu" <[hidden email]> wrote:
>
>  
>> Hi,
>>
>> Do you get something like this at statup:
>>     engage_media_proxy() will not work because the dialog module is not
>> loaded
>>
>> Regards,
>> Bogdan
>>
>>
>> slophoo wrote:
>>    
>>> Opensips trace returns the following error to me:
>>>
>>> ERROR:mediaproxy:EngageMediaProxy: engage_media_proxy requires the dialog
>>> module to be loaded and configured
>>>
>>> I have not needed the dialog module before, but have now loaded it and it
>>> required one parameter, so I copied that from the example as well.
>>>
>>> loadmodule "dialog.so"
>>> modparam("dialog", "dlg_flag",4)
>>>
>>> it seems to be loaded, but i still get the above error when making a call
>>> and mediaproxy is not used.  What am I missing?
>>>
>>> I'll post my entire opensips.cfg here in case it helps, maybe the issue is
>>> the order in which i call engage_media_proxy.  By the way, at the moment my
>>> goal is to get ALL calls to use mediaproxy just to verify that it works.
>>> Later I will work out the specific NAT situations where it is needed:
>>>
>>>
>>>
>>> #
>>> # $Id: opensips.cfg 4423 2008-06-27 10:25:01Z henningw $
>>> #
>>> # OpenSIPS basic configuration script
>>> #     by Anca Vamanu <[hidden email]>
>>> #
>>> # Please refer to the Core CookBook at
>>> http://www.opensips.org/dokuwiki/doku.php
>>> # for a explanation of possible statements, functions and parameters.
>>> # hhii
>>>
>>> ####### Global Parameters #########
>>>
>>> debug=3
>>> log_stderror=no
>>> log_facility=LOG_LOCAL0
>>>
>>> fork=yes
>>> children=4
>>>
>>> /* uncomment the following lines to enable debugging */
>>> debug=6
>>> #fork=no
>>> log_stderror=yes
>>>
>>> /* uncomment the next line to disable TCP (default on) */
>>> #disable_tcp=yes
>>>
>>> /* uncomment the next line to enable the auto temporary blacklisting of
>>>    not available destinations (default disabled) */
>>> #disable_dns_blacklist=no
>>>
>>> /* uncomment the next line to enable IPv6 lookup after IPv4 dns
>>>    lookup failures (default disabled) */
>>> #dns_try_ipv6=yes
>>>
>>> /* uncomment the next line to disable the auto discovery of local aliases
>>>    based on revers DNS on IPs (default on) */
>>> #auto_aliases=no
>>>
>>> /* uncomment the following lines to enable TLS support  (default off) */
>>> #disable_tls = no
>>> #listen = tls:your_IP:5061
>>> #tls_verify_server = 1
>>> #tls_verify_client = 1
>>> #tls_require_client_certificate = 0
>>> #tls_method = TLSv1
>>> #tls_certificate = "/usr/local/etc/opensips/tls/user/user-cert.pem"
>>> #tls_private_key = "/usr/local/etc/opensips/tls/user/user-privkey.pem"
>>> #tls_ca_list = "/usr/local/etc/opensips/tls/user/user-calist.pem"
>>>
>>>
>>> port=5060
>>>
>>> /* uncomment and configure the following line if you want opensips to
>>>    bind on a specific interface/port/proto (default bind on all available)
>>> */
>>> #listen=udp:192.168.1.2:5060
>>>
>>>
>>> ####### Modules Section ########
>>>
>>> #set module path
>>> mpath="/usr/local/lib/opensips/modules/"
>>>
>>> /* uncomment next line for MySQL DB support */
>>> loadmodule "db_mysql.so"
>>> loadmodule "sl.so"
>>> loadmodule "tm.so"
>>> loadmodule "rr.so"
>>> loadmodule "maxfwd.so"
>>> loadmodule "usrloc.so"
>>> loadmodule "registrar.so"
>>> loadmodule "textops.so"
>>> loadmodule "mi_fifo.so"
>>> loadmodule "uri_db.so"
>>> loadmodule "uri.so"
>>> loadmodule "xlog.so"
>>> loadmodule "dialog.so"
>>> loadmodule "acc.so"
>>> /* uncomment next lines for MySQL based authentication support
>>>    NOTE: a DB (like db_mysql) module must be also loaded */
>>> loadmodule "auth.so"
>>> loadmodule "auth_db.so"
>>> /* uncomment next line for aliases support
>>>    NOTE: a DB (like db_mysql) module must be also loaded */
>>> #loadmodule "alias_db.so"
>>> /* uncomment next line for multi-domain support
>>>    NOTE: a DB (like db_mysql) module must be also loaded
>>>    NOTE: be sure and enable multi-domain support in all used modules
>>>          (see "multi-module params" section ) */
>>> loadmodule "domain.so"
>>> /* uncomment the next two lines for presence server support
>>>    NOTE: a DB (like db_mysql) module must be also loaded */
>>> #loadmodule "presence.so"
>>> #loadmodule "presence_xml.so"
>>>
>>> loadmodule "nathelper.so"
>>> loadmodule "mediaproxy.so"
>>>
>>> # ----------------- setting module-specific parameters ---------------
>>>
>>>
>>> # ----- mi_fifo params -----
>>> modparam("mi_fifo", "fifo_name", "/tmp/opensips_fifo")
>>>
>>>
>>> # ----- rr params -----
>>> # add value to ;lr param to cope with most of the UAs
>>> modparam("rr", "enable_full_lr", 1)
>>> # do not append from tag to the RR (no need for this script)
>>> modparam("rr", "append_fromtag", 0)
>>>
>>>
>>> # ----- rr params -----
>>> modparam("registrar", "method_filtering", 1)
>>> /* uncomment the next line to disable parallel forking via location */
>>> # modparam("registrar", "append_branches", 0)
>>> /* uncomment the next line not to allow more than 10 contacts per AOR */
>>> modparam("registrar", "max_contacts", 10)
>>>
>>> # ----- uri_db params -----
>>> /* by default we disable the DB support in the module as we do not need it
>>>    in this configuration */
>>> modparam("uri_db", "use_uri_table", 0)
>>> modparam("uri_db", "db_url", "")
>>> modparam("registrar", "received_avp", "$avp(i:42)")
>>>
>>> modparam("dialog","dlg_flag",4)
>>>
>>>
>>> # ----- acc params -----
>>> /* what sepcial events should be accounted ? */
>>> modparam("acc", "early_media", 1)
>>> modparam("acc", "report_ack", 1)
>>> modparam("acc", "report_cancels", 1)
>>> /* by default ww do not adjust the direct of the sequential requests.
>>>    if you enable this parameter, be sure the enable "append_fromtag"
>>>    in "rr" module */
>>> modparam("acc", "detect_direction", 0)
>>> /* account triggers (flags) */
>>> modparam("acc", "failed_transaction_flag", 3)
>>> modparam("acc", "log_flag", 1)
>>> modparam("acc", "log_missed_flag", 2)
>>> /* uncomment the following lines to enable DB accounting also */
>>> modparam("acc", "db_flag", 1)
>>> modparam("acc", "db_missed_flag", 2)
>>>
>>>
>>> # ----- usrloc params -----
>>> modparam("usrloc", "db_mode",   0)
>>> /* uncomment the following lines if you want to enable DB persistency
>>>    for location entries */
>>> modparam("usrloc", "db_mode",   2)
>>> modparam("usrloc", "db_url",
>>> "mysql://openser:openserrw@127.0.0.1/openser")
>>>
>>>
>>> # ----- auth_db params -----
>>> /* uncomment the following lines if you want to enable the DB based
>>>    authentication */
>>> modparam("auth_db", "calculate_ha1", yes)
>>> modparam("auth_db", "password_column", "password")
>>> modparam("auth_db", "db_url",
>>> "mysql://openser:openserrw@127.0.0.1/openser")
>>> modparam("auth_db", "load_credentials", "")
>>>
>>>
>>> # ----- alias_db params -----
>>> /* uncomment the following lines if you want to enable the DB based
>>>    aliases */
>>> #modparam("alias_db", "db_url",
>>> # "mysql://opensips:opensipsrw@localhost/opensips")
>>>
>>>
>>> # ----- domain params -----
>>> /* uncomment the following lines to enable multi-domain detection
>>>    support */
>>> modparam("domain", "db_url", "mysql://openser:openserrw@127.0.0.1/openser")
>>> modparam("domain", "db_mode", 1)   # Use caching
>>>
>>>
>>> # ----- multi-module params -----
>>> /* uncomment the following line if you want to enable multi-domain support
>>>    in the modules (dafault off) */
>>> modparam("alias_db|auth_db|usrloc|uri_db", "use_domain", 1)
>>>
>>>
>>> # ----- presence params -----
>>> /* uncomment the following lines if you want to enable presence */
>>> #modparam("presence|presence_xml", "db_url",
>>> "mysql://openser:openserrw@127.0.0.1/openser")
>>> #modparam("presence_xml", "force_active", 1)
>>> #modparam("presence", "server_address", "sip:74.85.27.9:5060")
>>>
>>>
>>> # ----- nathelper params -----
>>> #modparam("nathelper", "rtpproxy_disable", 1)
>>> modparam("nathelper", "natping_interval", 0)
>>> modparam("nathelper","received_avp","$avp(i:42)")
>>>
>>> #modparam("mediaproxy","natping_interval",30)
>>> modparam("mediaproxy", "mediaproxy_socket",
>>> "/var/run/mediaproxy/dispatcher.sock")
>>>
>>>
>>>
>>> ####### Routing Logic ########
>>>
>>>
>>> # main request routing logic
>>>
>>> route{
>>> if (!mf_process_maxfwd_header("10")) {
>>> sl_send_reply("483","Too Many Hops");
>>> exit;
>>> }
>>>
>>> if (has_totag()) {
>>> # sequential request withing a dialog should
>>> # take the path determined by record-routing
>>> if (loose_route()) {
>>> if (is_method("BYE")) {
>>> setflag(1); # do accounting ...
>>> setflag(3); # ... even if the transaction fails
>>> }
>>> route(1);
>>> } else {
>>> /* uncomment the following lines if you want to enable presence */
>>> ##if (is_method("SUBSCRIBE") && $rd == "your.server.ip.address") {
>>> ## # in-dialog subscribe requests
>>> ## route(2);
>>> ## exit;
>>> ##}
>>> if ( is_method("ACK") ) {
>>> if ( t_check_trans() ) {
>>> # non loose-route, but stateful ACK; must be an ACK after a 487 or e.g.
>>> 404 from upstream server
>>> t_relay();
>>> exit;
>>> } else {
>>> # ACK without matching transaction ... ignore and discard.\n");
>>> exit;
>>> }
>>> }
>>> sl_send_reply("404","Not here");
>>> }
>>> exit;
>>> }
>>>
>>> #initial requests
>>>
>>> # CANCEL processing
>>> if (is_method("CANCEL"))
>>> {
>>> if (t_check_trans())
>>> t_relay();
>>> exit;
>>> }
>>>
>>> t_check_trans();
>>>
>>> # authenticate if from local subscriber (uncomment to enable auth)
>>> ##if (!(method=="REGISTER") && from_uri==myself)
>>> ##{
>>> ## if (!proxy_authorize("", "subscriber")) {
>>> ##  proxy_challenge("", "0");
>>> ##  exit;
>>> ## }
>>> ## if (!check_from()) {
>>> ##  sl_send_reply("403","Forbidden auth ID");
>>> ##  exit;
>>> ## }
>>> ##
>>> ## consume_credentials();
>>> ## # caller authenticated
>>> ##}
>>>
>>> # record routing
>>> if (!is_method("REGISTER|MESSAGE"))
>>> append_hf("P-hint: hello record routing\r\n");
>>> record_route();
>>>
>>> # account only INVITEs
>>> if (is_method("INVITE")) {
>>> setflag(1); # do accounting
>>> }
>>> if (!uri==myself)
>>> /* replace with following line if multi-domain support is used */
>>> ##if (!is_uri_host_local())
>>> {
>>> append_hf("P-hint: outbound\r\n");
>>> # if you have some interdomain connections via TLS
>>> ##if($rd=="tls_domain1.net") {
>>> ## t_relay("tls:domain1.net");
>>> ## exit;
>>> ##} else if($rd=="tls_domain2.net") {
>>> ## t_relay("tls:domain2.net");
>>> ## exit;
>>> ##}
>>> route(1);
>>> }
>>>
>>> # requests for my domain
>>>
>>> /* uncomment this if you want to enable presence server
>>>   and comment the next 'if' block
>>>   NOTE: uncomment also the definition of route[2] from  below */
>>> ##if( is_method("PUBLISH|SUBSCRIBE"))
>>> ##  route(2);
>>>
>>> if (is_method("PUBLISH"))
>>> {
>>> append_hf("P-hint: outbound alias\r\n");
>>> sl_send_reply("503", "Service sort of Unavailable");
>>> exit;
>>> }
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> if (is_method("REGISTER"))
>>> {
>>> # authenticate the REGISTER requests (uncomment to enable auth)
>>> ##if (!www_authorize("", "subscriber"))
>>> ##{
>>> ## www_challenge("", "0");
>>> ## exit;
>>> ##}
>>> ##
>>> ##if (!check_to())
>>> ##{
>>> ## sl_send_reply("403","Forbidden auth ID");
>>> ## exit;
>>> ##}
>>> append_hf("P-hint: hello register\r\n");
>>> if (!search("^Contact:[ ]*\*")) {
>>> setflag(6);
>>> fix_nated_register();
>>> force_rport();
>>> };
>>> if (!save("location"))
>>> sl_reply_error();
>>>
>>> exit;
>>> }
>>>
>>> if ($rU==NULL) {
>>> # request with no Username in RURI
>>> sl_send_reply("484","Address Incomplete");
>>> exit;
>>> }
>>>
>>> # apply DB based aliases (uncomment to enable)
>>> ##alias_db_lookup("dbaliases");
>>>
>>> if (!lookup("location")) {
>>> switch ($retcode) {
>>> case -1:
>>> case -3:
>>> t_newtran();
>>> t_reply("404", "Not Found");
>>> exit;
>>> case -2:
>>> sl_send_reply("405", "Method Not Allowed");
>>> exit;
>>> }
>>> }
>>>
>>> # when routing via usrloc, log the missed calls also
>>> setflag(2);
>>>
>>> route(1);
>>> }
>>>
>>> route[1] {
>>> # for INVITEs enable some additional helper routes
>>> if (is_method("INVITE")) {
>>> ##  #use_media_proxy();
>>> engage_media_proxy();
>>> append_hf("P-hint: setflag7|forcerport|fix_contact\r\n");
>>> t_on_branch("2");
>>> t_on_reply("2");
>>> t_on_failure("1");
>>> }
>>>
>>> if (!t_relay()) {
>>> sl_reply_error();
>>> };
>>> exit;
>>> }
>>>
>>>
>>> # Presence route
>>> /* uncomment the whole following route for enabling presence
>>>    NOTE: do not forget to enable the call of this route from the main
>>>      route */
>>> ##route[2]
>>> ##{
>>> ## if (!t_newtran())
>>> ## {
>>> ##  sl_reply_error();
>>> ##  exit;
>>> ## };
>>> ##
>>> ## if(is_method("PUBLISH"))
>>> ## {
>>> ##  handle_publish();
>>> ##  t_release();
>>> ## }
>>> ## else
>>> ## if( is_method("SUBSCRIBE"))
>>> ## {
>>> ##  handle_subscribe();
>>> ##  t_release();
>>> ## }
>>> ##
>>> ## exit;
>>> ##}
>>>
>>>
>>> branch_route[2] {
>>> xlog("new branch at $ru\n");
>>> }
>>>
>>>
>>> onreply_route[2] {
>>> ## use_media_proxy();
>>> append_hf("P-hint: onreplyrout\r\n)");
>>> xlog("incoming reply\n");
>>> }
>>>
>>>
>>> failure_route[1] {
>>> if (t_was_cancelled()) {
>>> exit;}
>>>
>>> # uncomment the following lines if you want to block client
>>> # redirect based on 3xx replies.
>>> ##if (t_check_status("3[0-9][0-9]")) {
>>> ##t_reply("404","Not found");
>>> ## exit;
>>> ##}
>>>
>>> # uncomment the following lines if you want to redirect the failed
>>> # calls to a different new destination
>>> ##if (t_check_status("486|408")) {
>>> ## sethostport("192.168.2.100:5060");
>>> ## append_branch();
>>> ## # do not set the missed call flag again
>>> ## t_relay();
>>> ##}
>>> }
>>>
>>>
>>>  
>>>      
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>    
>
>
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Trouble getting mediaproxy to work (dialog module)

slophoo
In reply to this post by Bogdan-Andrei Iancu
to answer this question:

Do you get something like this at statup:
    engage_media_proxy() will not work because the dialog module is not loaded?

I used to get that message at startup until I included the loadmodule "dialog.so" i do not get that at startup.  The error I get seem to be only when I place a call and it's working through the routing.
Reply | Threaded
Open this post in threaded view
|

Re: Trouble getting mediaproxy to work (dialog module)

Bogdan-Andrei Iancu
That is strange - the detection at startup works, but failes at runtime ..

Dan, any idea?

Regards,
Bogdan

slophoo wrote:

> to answer this question:
>
> Do you get something like this at statup:
>     engage_media_proxy() will not work because the dialog module is not
> loaded?
>
> I used to get that message at startup until I included the loadmodule
> "dialog.so" i do not get that at startup.  The error I get seem to be only
> when I place a call and it's working through the routing.
>
>  


_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Trouble getting mediaproxy to work (dialog module)

slophoo
I guess what I may be missing (and i have now read many of yours and others posts on create_dialog) - is create_dialog() something I need to manually add to my opensips.cfg ?  I've loaded the module dialog.so but only because the error messages told me it was missing - i have no knowledge of my need for it otherwise.  

I've ready several posts that describe a change in the way dialogs worked between 1.4.x and 1.5.x of opensips, and I am still on 1.4.x.  When i tried just adding create_dialog(); in my invitation route, it gave bad config file errors on startup that create_dialog was not found.  

If anyone has any simple examples (opensips.cfg or other tips) of how to use mediaproxy and force it on all calls using 1.4.x i'd be very grateful as I am pulling my hair out on this one!  


Reply | Threaded
Open this post in threaded view
|

Re: Trouble getting mediaproxy to work (dialog module)

Dan Pascu
In reply to this post by Bogdan-Andrei Iancu
On Friday 20 March 2009, Bogdan-Andrei Iancu wrote:
> That is strange - the detection at startup works, but failes at runtime
> ..
>
> Dan, any idea?

The report is confusing. That message can only be given if the dialog
module is not loaded. So my guess is that after the dialog module was
added to the config a different message was given, but it was not pasted
here, instead he said it's the same message. However according to the
code that cannot be. Also the report said another confusing thing about
getting this when _not_ using mediaproxy. Unless the poster pastes the
syslog entries here to have a proper report where we can see the real
messages, I cannot debug this from descriptions.

The only thing which is wrong with the config is that it seems to call
engage_media_proxy() for re-INVITEs, not for the initial INVITEs. The
poster should read the documentation because it clearly describes how to
use the function with examples. However doing so should not result in the
error message he claims. It should most likely have no effect because
it's too late for engage_media_proxy to do anything at that point.

>
> Regards,
> Bogdan
>
> slophoo wrote:
> > to answer this question:
> >
> > Do you get something like this at statup:
> >     engage_media_proxy() will not work because the dialog module is
> > not loaded?
> >
> > I used to get that message at startup until I included the loadmodule
> > "dialog.so" i do not get that at startup.  The error I get seem to be
> > only when I place a call and it's working through the routing.



--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Trouble getting mediaproxy to work (dialog module)

slophoo
I should say first that I am rather new to this, and am positive the mistake is mine, just don't know what it is.  The dialog module does load ok in startup, i guess i will post my startup debug here to show that. I've looked at the documentation for engage_media_proxy (saying "This needs to be called only once for the first INVITE in a dialog.") and despite reading the documentation for dialog module, I still am missing something.  Is a dialog something i am supposed to create/setup before I can use mediaproxy --  Or is it something i am automatically in when making a call?

-----------SELECTED LINES from STARTUP LOG ------------ENTIRE LOG POSTED AT END of POST-----
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/dialog.so
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: dialog matches module dialog
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <dlg_flag> in module dialog [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module dialog
Mar 20 14:56:22 [4818] INFO:dialog:mod_init: Dialog module - initializing
Mar 20 14:56:22 [4818] DBG:core:init_mod: registering stats for dialog
Mar 20 14:56:22 [4818] DBG:core:init_mod: register MI for dialog
Mar 20 14:56:22 [4818] DBG:core:find_cmd_export_t: found <load_dlg>(0) in module dialog [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4818] DBG:core:find_param_export: found <dlg_flag> in module dialog [/usr/local/lib/opensips/modules/]


Then when a call is placed, I get the error:

ERROR:mediaproxy:EngageMediaProxy: engage_media_proxy requires the dialog module to be loaded and configured

-------------HERE is the error in context: ----------------------------
root@sfsip:/usr/local/lib/opensips/modules#
root@sfsip:/usr/local/lib/opensips/modules#
root@sfsip:/usr/local/lib/opensips/modules# Mar 20 15:00:39 [4198] DBG:core:parse_msg: SIP Request:
Mar 20 15:00:39 [4198] DBG:core:parse_msg:  method:  <INVITE> 
Mar 20 15:00:39 [4198] DBG:core:parse_msg:  uri:     <sip:4030@10.1.100.18> 
Mar 20 15:00:39 [4198] DBG:core:parse_msg:  version: <SIP/2.0> 
Mar 20 15:00:39 [4198] DBG:core:parse_headers: flags=2
Mar 20 15:00:39 [4198] DBG:core:parse_via_param: found param type 232, <branch> = <z9hG4bK-d87543-cb64ea47ca0cf24a-1--d87543->; state=6
Mar 20 15:00:39 [4198] DBG:core:parse_via_param: found param type 235, <rport> = <n/a>; state=17
Mar 20 15:00:39 [4198] DBG:core:parse_via: end of header reached, state=5
Mar 20 15:00:39 [4198] DBG:core:parse_headers: via found, flags=2
Mar 20 15:00:39 [4198] DBG:core:parse_headers: this is the first via
Mar 20 15:00:39 [4198] DBG:core:receive_msg: After parse_msg...
Mar 20 15:00:39 [4198] DBG:core:receive_msg: preparing to run routing scripts...
Mar 20 15:00:39 [4198] DBG:core:parse_headers: flags=100
Mar 20 15:00:39 [4198] DBG:maxfwd:is_maxfwd_present: value = 70
Mar 20 15:00:39 [4198] DBG:core:parse_headers: flags=8
Mar 20 15:00:39 [4198] DBG:core:parse_to: end of header reached, state=10
Mar 20 15:00:39 [4198] DBG:core:parse_to: display={"4030"}, ruri={sip:4030@10.1.100.18}
Mar 20 15:00:39 [4198] DBG:core:get_hdr_field: <To> [30]; uri=[sip:4030@10.1.100.18]
Mar 20 15:00:39 [4198] DBG:core:get_hdr_field: to body ["4030"<sip:4030@10.1.100.18> 
]
Mar 20 15:00:39 [4198] DBG:uri:has_totag: no totag
Mar 20 15:00:39 [4198] DBG:core:parse_headers: flags=78
Mar 20 15:00:39 [4198] DBG:core:get_hdr_field: cseq <CSeq>: <1> <INVITE> 
Mar 20 15:00:39 [4198] DBG:tm:t_lookup_request: start searching: hash=260, isACK=0
Mar 20 15:00:39 [4198] DBG:tm:matching_3261: RFC3261 transaction matching failed
Mar 20 15:00:39 [4198] DBG:tm:t_lookup_request: no transaction found
Mar 20 15:00:39 [4198] DBG:core:parse_headers: flags=ffffffffffffffff
Mar 20 15:00:39 [4198] DBG:core:get_hdr_field: content_length=421
Mar 20 15:00:39 [4198] DBG:core:get_hdr_field: found end of header
Mar 20 15:00:39 [4198] DBG:core:grep_sock_info: checking if host==us: 11==9 &&  [10.1.100.18] == [127.0.0.1]
Mar 20 15:00:39 [4198] DBG:core:grep_sock_info: checking if port 5060 matches port 5060
Mar 20 15:00:39 [4198] DBG:core:grep_sock_info: checking if host==us: 11==11 &&  [10.1.100.18] == [10.1.100.18]
Mar 20 15:00:39 [4198] DBG:core:grep_sock_info: checking if port 5060 matches port 5060
Mar 20 15:00:39 [4198] DBG:core:rewrite_uri: rewriting Request-URI with 'sip:4030@192.168.1.94:5060;transport=UDP'
Mar 20 15:00:39 [4198] ERROR:mediaproxy:EngageMediaProxy: engage_media_proxy requires the dialog module to be loaded and configured
Mar 20 15:00:39 [4198] DBG:core:parse_headers: flags=ffffffffffffffff
Mar 20 15:00:39 [4198] DBG:tm:t_newtran: transaction on entrance=(nil)
-------------END of error in context ----------------------------





-------------------ENTIRE STARTUP DEBUG LOG STARTS HERE--------------------------------
root@sfsip:/usr/local/lib/opensips/modules#
root@sfsip:/usr/local/lib/opensips/modules# opensips start
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/db_mysql.so
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/sl.so
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/tm.so
Mar 20 14:56:22 [4816] DBG:core:register_module: register_pv: tm
Mar 20 14:56:22 [4816] DBG:core:pv_add_extra: extra items list is not initialized
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/rr.so
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/maxfwd.so
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/usrloc.so
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/registrar.so
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/textops.so
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/mi_fifo.so
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/uri_db.so
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/uri.so
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/xlog.so
Mar 20 14:56:22 [4816] DBG:core:register_module: register_pv: xlog
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/dialog.so
Mar 20 14:56:22 [4816] DBG:core:register_module: register_pv: dialog
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/acc.so
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/auth.so
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/auth_db.so
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/domain.so
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/nathelper.so
Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module /usr/local/lib/opensips/modules/mediaproxy.so
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: mi_fifo matches module mi_fifo
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <fifo_name> in module mi_fifo [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: rr matches module rr
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <enable_full_lr> in module rr [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: rr matches module rr
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <append_fromtag> in module rr [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: registrar matches module registrar
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <method_filtering> in module registrar [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: registrar matches module registrar
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <max_contacts> in module registrar [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: uri_db matches module uri_db
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <use_uri_table> in module uri_db [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: uri_db matches module uri_db
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <db_url> in module uri_db [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: registrar matches module registrar
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <received_avp> in module registrar [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: dialog matches module dialog
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <dlg_flag> in module dialog [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: acc matches module acc
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <early_media> in module acc [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: acc matches module acc
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <report_ack> in module acc [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: acc matches module acc
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <report_cancels> in module acc [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: acc matches module acc
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <detect_direction> in module acc [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: acc matches module acc
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <failed_transaction_flag> in module acc [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: acc matches module acc
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <log_flag> in module acc [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: acc matches module acc
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <log_missed_flag> in module acc [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: acc matches module acc
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <db_flag> in module acc [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: acc matches module acc
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <db_missed_flag> in module acc [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: usrloc matches module usrloc
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <db_mode> in module usrloc [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: usrloc matches module usrloc
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <db_mode> in module usrloc [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: usrloc matches module usrloc
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <db_url> in module usrloc [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: auth_db matches module auth_db
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <calculate_ha1> in module auth_db [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: auth_db matches module auth_db
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <password_column> in module auth_db [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: auth_db matches module auth_db
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <db_url> in module auth_db [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: auth_db matches module auth_db
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <load_credentials> in module auth_db [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: domain matches module domain
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <db_url> in module domain [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: domain matches module domain
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <db_mode> in module domain [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: alias_db|auth_db|usrloc|uri_db matches module auth_db
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <use_domain> in module auth_db [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: alias_db|auth_db|usrloc|uri_db matches module uri_db
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <use_domain> in module uri_db [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: alias_db|auth_db|usrloc|uri_db matches module usrloc
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <use_domain> in module usrloc [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: nathelper matches module nathelper
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <natping_interval> in module nathelper [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: nathelper matches module nathelper
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <received_avp> in module nathelper [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: mediaproxy matches module mediaproxy
Mar 20 14:56:22 [4816] DBG:core:set_mod_param_regex: found <mediaproxy_socket> in module mediaproxy [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <mf_process_maxfwd_header>(1) in module maxfwd [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <sl_send_reply>(2) in module sl [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <has_totag>(0) in module uri [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <loose_route>(0) in module rr [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <is_method>(1) in module textops [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <is_method>(1) in module textops [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <t_check_trans>(0) in module tm [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <t_relay>(0) in module tm [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <sl_send_reply>(2) in module sl [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <is_method>(1) in module textops [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <t_check_trans>(0) in module tm [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <t_relay>(0) in module tm [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <t_check_trans>(0) in module tm [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <is_method>(1) in module textops [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <append_hf>(1) in module textops [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <engage_media_proxy>(0) in module mediaproxy [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <record_route>(0) in module rr [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <is_method>(1) in module textops [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <append_hf>(1) in module textops [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <is_method>(1) in module textops [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <append_hf>(1) in module textops [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <sl_send_reply>(2) in module sl [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <is_method>(1) in module textops [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <append_hf>(1) in module textops [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <search>(1) in module textops [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <fix_nated_register>(0) in module nathelper [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <save>(1) in module registrar [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <sl_reply_error>(0) in module sl [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <sl_send_reply>(2) in module sl [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <lookup>(1) in module registrar [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <t_newtran>(0) in module tm [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <t_reply>(2) in module tm [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <sl_send_reply>(2) in module sl [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <is_method>(1) in module textops [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <engage_media_proxy>(0) in module mediaproxy [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <append_hf>(1) in module textops [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <t_on_branch>(1) in module tm [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <t_on_reply>(1) in module tm [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <t_on_failure>(1) in module tm [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <t_relay>(0) in module tm [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <sl_reply_error>(0) in module sl [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <xlog>(1) in module xlog [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <append_hf>(1) in module textops [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <xlog>(1) in module xlog [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:find_cmd_export_t: found <t_was_cancelled>(0) in module tm [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4816] DBG:core:socket2str: <udp:127.0.0.1:5060> 
Mar 20 14:56:22 [4816] DBG:core:socket2str: <udp:10.1.100.18:5060> 
Mar 20 14:56:22 [4816] DBG:core:socket2str: <tcp:127.0.0.1:5060> 
Mar 20 14:56:22 [4816] DBG:core:socket2str: <tcp:10.1.100.18:5060> 
Listening on
             udp: 127.0.0.1 [127.0.0.1]:5060
             udp: 10.1.100.18 [10.1.100.18]:5060
             tcp: 127.0.0.1 [127.0.0.1]:5060
             tcp: 10.1.100.18 [10.1.100.18]:5060
Aliases:
             tcp: sfsip:5060
             tcp: sfsip.globalip.int:5060
             tcp: localhost:5060
             udp: sfsip:5060
             udp: sfsip.globalip.int:5060
             udp: localhost:5060

Mar 20 14:56:22 [4816] DBG:core:fm_malloc_init: F_OPTIMIZE=16384, /ROUNDTO=2048
Mar 20 14:56:22 [4816] DBG:core:fm_malloc_init: F_HASH_SIZE=2067, fm_block size=16560
Mar 20 14:56:22 [4816] DBG:core:fm_malloc_init: params (0xb597b000, 33554432), start=0xb597b000
Mar 20 14:56:22 [4816] DBG:core:shm_mem_init_mallocs: success
Mar 20 14:56:22 [4816] INFO:core:init_tcp: using epoll_lt as the TCP io watch method (auto detected)
Mar 20 14:56:22 [4818] DBG:core:set_core_dump: core dump limits set to 4294967295
Mar 20 14:56:22 [4818] NOTICE:core:main: version: opensips 1.4.4-notls (i386/linux)
Mar 20 14:56:22 [4818] INFO:core:main: using 32 Mb shared memory
Mar 20 14:56:22 [4818] INFO:core:main: using 1 Mb private memory per process
Mar 20 14:56:22 [4818] DBG:core:add_avp_galias: registering <serial_branch> for avp id <16725044>
Mar 20 14:56:22 [4818] DBG:core:init_stats_collector: statistics manager successfully initialized
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module db_mysql
Mar 20 14:56:22 [4818] DBG:db_mysql:mysql_mod_init: mysql: MySQL client version is 5.0.67
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module sl
Mar 20 14:56:22 [4818] INFO:sl:mod_init: Initializing StateLess engine
Mar 20 14:56:22 [4818] DBG:core:MD5StringArray: MD5 calculated: c97b4d1cb1f3d0da549e06a8d482ef63
Mar 20 14:56:22 [4818] DBG:core:init_mod: registering stats for sl
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module tm
Mar 20 14:56:22 [4818] INFO:tm:mod_init: TM - initializing...
Mar 20 14:56:22 [4818] DBG:tm:init_callid: Call-ID initialization: '7ffbe7db'
Mar 20 14:56:22 [4818] DBG:tm:lock_initialize: lock initialization started
Mar 20 14:56:22 [4818] DBG:core:MD5StringArray: MD5 calculated: 533cb9e91f4b999cf76861cbb9ed54ed
root@sfsip:/usr/local/lib/opensips/modules# Mar 20 14:56:22 [4818] DBG:core:MD5StringArray: MD5 calculated: 155c340f586c28d0300cf5a6ccf90d99
Mar 20 14:56:22 [4818] DBG:core:init_mod: registering stats for tm
Mar 20 14:56:22 [4818] DBG:core:init_mod: register MI for tm
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module rr
Mar 20 14:56:22 [4818] DBG:rr:mod_init: rr - initializing
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module maxfwd
Mar 20 14:56:22 [4818] INFO:maxfwd:mod_init: initializing...
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module usrloc
Mar 20 14:56:22 [4818] DBG:usrloc:mod_init: initializing
Mar 20 14:56:22 [4818] INFO:usrloc:ul_init_locks: locks array size 512
Mar 20 14:56:22 [4818] DBG:core:find_mod_export: found <db_bind_api> in module db_mysql [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4818] DBG:core:db_bind_mod: using db bind api for db_mysql
Mar 20 14:56:22 [4818] DBG:core:init_mod: registering stats for usrloc
Mar 20 14:56:22 [4818] DBG:core:init_mod: register MI for usrloc
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module registrar
Mar 20 14:56:22 [4818] INFO:registrar:mod_init: initializing...
Mar 20 14:56:22 [4818] DBG:core:find_cmd_export_t: found <load_sl>(0) in module sl [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4818] DBG:core:find_cmd_export_t: found <ul_bind_usrloc>(1) in module usrloc [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4818] DBG:core:init_mod: registering stats for registrar
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module textops
Mar 20 14:56:22 [4818] INFO:textops:mod_init: initializing...
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module mi_fifo
Mar 20 14:56:22 [4818] DBG:mi_fifo:mi_mod_init: testing fifo existance ...
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module uri_db
Mar 20 14:56:22 [4818] DBG:uri_db:mod_init: uri_db - initializing
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module xlog
Mar 20 14:56:22 [4818] INFO:xlog:mod_init: initializing...
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module dialog
Mar 20 14:56:22 [4818] INFO:dialog:mod_init: Dialog module - initializing
Mar 20 14:56:22 [4818] DBG:core:find_cmd_export_t: found <load_tm>(0) in module tm [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4818] DBG:core:find_cmd_export_t: found <load_rr>(0) in module rr [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4818] DBG:core:init_mod: registering stats for dialog
Mar 20 14:56:22 [4818] DBG:core:init_mod: register MI for dialog
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module acc
Mar 20 14:56:22 [4818] INFO:acc:mod_init: initializing...
Mar 20 14:56:22 [4818] DBG:core:find_cmd_export_t: found <load_tm>(0) in module tm [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module auth
Mar 20 14:56:22 [4818] INFO:auth:mod_init: initializing...
Mar 20 14:56:22 [4818] DBG:core:find_cmd_export_t: found <load_sl>(0) in module sl [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module auth_db
Mar 20 14:56:22 [4818] INFO:auth_db:mod_init: initializing...
Mar 20 14:56:22 [4818] DBG:core:find_mod_export: found <db_bind_api> in module db_mysql [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4818] DBG:core:db_bind_mod: using db bind api for db_mysql
Mar 20 14:56:22 [4818] DBG:core:find_cmd_export_t: found <bind_auth>(0) in module auth [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4818] DBG:core:find_cmd_export_t: found <load_sl>(0) in module sl [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module domain
Mar 20 14:56:22 [4818] DBG:domain:mod_init: Initializing
Mar 20 14:56:22 [4818] DBG:core:find_mod_export: found <db_bind_api> in module db_mysql [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4818] DBG:core:db_bind_mod: using db bind api for db_mysql
Mar 20 14:56:22 [4818] DBG:core:db_do_init: connection 0x8191328 not found in pool
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_new_connection: opening connection: mysql://xxxx:xxxx@127.0.0.1/openser
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_new_connection: connection type is 127.0.0.1 via TCP/IP
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_new_connection: protocol version is 10
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_new_connection: server version is 5.0.67-0ubuntu6
Mar 20 14:56:22 [4818] DBG:core:db_new_result: allocate 28 bytes for result set at 0x81913e8
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_get_columns: 1 columns returned from the query
Mar 20 14:56:22 [4818] DBG:core:db_allocate_columns: allocate 4 bytes for result names at 0x8191430
Mar 20 14:56:22 [4818] DBG:core:db_allocate_columns: allocate 4 bytes for result types at 0x8191440
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_get_columns: allocate 8 bytes for RES_NAMES[0] at 0x8191450
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x8191450)[0]=[table_version]
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_get_columns: use DB_INT result type
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_convert_rows: allocate 8 bytes for rows at 0x8191460
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_convert_row: allocate 20 bytes for row values at 0x8191470
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_str2val: converting INT [1]
Mar 20 14:56:22 [4818] DBG:core:db_free_columns: freeing 1 columns
Mar 20 14:56:22 [4818] DBG:core:db_free_columns: freeing RES_NAMES[0] at 0x8191450
Mar 20 14:56:22 [4818] DBG:core:db_free_columns: freeing result names at 0x8191430
Mar 20 14:56:22 [4818] DBG:core:db_free_columns: freeing result types at 0x8191440
Mar 20 14:56:22 [4818] DBG:core:db_free_rows: freeing 1 rows
Mar 20 14:56:22 [4818] DBG:core:db_free_row: freeing row values at 0x8191470
Mar 20 14:56:22 [4818] DBG:core:db_free_rows: freeing rows at 0x8191460
Mar 20 14:56:22 [4818] DBG:core:db_free_result: freeing result set at 0x81913e8
Mar 20 14:56:22 [4818] DBG:core:db_new_result: allocate 28 bytes for result set at 0x81913e8
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_get_columns: 1 columns returned from the query
Mar 20 14:56:22 [4818] DBG:core:db_allocate_columns: allocate 4 bytes for result names at 0x8191460
Mar 20 14:56:22 [4818] DBG:core:db_allocate_columns: allocate 4 bytes for result types at 0x8191440
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_get_columns: allocate 8 bytes for RES_NAMES[0] at 0x8191430
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x8191430)[0]=[domain]
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_convert_rows: no rows returned from the query
Mar 20 14:56:22 [4818] DBG:domain:reload_domain_table: Number of rows in domain table: 0
Mar 20 14:56:22 [4818] DBG:core:db_free_columns: freeing 1 columns
Mar 20 14:56:22 [4818] DBG:core:db_free_columns: freeing RES_NAMES[0] at 0x8191430
Mar 20 14:56:22 [4818] DBG:core:db_free_columns: freeing result names at 0x8191460
Mar 20 14:56:22 [4818] DBG:core:db_free_columns: freeing result types at 0x8191440
Mar 20 14:56:22 [4818] DBG:core:db_free_rows: freeing 0 rows
Mar 20 14:56:22 [4818] DBG:core:db_free_result: freeing result set at 0x81913e8
Mar 20 14:56:22 [4818] DBG:core:pool_remove: removing connection from the pool
Mar 20 14:56:22 [4818] DBG:core:init_mod: register MI for domain
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module nathelper
Mar 20 14:56:22 [4818] DBG:core:init_mod: register MI for nathelper
Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module mediaproxy
Mar 20 14:56:22 [4818] DBG:core:find_cmd_export_t: found <load_dlg>(0) in module dialog [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4818] DBG:core:find_param_export: found <dlg_flag> in module dialog [/usr/local/lib/opensips/modules/]
Mar 20 14:56:22 [4818] DBG:core:count_module_procs: modules require 1 extra processes
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing mf_process_maxfwd_header, line 210
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing sl_send_reply, line 211
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing has_totag, line 215
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing loose_route, line 218
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing is_method, line 219
Mar 20 14:56:22 [4818] DBG:core:parse_methods: methods 0x8
Mar 20 14:56:22 [4818] DBG:textops:fixup_method: using id for method [BYE/8]
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing is_method, line 231
Mar 20 14:56:22 [4818] DBG:core:parse_methods: methods 0x4
Mar 20 14:56:22 [4818] DBG:textops:fixup_method: using id for method [ACK/4]
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing t_check_trans, line 232
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing t_relay, line 234
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing sl_send_reply, line 241
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing is_method, line 249
Mar 20 14:56:22 [4818] DBG:core:parse_methods: methods 0x2
Mar 20 14:56:22 [4818] DBG:textops:fixup_method: using id for method [CANCEL/2]
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing t_check_trans, line 251
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing t_relay, line 252
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing t_check_trans, line 256
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing is_method, line 275
Mar 20 14:56:22 [4818] DBG:core:parse_methods: methods 0x180
Mar 20 14:56:22 [4818] DBG:textops:fixup_method: using id for methods [REGISTER,MESSAGE/384]
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing append_hf, line 276
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing engage_media_proxy, line 277
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing record_route, line 278
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing is_method, line 281
Mar 20 14:56:22 [4818] DBG:core:parse_methods: methods 0x1
Mar 20 14:56:22 [4818] DBG:textops:fixup_method: using id for method [INVITE/1]
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing append_hf, line 288
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing is_method, line 308
Mar 20 14:56:22 [4818] DBG:core:parse_methods: methods 0x2000
Mar 20 14:56:22 [4818] DBG:textops:fixup_method: using id for method [PUBLISH/8192]
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing append_hf, line 310
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing sl_send_reply, line 311
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing is_method, line 322
Mar 20 14:56:22 [4818] DBG:core:parse_methods: methods 0x80
Mar 20 14:56:22 [4818] DBG:textops:fixup_method: using id for method [REGISTER/128]
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing append_hf, line 336
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing search, line 337
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing fix_nated_register, line 339
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing save, line 342
Mar 20 14:56:22 [4818] DBG:core:db_do_init: connection 0x8191580 not found in pool
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_new_connection: opening connection: mysql://xxxx:xxxx@127.0.0.1/openser
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_new_connection: connection type is 127.0.0.1 via TCP/IP
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_new_connection: protocol version is 10
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_new_connection: server version is 5.0.67-0ubuntu6
Mar 20 14:56:22 [4818] DBG:core:db_new_result: allocate 28 bytes for result set at 0x818e388
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_get_columns: 1 columns returned from the query
Mar 20 14:56:22 [4818] DBG:core:db_allocate_columns: allocate 4 bytes for result names at 0x81915e8
Mar 20 14:56:22 [4818] DBG:core:db_allocate_columns: allocate 4 bytes for result types at 0x81915f8
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_get_columns: allocate 8 bytes for RES_NAMES[0] at 0x8191608
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x8191608)[0]=[table_version]
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_get_columns: use DB_INT result type
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_convert_rows: allocate 8 bytes for rows at 0x8191618
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_convert_row: allocate 20 bytes for row values at 0x8191628
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_str2val: converting INT [1004]
Mar 20 14:56:22 [4818] DBG:core:db_free_columns: freeing 1 columns
Mar 20 14:56:22 [4818] DBG:core:db_free_columns: freeing RES_NAMES[0] at 0x8191608
Mar 20 14:56:22 [4818] DBG:core:db_free_columns: freeing result names at 0x81915e8
Mar 20 14:56:22 [4818] DBG:core:db_free_columns: freeing result types at 0x81915f8
Mar 20 14:56:22 [4818] DBG:core:db_free_rows: freeing 1 rows
Mar 20 14:56:22 [4818] DBG:core:db_free_row: freeing row values at 0x8191628
Mar 20 14:56:22 [4818] DBG:core:db_free_rows: freeing rows at 0x8191618
Mar 20 14:56:22 [4818] DBG:core:db_free_result: freeing result set at 0x818e388
Mar 20 14:56:22 [4818] DBG:core:db_new_result: allocate 28 bytes for result set at 0x818e388
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_get_columns: 1 columns returned from the query
Mar 20 14:56:22 [4818] DBG:core:db_allocate_columns: allocate 4 bytes for result names at 0x8191618
Mar 20 14:56:22 [4818] DBG:core:db_allocate_columns: allocate 4 bytes for result types at 0x81915f8
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_get_columns: allocate 8 bytes for RES_NAMES[0] at 0x81915e8
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_get_columns: RES_NAMES(0x81915e8)[0]=[username]
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_get_columns: use DB_STRING result type
Mar 20 14:56:22 [4818] DBG:db_mysql:db_mysql_convert_rows: no rows returned from the query
Mar 20 14:56:22 [4818] DBG:core:db_free_columns: freeing 1 columns
Mar 20 14:56:22 [4818] DBG:core:db_free_columns: freeing RES_NAMES[0] at 0x81915e8
Mar 20 14:56:22 [4818] DBG:core:db_free_columns: freeing result names at 0x8191618
Mar 20 14:56:22 [4818] DBG:core:db_free_columns: freeing result types at 0x81915f8
Mar 20 14:56:22 [4818] DBG:core:db_free_rows: freeing 0 rows
Mar 20 14:56:22 [4818] DBG:core:db_free_result: freeing result set at 0x818e388
Mar 20 14:56:22 [4818] DBG:core:pool_remove: removing connection from the pool
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing sl_reply_error, line 343
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing sl_send_reply, line 350
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing lookup, line 357
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing t_newtran, line 361
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing t_reply, line 362
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing sl_send_reply, line 365
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing is_method, line 378
Mar 20 14:56:22 [4818] DBG:core:parse_methods: methods 0x1
Mar 20 14:56:22 [4818] DBG:textops:fixup_method: using id for method [INVITE/1]
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing engage_media_proxy, line 381
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing append_hf, line 382
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing t_on_branch, line 383
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing t_on_reply, line 384
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing t_on_failure, line 385
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing t_relay, line 388
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing sl_reply_error, line 389
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing append_hf, line 430
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing xlog, line 431
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing t_was_cancelled, line 436
Mar 20 14:56:22 [4818] DBG:core:fix_actions: fixing xlog, line 424
Mar 20 14:56:22 [4818] DBG:core:probe_max_receive_buffer: getsockopt SO_RCVBUF is initially 111616
Mar 20 14:56:22 [4818] DBG:core:probe_max_receive_buffer: trying SO_RCVBUF: 223232
Mar 20 14:56:22 [4818] DBG:core:probe_max_receive_buffer: setting SO_RCVBUF; set=223232,verify=262142
((((POSTER REMOVED SOME REDUNDANT LINES HERE SETTING BUFFERS )))))))))

Mar 20 14:56:22 [4818] DBG:core:probe_max_receive_buffer: setting SO_RCVBUF has no effect
Mar 20 14:56:22 [4818] INFO:core:probe_max_receive_buffer: using a UDP receive buffer of 255 kb
Mar 20 14:56:22 [4818] ERROR:core:tcp_init: bind(6, 0x8190ddc, 16) on 127.0.0.1:5060 : Address already in use
Mar 20 14:56:22 [4818] DBG:xlog:destroy: destroy module...
Mar 20 14:56:22 [4818] DBG:tm:tm_shutdown: tm_shutdown : start
Mar 20 14:56:22 [4818] DBG:tm:unlink_timer_lists: emptying DELETE list
Mar 20 14:56:22 [4818] DBG:tm:tm_shutdown: emptying hash table
Mar 20 14:56:22 [4818] DBG:tm:tm_shutdown: releasing timers
Mar 20 14:56:22 [4818] DBG:tm:tm_shutdown: removing semaphores
Mar 20 14:56:22 [4818] DBG:tm:tm_shutdown: destroying callback lists
Mar 20 14:56:22 [4818] DBG:tm:tm_shutdown: tm_shutdown : done
Mar 20 14:56:22 [4818] DBG:core:shm_mem_destroy:
Mar 20 14:56:22 [4818] DBG:core:shm_mem_destroy: destroying the shared memory lock
Reply | Threaded
Open this post in threaded view
|

Re: Trouble getting mediaproxy to work (dialog module)

Dan Pascu
On Saturday 21 March 2009, slophoo wrote:
> I should say first that I am rather new to this, and am positive the
> mistake is mine, just don't know what it is.  The dialog module does
> load ok in startup, i guess i will post my startup debug here to show
> that.

Your problem seems pretty clear. While the dialog module loads, the
application doesn't actually start because an old instance it already
running, so you still get the old instance of it (using the old
unmodified configuration) processing your messages.

> I've looked at the documentation for engage_media_proxy (saying
> "This needs to be called only once for the first INVITE in a dialog.")
> and despite reading the documentation for dialog module, I still am
> missing something.

The doc and the example show you that you have to call this for an INVITE
when there is no to_tag, but in your script you call it only when you
have a to_tag.

> Is a dialog something i am supposed to create/setup
> before I can use mediaproxy --  Or is it something i am automatically
> in when making a call?

You don't need to create/setup any dialog. It's done automatically by
mediaproxy.

> Mar 20 15:00:39 [4198] ERROR:mediaproxy:EngageMediaProxy:
> engage_media_proxy requires the dialog module to be loaded and
> configured

Notice that pid 4198 gave the error.

> Mar 20 14:56:22 [4816] DBG:core:yyparse: loading module
> /usr/local/lib/opensips/modules/dialog.so
> [...]
> Mar 20 14:56:22 [4818] DBG:core:init_mod: initializing module
> mediaproxy
> [...]
> Mar 20 14:56:22 [4818] ERROR:core:tcp_init: bind(6, 0x8190ddc, 16) on
> 127.0.0.1:5060 : Address already in use
> Mar 20 14:56:22 [4818] DBG:xlog:destroy: destroy module...
> Mar 20 14:56:22 [4818] DBG:tm:tm_shutdown: tm_shutdown : start
> Mar 20 14:56:22 [4818] DBG:tm:unlink_timer_lists: emptying DELETE list
> Mar 20 14:56:22 [4818] DBG:tm:tm_shutdown: emptying hash table
> Mar 20 14:56:22 [4818] DBG:tm:tm_shutdown: releasing timers
> Mar 20 14:56:22 [4818] DBG:tm:tm_shutdown: removing semaphores
> Mar 20 14:56:22 [4818] DBG:tm:tm_shutdown: destroying callback lists
> Mar 20 14:56:22 [4818] DBG:tm:tm_shutdown: tm_shutdown : done
> Mar 20 14:56:22 [4818] DBG:core:shm_mem_destroy:
> Mar 20 14:56:22 [4818] DBG:core:shm_mem_destroy: destroying the shared
> memory lock

The new process tries to start. Notice pids 4816 and 4818. It loads the
dialog module and doesn't give any error for mediaproxy, but in the end
it said that it could not bind to 127.0.0.1:5060 because the address is
already in use and exited. Now if a worker of this process would have
reported the error, it should have a pid higher than 4818, but you get
the error from 4198 (the old process).

Do these:

stop opensips
ps ax | grep opensips
# if still there kill it:
killall -9 opensips
# check again and wait for it until it exits
ps ax | grep opensips

change your debug level to 3 (dbg messages are not useful in this case and
make reading the logs more difficult than needed)

start opensips

report back if you still see the problem with the syslog entries.

--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Trouble getting mediaproxy to work (dialog module)

slophoo
Thank you, your advice helped a lot.  You were right, the processes were all hanging around and when i killed them and got a fresh start, things started up much better.  

>The doc and the example show you that you have to call this for an INVITE
>when there is no to_tag, but in your script you call it only when you
>have a to_tag.

I now have engage_media_proxy in a place which should be hit only when there is no totag (please confirm this?):

        if (has_totag()) {
                # sequential request withing a dialog should
                # take the path determined by record-routing
                if (loose_route()) {
                        if (is_method("BYE")) {
                                setflag(1); # do accounting ...
                                setflag(3); # ... even if the transaction fails
                        }
                        route(1);
                } else {
                        /* uncomment the following lines if you want to enable presence */
                        ##if (is_method("SUBSCRIBE") && $rd == "your.server.ip.address") {
                        ##      # in-dialog subscribe requests
                        ##      route(2);
                        ##      exit;
                        ##}
                        engage_media_proxy();
                        if ( is_method("ACK") ) {
                                if ( t_check_trans() ) {
                                        # non loose-route, but stateful ACK; must be an ACK after a 487 or e.g. 404 from upstream server
                                        t_relay();
                                        exit;
                                } else {
                                        # ACK without matching transaction ... ignore and discard.\n");
                                        exit;
                                }
                        }
                        sl_send_reply("404","Not here");
                }
                exit;
        }


>report back if you still see the problem with the syslog entries.

When I place a call from one NATTED device to another NATTED Device, I think it's trying to use mediaproxy but something is timing out... (and my SIP SDP does not tell the caller anything about the proxy address).  why might this be?  see following trace out:


root@sfsip:/etc/init.d#
root@sfsip:/etc/init.d# okMar 23 14:35:54 [5579] ERROR:mediaproxy:send_command: did timeout waiting for an answer
new branch at sip:4045@99.184.200.204:36258;rinstance=1dce88fb7efc7370
incoming reply
incoming reply
Mar 23 14:36:03 [5582] ERROR:mediaproxy:send_command: did timeout waiting for an answer
ACC: transaction answered: timestamp=1237844163;method=INVITE;from_tag=00071725;to_tag=0051f46b;call_id=NTA0Y2RmMWEzZTRiN2Q5MTMzZWM2N2JhNDhkMzM3Mzk.;code=200;reason=OK
incoming reply
incoming reply
Mar 23 14:36:05 [5580] ERROR:mediaproxy:send_command: did timeout waiting for an answer
incoming reply
Mar 23 14:36:07 [5579] ERROR:mediaproxy:send_command: did timeout waiting for an answer
ACC: transaction answered: timestamp=1237844274;method=BYE;from_tag=00071725;to_tag=0051f46b;call_id=NTA0Y2RmMWEzZTRiN2Q5MTMzZWM2N2JhNDhkMzM3Mzk.;code=200;reason=OK



By the way, my opensips and mediaproxy are on the same box, with only one (private IP) NIC, sitting behind a firewall 1:1 NAT, so in the mediaproxy config.ini i have dispatchers and listen, listen_management listed with the private IP (since i believe opensips itself needs to connect to this IP), and relay_ip as the public (since i believe clients will connect to this)
Reply | Threaded
Open this post in threaded view
|

Re: Trouble getting mediaproxy to work (dialog module)

Dan Pascu

Unfortunately, your email is unreadable (see below).

On Monday 23 March 2009, slophoo wrote:

> Thank you, your advice helped a lot. &nbsp;You were right, the
> processes were all hanging around and when i killed them and got a
> fresh start, things started up much better. &nbsp; <br><br>&gt;The doc
> and the example show you that you have to call this for an INVITE
> <br>&gt;when there is no to_tag, but in your script you call it only
> when you <br>&gt;have a to_tag.
> <br><br>I now have engage_media_proxy in a place which should be hit
> only when there is no totag (please confirm this?): <br><br>&nbsp;
> &nbsp; &nbsp; &nbsp; if (has_totag()) {
> <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; #
> sequential request withing a dialog should <br>&nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # take the path determined by
> record-routing <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; if (loose_route()) { <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if
> (is_method(&quot;BYE&quot;)) { <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; setflag(1); # do accounting ... <br>&nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; setflag(3); # ... even if the transaction fails
> <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; } <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; route(1); <br>&nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } else { <br>&nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> /* uncomment the following lines if you want to enable presence */
> <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; ##if (is_method(&quot;SUBSCRIBE&quot;) && $rd ==
> &quot;your.server.ip.address&quot;) { <br>&nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ## &nbsp;
> &nbsp; &nbsp;# in-dialog subscribe requests <br>&nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ##
> &nbsp; &nbsp; &nbsp;route(2); <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ## &nbsp; &nbsp;
> &nbsp;exit; <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; ##} <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; engage_media_proxy();
> <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; if ( is_method(&quot;ACK&quot;) ) { <br>&nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ( t_check_trans() ) { <br>&nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # non
> loose-route, but stateful ACK; must be an ACK after a 487 or e.g. 404
> from upstream server <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; t_relay(); <br>&nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit; <br>&nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; } else { <br>&nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # ACK without matching
> transaction ... ignore and discard.\n&quot;); <br>&nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit; <br>&nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } <br>&nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } <br>&nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
> &nbsp; sl_send_reply(&quot;404&quot;,&quot;Not here&quot;); <br>&nbsp;
> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
> <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit;
> <br>&nbsp; &nbsp; &nbsp; &nbsp; }
> <br><br><br>&gt;report back if you still see the problem with the
> syslog entries. <br><br>When I place a call from one NATTED device to
> another NATTED Device, I think it's trying to use mediaproxy but
> something is timing out... (and my SIP SDP does not tell the caller
> anything about the proxy address). &nbsp;why might this be? &nbsp;see
> following trace out: <br><br><br>root@sfsip:/etc/init.d#
> <br>root@sfsip:/etc/init.d# okMar 23 14:35:54 [5579]
> ERROR:mediaproxy:send_command: did timeout waiting for an answer
> <br>new branch at
> sip:4045@99.184.200.204:36258;rinstance=1dce88fb7efc7370 <br>incoming
> reply
> <br>incoming reply
> <br>Mar 23 14:36:03 [5582] ERROR:mediaproxy:send_command: did timeout
> waiting for an answer <br>ACC: transaction answered:
> timestamp=1237844163;method=INVITE;from_tag=00071725;to_tag=0051f46b;ca
>ll_id=NTA0Y2RmMWEzZTRiN2Q5MTMzZWM2N2JhNDhkMzM3Mzk.;code=200;reason=OK
> <br>incoming reply
> <br>incoming reply
> <br>Mar 23 14:36:05 [5580] ERROR:mediaproxy:send_command: did timeout
> waiting for an answer <br>incoming reply
> <br>Mar 23 14:36:07 [5579] ERROR:mediaproxy:send_command: did timeout
> waiting for an answer <br>ACC: transaction answered:
> timestamp=1237844274;method=BYE;from_tag=00071725;to_tag=0051f46b;call_
>id=NTA0Y2RmMWEzZTRiN2Q5MTMzZWM2N2JhNDhkMzM3Mzk.;code=200;reason=OK
> <br><br><br><br>By the way, my opensips and mediaproxy are on the same
> box, with only one (private IP) NIC, sitting behind a firewall 1:1 NAT,
> so in the mediaproxy config.ini i have dispatchers and listen,
> listen_management listed with the private IP (since i believe opensips
> itself needs to connect to this IP), and relay_ip as the public (since
> i believe clients will connect to this)



--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Trouble getting mediaproxy to work (dialog module)

slophoo
Hopefully this is better:  (it looks ok on the web forum where I posted it, just not in email I guess)

Thank you, your advice helped a lot.  You were right, the processes were all hanging around and when i killed them and got a fresh start, things started up much better.

>The doc and the example show you that you have to call this for an INVITE
>when there is no to_tag, but in your script you call it only when you
>have a to_tag.

I now have engage_media_proxy in a place which should be hit only when there is no totag (please confirm this?):

        if (has_totag()) {
                # sequential request withing a dialog should
                # take the path determined by record-routing
                if (loose_route()) {
                        if (is_method("BYE")) {
                                setflag(1); # do accounting ...
                                setflag(3); # ... even if the transaction fails
                        }
                        route(1);
                } else {
                        /* uncomment the following lines if you want to enable presence */
                        ##if (is_method("SUBSCRIBE") && $rd == "your.server.ip.address") {
                        ##      # in-dialog subscribe requests
                        ##      route(2);
                        ##      exit;
                        ##}
                        engage_media_proxy();
                        if ( is_method("ACK") ) {
                                if ( t_check_trans() ) {
                                        # non loose-route, but stateful ACK; must be an ACK after a 487 or e.g. 404 from upstream server
                                        t_relay();
                                        exit;
                                } else {
                                        # ACK without matching transaction ... ignore and discard.\n");
                                        exit;
                                }
                        }
                        sl_send_reply("404","Not here");
                }
                exit;
        }


>report back if you still see the problem with the syslog entries.

When I place a call from one NATTED device to another NATTED Device, I think it's trying to use mediaproxy but something is timing out... (and my SIP SDP does not tell the caller anything about the proxy address).  why might this be?  see following trace out:


root@sfsip:/etc/init.d#
root@sfsip:/etc/init.d# okMar 23 14:35:54 [5579] ERROR:mediaproxy:send_command: did timeout waiting for an answer
new branch at sip:4045@99.184.200.204:36258;rinstance=1dce88fb7efc7370
incoming reply
incoming reply
Mar 23 14:36:03 [5582] ERROR:mediaproxy:send_command: did timeout waiting for an answer
ACC: transaction answered: timestamp=1237844163;method=INVITE;from_tag=00071725;to_tag=0051f46b;call_id=NTA0Y2RmMWEzZTRiN2Q5MTMzZWM2N2JhNDhkMzM3Mzk.;code=200;reason=OK
incoming reply
incoming reply
Mar 23 14:36:05 [5580] ERROR:mediaproxy:send_command: did timeout waiting for an answer
incoming reply
Mar 23 14:36:07 [5579] ERROR:mediaproxy:send_command: did timeout waiting for an answer
ACC: transaction answered: timestamp=1237844274;method=BYE;from_tag=00071725;to_tag=0051f46b;call_id=NTA0Y2RmMWEzZTRiN2Q5MTMzZWM2N2JhNDhkMzM3Mzk.;code=200;reason=OK



By the way, my opensips and mediaproxy are on the same box, with only one (private IP) NIC, sitting behind a firewall 1:1 NAT, so in the mediaproxy config.ini i have dispatchers and listen, listen_management listed with the private IP (since i believe opensips itself needs to connect to this IP), and relay_ip as the public (since i believe clients will connect to this)





-----Original Message-----
From: Dan Pascu [mailto:[hidden email]]
Sent: Monday, March 23, 2009 3:06 PM
To: [hidden email]
Cc: Dan Hislop
Subject: Re: [OpenSIPS-Users] Trouble getting mediaproxy to work (dialog module)


Unfortunately, your email is unreadable (see below).
Dan

CONFIDENTIALITY NOTE:  This e-mail message, including any attachment(s), contains information that may be confidential, protected by the attorney-client or other legal privileges, and/or proprietary non-public information. If you are not an intended recipient of this message or an authorized assistant to an intended recipient, please do not read, copy, use or disclose this communication and notify the sender immediately. It should be noted that any review, retransmission, dissemination or other use of, or taking action or reliance upon, this information by persons or entities other than the intended recipient is prohibited.

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Trouble getting mediaproxy to work (dialog module)

Dan Pascu
On Tuesday 24 March 2009, Dan Hislop wrote:

> Hopefully this is better:  (it looks ok on the web forum where I posted
> it, just not in email I guess)
>
> Thank you, your advice helped a lot.  You were right, the processes
> were all hanging around and when i killed them and got a fresh start,
> things started up much better.
>
> >The doc and the example show you that you have to call this for an
> > INVITE when there is no to_tag, but in your script you call it only
> > when you have a to_tag.
>
> I now have engage_media_proxy in a place which should be hit only when
> there is no totag (please confirm this?):

I see you still call it when you have the to_tag. Even more you call it
for every method, not just INVITE.

>
>         if (has_totag()) {
>                 # sequential request withing a dialog should
>                 # take the path determined by record-routing
>                 if (loose_route()) {
>                         if (is_method("BYE")) {
>                                 setflag(1); # do accounting ...
>                                 setflag(3); # ... even if the
> transaction fails }
>                         route(1);
>                 } else {
>                         /* uncomment the following lines if you want to
> enable presence */ ##if (is_method("SUBSCRIBE") && $rd ==
> "your.server.ip.address") { ##      # in-dialog subscribe requests ##  
>    route(2);
>                         ##      exit;
>                         ##}
>                         engage_media_proxy();
>                         if ( is_method("ACK") ) {
>                                 if ( t_check_trans() ) {
>                                         # non loose-route, but stateful
> ACK; must be an ACK after a 487 or e.g. 404 from upstream server
> t_relay();
>                                         exit;
>                                 } else {
>                                         # ACK without matching
> transaction ... ignore and discard.\n"); exit;
>                                 }
>                         }
>                         sl_send_reply("404","Not here");
>                 }
>                 exit;
>         }
>
> >report back if you still see the problem with the syslog entries.
>
> When I place a call from one NATTED device to another NATTED Device, I
> think it's trying to use mediaproxy but something is timing out... (and
> my SIP SDP does not tell the caller anything about the proxy address).
> why might this be?  see following trace out:

Make sure you have the mediaproxy dispatcher running on the same host as
opensips, and at least one mediaproxy relay running (the relay doesn't
necessarily have to run on the same machine).
/var/run/mediaproxy/dispatcher.sock should be visible for opensips.

>
>
> root@sfsip:/etc/init.d#
> root@sfsip:/etc/init.d# okMar 23 14:35:54 [5579]
> ERROR:mediaproxy:send_command: did timeout waiting for an answer new
> branch at sip:4045@99.184.200.204:36258;rinstance=1dce88fb7efc7370
> incoming reply
> incoming reply
> Mar 23 14:36:03 [5582] ERROR:mediaproxy:send_command: did timeout
> waiting for an answer ACC: transaction answered:
> timestamp=1237844163;method=INVITE;from_tag=00071725;to_tag=0051f46b;ca
>ll_id=NTA0Y2RmMWEzZTRiN2Q5MTMzZWM2N2JhNDhkMzM3Mzk.;code=200;reason=OK
> incoming reply
> incoming reply
> Mar 23 14:36:05 [5580] ERROR:mediaproxy:send_command: did timeout
> waiting for an answer incoming reply
> Mar 23 14:36:07 [5579] ERROR:mediaproxy:send_command: did timeout
> waiting for an answer ACC: transaction answered:
> timestamp=1237844274;method=BYE;from_tag=00071725;to_tag=0051f46b;call_
>id=NTA0Y2RmMWEzZTRiN2Q5MTMzZWM2N2JhNDhkMzM3Mzk.;code=200;reason=OK
>
>
>
> By the way, my opensips and mediaproxy are on the same box, with only
> one (private IP) NIC, sitting behind a firewall 1:1 NAT, so in the
> mediaproxy config.ini i have dispatchers and listen, listen_management
> listed with the private IP (since i believe opensips itself needs to
> connect to this IP), and relay_ip as the public (since i believe
> clients will connect to this)
>
>
>
>
>
> -----Original Message-----
> From: Dan Pascu [mailto:[hidden email]]
> Sent: Monday, March 23, 2009 3:06 PM
> To: [hidden email]
> Cc: Dan Hislop
> Subject: Re: [OpenSIPS-Users] Trouble getting mediaproxy to work
> (dialog module)
>
>
> Unfortunately, your email is unreadable (see below).
> Dan
>
> CONFIDENTIALITY NOTE:  This e-mail message, including any
> attachment(s), contains information that may be confidential, protected
> by the attorney-client or other legal privileges, and/or proprietary
> non-public information. If you are not an intended recipient of this
> message or an authorized assistant to an intended recipient, please do
> not read, copy, use or disclose this communication and notify the
> sender immediately. It should be noted that any review, retransmission,
> dissemination or other use of, or taking action or reliance upon, this
> information by persons or entities other than the intended recipient is
> prohibited.



--
Dan

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users