Hi Bogdan,

yeah, something like that.

In my case it's

483 Too Many Hops

any idea why that might happen?

Also, I'm wondering if you anyone could help me out with these questions:

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.





On Wed, Apr 15, 2009 at 11:31 PM, Bogdan-Andrei Iancu <
[email protected]> wrote:

> Hi Sebastian,
>
> You mean you get the "483 Loop detected" ?
>
> Regards,
> Bogdan
>
> Sebastian Krueger wrote:
>
>> 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*=yes
>> ||children=4
>> ||debug=6
>> ||port=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:opensip...@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:opensip...@localhost/opensips"*)
>> ||modparam(*"auth_db"*, *"load_credentials"*, *""*)
>> ||modparam(*"alias_db"*, *"db_url"*,
>> *"mysql://opensips:opensip...@localhost/opensips"*)
>> ||modparam(*"domain"*, *"db_url"*, *"mysql://opensips:opensip...@localhost
>> /opensips"*)
>> ||modparam(*"domain"*, *"db_mode"*, 1)   /# Use caching
>> /|/||||/|modparam(*"presence|presence_xml"*, *"db_url"*,
>> *"mysql://opensips:opensip...@localhost/opensips"*)
>> ||modparam(*"presence_xml"*, *"force_active"*, 1)
>> ||modparam(*"presence"*, *"server_address"*, *"sip:192.168.2.10:5060 <
>> http://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.
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Users mailing list
>> [email protected]
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>
>>
>
>
_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to