[OpenSIPS-Users] infinite loop

Sebastian Krueger sebykrueger at gmail.com
Tue Apr 14 08:22:50 CEST 2009


Hi guys,
am new to openSIPS, and have hacked together this configuration file. It
looks like I'm landing in an infinite loop which only breaks out once I've
read the maximum number of forwards. I got it from the openSER book and am
trying to rewrite it to openSIPS.

Here the config:
---------------

log_stderror=*no*log_facility=LOG_LOCAL0*fork*=yeschildren=4debug=6port=5060*#######
Module Loading ########***mpath=*"/usr/lib/opensips/modules/"*loadmodule
*"db_mysql.so"*loadmodule *"signaling.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 *"acc.so"*loadmodule *"auth.so"*loadmodule
*"auth_db.so"*loadmodule *"alias_db.so"*loadmodule
*"domain.so"*loadmodule *"presence.so"*loadmodule
*"presence_xml.so"**####### Module Parameters
########***modparam(*"db_mysql"*, *"ping_interval"*,
600)modparam(*"mi_fifo"*, *"fifo_name"*,
*"/tmp/opensips_fifo"*)modparam(*"rr"*, *"enable_full_lr"*,
1)modparam(*"rr"*, *"append_fromtag"*, 0)modparam(*"registrar"*,
*"method_filtering"*, 1)modparam(*"usrloc"*, *"db_mode"*,
2)modparam(*"usrloc"*, *"db_url"*,
*"mysql://opensips:opensipsrw@localhost/opensips"*)modparam(*"uri_db"*,
*"use_uri_table"*, 0)modparam(*"uri_db"*, *"db_url"*,
*""*)modparam(*"acc"*, *"early_media"*, 1)modparam(*"acc"*,
*"report_ack"*, 1)modparam(*"acc"*, *"report_cancels"*,
1)modparam(*"acc"*, *"detect_direction"*, 0)modparam(*"acc"*,
*"failed_transaction_flag"*, 3)modparam(*"acc"*, *"log_flag"*,
1)modparam(*"acc"*, *"log_missed_flag"*, 2)modparam(*"acc"*,
*"db_flag"*, 1)modparam(*"acc"*, *"db_missed_flag"*,
2)modparam(*"auth_db"*, *"calculate_ha1"*, yes)modparam(*"auth_db"*,
*"password_column"*, *"password"*)modparam(*"auth_db"*, *"db_url"*,
*"mysql://opensips:opensipsrw@localhost/opensips"*)modparam(*"auth_db"*,
*"load_credentials"*, *""*)modparam(*"alias_db"*, *"db_url"*,
*"mysql://opensips:opensipsrw@localhost/opensips"*)modparam(*"domain"*,
*"db_url"*, *"mysql://opensips:opensipsrw@localhost/opensips"*)modparam(*"domain"*,
*"db_mode"*, 1)   *# Use caching***modparam(*"presence|presence_xml"*,
*"db_url"*, *"mysql://opensips:opensipsrw@localhost/opensips"*)modparam(*"presence_xml"*,
*"force_active"*, 1)modparam(*"presence"*, *"server_address"*,
*"sip:192.168.2.10:5060"*)*####### Routing Logic ########****# main
request routing logic***route{        xlog(*"L_INFO"*, *"->Main
Routing Block START"*);        *if*
(!mf_process_maxfwd_header(*"10"*)) {                xlog(*"L_INFO"*,
*"-->Exceeded Max-forwards"*);
sl_send_reply(*"483"*,*"Too Many Hops"*);                *exit*;
 }        *if* (msg:len >= 2048) {                xlog(*"L_INFO"*,
*"-->Exceeded Message Size"*);                sl_send_reply(*"513"*,
*"Message too big"*);                *exit*;        }        *if*
(!method==*"REGISTER"*)                 record_route();
*if* (loose_route()) {                append_hf(*"P-hint:
rr-enforced\r\n"*);                route(1);        }
*if* (!uri==myself) {                append_hf(*"P-hint:
outbound\r\n"*);                route(1);        }        *if*
(uri==myself) {                *if* (method==*"REGISTER"*) {
             save(*"location"*);                        *exit*;
        }                lookup(*"aliases"*);                *if*
(!uri==myself) {                        append_hf(*"P-hint: outbound
alias\r\n"*);                        route(1);                }
        *if* (!lookup(*"location"*)) {
sl_send_reply(*"404"*, *"Not Found"*);                        *exit*;
              }                append_hf(*"P-hint: userloc
applied\r\n"*);        }        route(1);}route[1] {        *if*
(!t_relay()) {                sl_reply_error();        }
*exit*;}

------------

I'm trying to create the most simple possible configuration file. No
features, except for being able to make calls and use a mysql backend.

I'm also trying to find out what the "uri" and the "myself" resolve
to. Have looked everywhere in the openSIPS cookbooks, but can't find
anything. Are these actual variables?


Does "uri" == "$ru"?

What does the "myself" resolve to?

Does "method" == "$rm"?

Is the "msg:len" variable meant to be "$cl"?

Any info is much appreciated.

Cheers, Sebastian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.opensips.org/pipermail/users/attachments/20090414/da43622f/attachment-0001.htm 


More information about the Users mailing list