Hi,
Please find my openser.cfg file below. Whenever I try to call a
softphone registered with Openser from another softphone (also
registered with Openser) i get a 513 Message Too Big.
I guess there is a loop in the configuration file but I am unable to
find it out.
Any help would be appreciated.
Regards,
Aadil
------------------------------------------------------------------------
------------------------------------------------------------------------
----------
####### Global Parameters #########
debug=9
log_stderror=no
log_facility=LOG_LOCAL0
fork=yes
children=4
/* 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 = "/opt/openser/etc/openser/tls/user/user-cert.pem"
#tls_private_key = "/opt/openser/etc/openser/tls/user/user-privkey.pem"
#tls_ca_list = "/opt/openser/etc/openser/tls/user/user-calist.pem"
port=5060
/* uncomment and configure the following line if you want openser to
bind on a specific interface/port/proto (default bind on all
available) */
listen=udp:IP1:5060
listen=udp:IP2:5060
####### Modules Section ########
#set module path
mpath="/opt/openser/lib/openser/modules/"
/* uncomment next line for MySQL DB support */
loadmodule "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 "acc.so"
loadmodule "avpops.so"
/* uncomment next lines for MySQL based authentication support
NOTE: a DB (like mysql) module must be also loaded */
loadmodule "auth.so"
loadmodule "auth_db.so"
/* uncomment next line for aliases support
NOTE: a DB (like mysql) module must be also loaded */
#loadmodule "alias_db.so"
/* uncomment next line for multi-domain support
NOTE: a DB (like 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 mysql) module must be also loaded */
#loadmodule "presence.so"
# ----------------- setting module-specific parameters ---------------
modparam("usrloc|auth_db|avpops|domain", "db_url",
"mysql://openser:openserrw@localhost/openser")
# ----- mi_fifo params -----
modparam("mi_fifo", "fifo_name", "/tmp/openser_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", "")
# ----- 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", 1)
# ----- 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", "load_credentials", "")
# ----- alias_db params -----
/* uncomment the following lines if you want to enable the DB based
aliases */
#modparam("alias_db", "db_url",
# "mysql://openser:openserrw@server/openser")
# ----- domain params -----
/* uncomment the following lines to enable multi-domain detection
support */
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", "db_url",
# "mysql://openser:openserrw@server/openser")
#modparam("presence", "force_active", 1)
#modparam("presence", "server_address", "sip:192.168.1.2:5060")
modparam("avpops", "avp_table", "usr_preferences")
####### Routing Logic ########
# main request routing logic
route {
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
};
if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
exit;
};
# we record-route all messages -- to make sure that
# subsequent messages will go through our proxy; that's
# particularly good if upstream and downstream entities
# use different transport protocol
if (!method=="REGISTER")
record_route();
# subsequent messages withing a dialog should take the
# path determined by record-routing
if (loose_route()) {
# mark routing logic in request
append_hf("P-hint: rr-enforced\r\n");
route(1);
};
if (!uri==myself) {
if (method=="REGISTER") {
# if (!www_authorize("", "subscriber")) {
#www_challenge("", "0");
#exit;
#} #
#save("location");
#exit;
#xlog("L_DEBUG", "Unknown Domain");
#sl_send_reply("403", "Forbidden");
};
if (method=="INVITE") {
xlog("L_DEBUG", "INVITE for other domain");
route(4);
};
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
route(1);
};
# if the request is for other domain use UsrLoc
# (in case, it does not work, use the following command
# with proper names and addresses in it)
if (uri==myself) {
if (method=="REGISTER") {
if (!www_authorize("", "subscriber")) {
www_challenge("", "0");
exit;
};
save("location");
exit;
};
# requests for Media server
#if(is_method("INVITE") && !has_totag() ) {
if(is_method("INVITE")) {
;route(3);
exit;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
if(isflagset(2)) {
# route to Asterisk Media Server
prefix("1");
rewritehostport("asterisk:6060");
route(1);
} else {
sl_send_reply("404", "Not Found");
exit;
}
};
append_hf("P-hint: usrloc applied\r\n");
};
route(1);
}
route[1] {
xlog("L_INFO","Entered route 1\n");
if(isflagset(2))
t_on_failure("1");
if (!t_relay()) {
sl_reply_error();
};
exit;
}
route[3] {
xlog("L_INFO","Entered route 3\n");
t_on_reply("3");
# Authenticate calls
#if(!proxy_authorize("","subscriber")) {
# proxy_challenge("","0");
# exit;
#}
# end Authenticate calls
# route to Asterisk Media Server
#rewritehostport("asterisk:6060");
route(1);
}
#Route for calls to other domains
route[4] {
xlog("L_INFO","Entered route 4");
t_on_reply("4");
rewritehostport("asterisk:6060");
if (!t_relay()) {
sl_reply_error();
};
exit;
}
failure_route[1] {
if (t_was_cancelled()) {
xdbg("transaction was cancelled by UAC\n");
return;
}
# restore initial uri
avp_pushto("$ruri","$avp(i:10)");
prefix("1");
# route to Asterisk Media Server
rewritehostport("asterisk:6060");
resetflag(2);
route(1);
}
failure_route[4] {
t_relay();
}
onreply_route[3]
{
if(status =~"180") {
t_on_failure("4");
};
}
------------------------------------------------------------------------
------------------------------------------------------------------------
----------
I have an interesting problem with an OpenSER setup with 2 proxies in
different timezones but using a shared DB with usrloc db_mode 2 (it actually
is a master-master replicated MySQL but I don't think that is relevant).
The issue is that when clients register to the proxy located in the PST
zone, the 'expires' time is much earlier than the current time in EST. As a
result, the proxy in EST deletes the entry from the location table since it
thinks it is stale.
Is there any way around this, other than setting both proxy servers to the
same timezone?
>Douglas Garstang wrote:
>> >Douglas Garstang writes:
>>
>> The LCR module actually works better. It the gatways had a priority,
>> we'd be happy!
>>
>
>You have the source, go add support for priorities...
>
>
>Should be as simple as tweaking the SQL statement ----> 'ORDER BY priority'
>
Actually, no. I don't think so. If OpenSER picks a gateway randomly, it probably does this in memory. Returning gateways in a specific order will have no effect if OpenSER picks one at random from an in-memory list.
Doug.
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
After spending all day working with carrierroute, I think I am missing something pretty fundamental about it.
I see that I can use cr_tree_rewrite_uri() to select a new carrier, but WHY does the carrier have to be hard coded in the cfg file, and why does it require a STRING name of the carrier? I really don't understand that. It makes no sense whatsoever to hard code your carriers in your config file.
Doug.
----- Original Message ----
From: Douglas Garstang <dougmig33(a)yahoo.com>
To: Ovidiu Sas <osas(a)voipembedded.com>
Cc: users(a)lists.openser.org
Sent: Monday, March 24, 2008 7:59:13 PM
Subject: Re: [OpenSER-Users] Carrierroute
Ovidiu,
Ok... thanks... now... do you know how I can change carrier mid call?
Doug.
----- Original Message ----
From: Ovidiu Sas <osas(a)voipembedded.com>
To: Douglas Garstang <dougmig33(a)yahoo.com>
Cc: users(a)lists.openser.org
Sent: Monday, March 24, 2008 7:24:31 PM
Subject: Re: [OpenSER-Users] Carrierroute
The database config is right in the README file.
Here are the trees:
+----+----------+
| id | carrier |
+----+----------+
| 1 | carrier1 |
| 2 | carrier2 |
| 3 | default |
+----+----------+
I agree with you that the names are confusing :)
You may or may not need to use the subscriber tables, based on what
functions are you using.
In the example that I gave you, you don't need the location table.
Instead, you force a routing tree (in my example is the "default"
tree).
Hope this helps,
Ovidiu Sas
On Mon, Mar 24, 2008 at 9:51 PM, Douglas Garstang <dougmig33(a)yahoo.com> wrote:
>
> Ovidiu,
>
> I need database config info.... your example uses the config file.
> What is a 'tree'? The documentation keeps talking about it, but I don't see
> it defined anywhere. Carrierroute SEEMS to need the subscriber table, but it
> doesn't load it from the database.... why not?
>
> Why should I spend days experimenting to get it to work? If the docs where
> adequate, that wouldn't be required.
>
> Doug.
>
>
>
> ----- Original Message ----
> From: Ovidiu Sas <osas(a)voipembedded.com>
> To: Douglas Garstang <dougmig33(a)yahoo.com>
> Cc: users(a)lists.openser.org
> Sent: Monday, March 24, 2008 5:43:53 PM
> Subject: Re: [OpenSER-Users] Carrierroute
>
> Hello Douglas,
>
> The database sample is available in the README file here:
> http://www.openser.org/docs/modules/1.3.x/carrierroute.html#AEN575
> The entire documentation is there, you just need to read it carefully
> and experiment.
>
> You had a similar post about the documentation for the lcr module and
> in the end it seems that you figure it out :)
> If you think that you can improve documentation, feel free to send
> patches for the README file.
>
> Here you can find a configuration file example for carrierroute:
> http://voipembedded.com/resources/openser_cr.cfg
>
>
> Regards,
> Ovidiu Sas
>
>
> On Mon, Mar 24, 2008 at 7:52 PM, Douglas Garstang <dougmig33(a)yahoo.com>
> wrote:
> >
> > I have been trying to get the carrierroute module to work ALL day.
> > Can someone 'supplement' the openser docs with maybe some sample database
> > data?
> >
> > The docs really aren't making sense. The docs keep talking about a routing
> > tree? What is a routing tree?
> > When I start openser, I don't see it query the subscriber table. Should
> it?
> >
> > Thanks,
> > Doug.
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> > _______________________________________________
> > Users mailing list
> > Users(a)lists.openser.org
> > http://lists.openser.org/cgi-bin/mailman/listinfo/users
> >
> >
>
>
> ________________________________
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it
> now.
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
-----Inline Attachment Follows-----
_______________________________________________
Users mailing list
Users(a)lists.openser.org
http://lists.openser.org/cgi-bin/mailman/listinfo/users
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
Hello List.
I'm having a problema trying to run ser-0.9.7. The compilation was fine.. but i'm not able to start SER due to this error :
Mar 25 00:42:53 edgelcr ser: loading module /usr/local/lib/ser/modules/acc.so
Mar 25 00:42:53 edgelcr ser: ERROR: load_module: could not open module </usr/local/lib/ser/modules/acc.so>: /usr/local/lib/ser/modules/acc.so: undefined symbol: parse_orig_uri
Mar 25 00:42:53 edgelcr ser: parse error (88,13-14): failed to load module
Can someone help me here?
Thanks in advance
Regards,
Ricardo Martinez.-
Ovidiu,
Ok... thanks... now... do you know how I can change carrier mid call?
Doug.
----- Original Message ----
From: Ovidiu Sas <osas(a)voipembedded.com>
To: Douglas Garstang <dougmig33(a)yahoo.com>
Cc: users(a)lists.openser.org
Sent: Monday, March 24, 2008 7:24:31 PM
Subject: Re: [OpenSER-Users] Carrierroute
The database config is right in the README file.
Here are the trees:
+----+----------+
| id | carrier |
+----+----------+
| 1 | carrier1 |
| 2 | carrier2 |
| 3 | default |
+----+----------+
I agree with you that the names are confusing :)
You may or may not need to use the subscriber tables, based on what
functions are you using.
In the example that I gave you, you don't need the location table.
Instead, you force a routing tree (in my example is the "default"
tree).
Hope this helps,
Ovidiu Sas
On Mon, Mar 24, 2008 at 9:51 PM, Douglas Garstang <dougmig33(a)yahoo.com> wrote:
>
> Ovidiu,
>
> I need database config info.... your example uses the config file.
> What is a 'tree'? The documentation keeps talking about it, but I don't see
> it defined anywhere. Carrierroute SEEMS to need the subscriber table, but it
> doesn't load it from the database.... why not?
>
> Why should I spend days experimenting to get it to work? If the docs where
> adequate, that wouldn't be required.
>
> Doug.
>
>
>
> ----- Original Message ----
> From: Ovidiu Sas <osas(a)voipembedded.com>
> To: Douglas Garstang <dougmig33(a)yahoo.com>
> Cc: users(a)lists.openser.org
> Sent: Monday, March 24, 2008 5:43:53 PM
> Subject: Re: [OpenSER-Users] Carrierroute
>
> Hello Douglas,
>
> The database sample is available in the README file here:
> http://www.openser.org/docs/modules/1.3.x/carrierroute.html#AEN575
> The entire documentation is there, you just need to read it carefully
> and experiment.
>
> You had a similar post about the documentation for the lcr module and
> in the end it seems that you figure it out :)
> If you think that you can improve documentation, feel free to send
> patches for the README file.
>
> Here you can find a configuration file example for carrierroute:
> http://voipembedded.com/resources/openser_cr.cfg
>
>
> Regards,
> Ovidiu Sas
>
>
> On Mon, Mar 24, 2008 at 7:52 PM, Douglas Garstang <dougmig33(a)yahoo.com>
> wrote:
> >
> > I have been trying to get the carrierroute module to work ALL day.
> > Can someone 'supplement' the openser docs with maybe some sample database
> > data?
> >
> > The docs really aren't making sense. The docs keep talking about a routing
> > tree? What is a routing tree?
> > When I start openser, I don't see it query the subscriber table. Should
> it?
> >
> > Thanks,
> > Doug.
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> > _______________________________________________
> > Users mailing list
> > Users(a)lists.openser.org
> > http://lists.openser.org/cgi-bin/mailman/listinfo/users
> >
> >
>
>
> ________________________________
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it
> now.
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
1.3.1...
----- Original Message ----
From: Ovidiu Sas <osas(a)voipembedded.com>
To: Jeremy McNamara <jj(a)nufone.net>
Cc: Douglas Garstang <dougmig33(a)yahoo.com>; users(a)lists.openser.org
Sent: Monday, March 24, 2008 5:34:30 PM
Subject: Re: [OpenSER-Users] LCR Gateway Priority....
On Mon, Mar 24, 2008 at 7:27 PM, Jeremy McNamara <jj(a)nufone.net> wrote:
> Douglas Garstang wrote:
>
> > >Douglas Garstang writes:
> >
> > The LCR module actually works better. It the gatways had a priority,
> > we'd be happy!
>
> You have the source, go add support for priorities...
>
> Should be as simple as tweaking the SQL statement ----> 'ORDER BY priority'
Which version of openser are you using?
The SQL statements are gone since 1.2 afair.
Regards,
Ovidiu Sas
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
I have been trying to get the carrierroute module to work ALL day.
Can someone 'supplement' the openser docs with maybe some sample database data?
The docs really aren't making sense. The docs keep talking about a routing tree? What is a routing tree?
When I start openser, I don't see it query the subscriber table. Should it?
Thanks,
Doug.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Actually, further to that, how can I switch to another carrier in route() ?
I can't see any way in the docs to do this.
----- Original Message ----
From: Douglas Garstang <dougmig33(a)yahoo.com>
To: users(a)lists.openser.org
Sent: Monday, March 24, 2008 4:52:55 PM
Subject: [OpenSER-Users] Carrierroute
I have been trying to get the carrierroute module to work ALL day.
Can someone 'supplement' the openser docs with maybe some sample database data?
The docs really aren't making sense. The docs keep talking about a routing tree? What is a routing tree?
When I start openser, I don't see it query the subscriber table. Should it?
Thanks,
Doug.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-----Inline Attachment Follows-----
_______________________________________________
Users mailing list
Users(a)lists.openser.org
http://lists.openser.org/cgi-bin/mailman/listinfo/users
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com