moved discussion to mailing list
-------- Original Message --------
Subject: Accounting with OPENSER
Date: Mon, 24 Oct 2005 10:22:41 -0200
From: Jeffrey Drago <
Reply-To: Jeffrey Drago
Hi Klaus..
I saw a lot of your posts trought the mailing lists and I would be glad
if you try to help me with a simple one...
This is the scenario:
* (Asterisk) ----- MYSQL DB -> where I'm going to write the CDR.
| |
| |
* (Asterisk)-------------( OPENSER------- Carrier...(termination)
|
|
|
*(Asterisk)------|
I Would like to know if its possible to bill only after the ACK until
the BYE Signal...
Is this a hard thing to do with OPENSER?
Thanks for your help.
Jeffrey M. Drago ASP Solutions
Diretor Rua Cel. Carneiro Júnior, 58
Sl. 14
(35) 3622-0732 37500-018 - Itajubá - MG
http://www.aspsolutions.com.br/
Hello list.
My setup consists of two SER servers behind an F5 Big-IP for load balancing.
The servers are "pooled" behind a virtual server (i.e. they present a common
IP address to the rest of the world) created at the Big-IP and I'm using
call-id persistence.
My ser.cfgs are slightly modified mediaproxy examples from onsip.org.
Each SER replicates to the other REGISTER messages, so that both servers are
the same.
So far so good.
Suppose that NATed UAC1 is registered at SER1 (SER1 is sending the 4 byte udp
packet every 60sec in order to keep its NAT binding open) and UAC2 sends him
an INVITE:
1) If the INVITE gets served by SER1 everything is OK.
2) If the INVITE gets served by SER2 then:
a) SER2 sends the message from port 5060,
b) but the packet arrives at UAC1 with source port 5061 (or 5062 or
whatever).
This means that for some reason the Big-IP changes the source port it receives
from SER2 to something other and, of course, the packet does not pass UAC1's
NAT binding.
So, the conclusion is that a UAC is only reachable through the SER that keeps
it's NAT binding open. In order to solve this problem (and until SER can
support path headers) I employed the method and the patch discussed at
http://lists.iptel.org/pipermail/serdev/2005-September/005814.html (thanx for
the patch Evan).
I have to admit that this system was my first experience with a Big-IP, so I'm
wondering:
Am I doing something wrong at the Big-IP?
Or is this Big-IP behavior (altering source ports received from internal
servers) typical to every (even commercial) load balancer?
Has anyone ever had success with any load balancer, multiple SERs and NATed
clients, especially F5s?
Regards,
George
Hi,
I try to install in debian with apt but the instaler show this mensage
"0(2214) WARNING: fix_socket_list: could not rev. resolve xxx.xxx.xxx.xxx
0(2214) WARNING: fix_socket_list: could not rev. resolve xxx.xxx.xxx.xxx"
and when I try to run ser with serctl start show this error:
Starting SER : PID file /var/run/ser.pid does not exist -- SER start failed
Some one know how I can fix this problems?
tanks all.
Carlos Eduardo.
Le lundi 24 octobre 2005 à 14:21 +0200, Samuel Osorio Calvo a écrit :
> When you process the incoming:
>
> INVITE dsandras aT gnome.org
>
> and reaches lookup("aliases");, the Req-URI will be AUTOMATICALLY rewritten to have:
>
> INVITE 6001 aT gnome.org
>
> Isn't this what you want???? You don't need rewriteuri for anything, lookup will do the job for you.
>
I just wanted the reverse. 6001 is the alias, not dsandras :)
But I think Jan answered, I need to create a reversealias table.
--
_ Damien Sandras
(o- GnomeMeeting: http://www.gnomemeeting.org/
//\ FOSDEM 2005 : http://www.fosdem.org
v_/_ H.323 phone : callto:ils.seconix.com/dsandras@seconix.com
When you process the incoming:
INVITE dsandras aT gnome.org
and reaches lookup("aliases");, the Req-URI will be AUTOMATICALLY rewritten to have:
INVITE 6001 aT gnome.org
Isn't this what you want???? You don't need rewriteuri for anything, lookup will do the job for you.
Samuel.
Unclassified.
>>> Damien Sandras <dsandras(a)gnomemeeting.net> 10/24/05 02:12PM >>>
Le lundi 24 octobre 2005 à 14:06 +0200, Samuel Osorio Calvo a écrit :
> lookup("aliases");
>
> will do the job for you if aliases is the name of the table containing the alias bindings (by default it will be).
>
I had understood this, but the problem here is that I need the reverse:
the original request uri contains the username and I need to rewrite it
into the user alias.
Example, SER receives INVITE dsandras @ gnomemeeting.net, and I want
to use rewriteuri to rewrite the INVITE into INVITE 600001 @
gnomemeeting.net.
Is that possible?
--
_ Damien Sandras
(o- GnomeMeeting: http://www.gnomemeeting.org/
//\ FOSDEM 2005 : http://www.fosdem.org
v_/_ H.323 phone : callto:ils.seconix.com/dsandras@seconix.com
In the lines:
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
modparam("usrloc", "db_mode", 2)
you select the mode you want to use the database.
If you put 2, the "records" added to SER via serctl will be propagated to the permanent database not immediately but periodically. I think this periodicity can not be set in the config file.
If you use 1, all records inserted with serctl will immediately be written also to the database.
So I guess you don't see the changes immediately and think that there is a problem....either wait more or put 1 to the dbmode to check if there is a problem with the database.
Samuel.
Unclassified.
>>> ranveer kunal <ranveerkunal(a)gmail.com> 10/24/05 11:17AM >>>
Hello Folks,
I am trying to use SER with some external database
(mysql), which is there on a remote system, no matter what I do, when
I add a user via serctl, the user is added to local database server
only. I am sending my ser.cfg file, kindly help me thanks . .. .
-------------------------------------------------------------------------------------------------------------------
#
# $Id: ser.cfg,v 1.25.2.1 2005/02/18 14:30:44 andrei Exp $
#
# simple quick-start config script
#
# ----------- global configuration parameters ------------------------
#debug=3 # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no # (cmd line: -E)
/* Uncomment these lines to enter debugging mode
fork=no
log_stderror=yes
*/
check_via=yes # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
#port=5060
#children=4
# advertised_address is the via header's FQDN
advertised_address="ran.test"
fifo="/tmp/ser_fifo"
fifo_db_url="mysql://ser:heslo@skywalker/ser"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/rr.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/options.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"
loadmodule "/usr/local/lib/ser/modules/uri_db.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
#modparam("usrloc", "db_mode", 0)
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
modparam("usrloc", "db_mode", 2)
# -- auth params --
# Uncomment if you are using auth module
#
modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which true in this config),
# uncomment also the following parameter)
#
modparam("auth_db", "password_column", "password")
modparam("usrloc", "db_url", "mysql://ser:heslo@skywalker/ser")
modparam("auth_db", "db_url", "mysql://ser:heslo@skywalker/ser")
modparam("uri_db", "db_url", "mysql://ser:heslo@skywalker/ser")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# ------------------------- request routing logic -------------------
# main routing logic
route{
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
break;
};
if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
break;
};
# 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 U want ip addr for RR just give record_route();
if (!method=="REGISTER") record_route_preset("sip:ran.test");
# 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);
break;
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
route(1);
break;
};
# 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") {
# Uncomment this if you want to use digest authentication
# uncomment the 4 lines if U donot authentication.
if (!www_authorize("skywalker", "subscriber")) {
www_challenge("skywalker", "0");
break;
};
save("location");
break;
};
lookup("aliases");
if (!uri==myself) {
append_hf("P-hint: outbound alias\r\n");
route(1);
break;
};
if ((method==OPTIONS) && (! uri=~"sip:.*[@]+.*")) {
options_reply();
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
append_hf("P-hint: usrloc applied\r\n");
route(1);
}
route[1]
{
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
#force_rport();
# if (!(method==ACK | method=="CANCEL" | method=="BYE")) {
#comment 4 lines for non suth
# if (!proxy_authorize("sip.test", "subscriber")) {
# proxy_challenge("sip.test","0");
# break;
# };
# };
if (!t_relay()) {
sl_reply_error();
};
}
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
lookup("aliases");
will do the job for you if aliases is the name of the table containing the alias bindings (by default it will be).
Samuel
Unclassified.
>>> Damien Sandras <dsandras(a)gnomemeeting.net> 10/24/05 10:26AM >>>
Hello,
I plan to deploy a service based on SER and I'm facing a simple problem.
All users have both a username (e.g. sip:dsandras AT_ gnomemeeting.net)
and one alias (e.g. sip:600001 AT_ gnomemeeting.net). I have another
service running in back-end that only supports numerical SIP addresses.
So I would like to use "rewriteuri" in ser.cfg to rewrite the user part
of the SIP URL. The problem is that I want to rewrite the original
username (dsandras) into its numerical alias (600001).
My question is thus: how can I get the numerical alias from a username
in ser.cfg in order to use it?
Thank you,
--
_ Damien Sandras
(o- GnomeMeeting: http://www.gnomemeeting.org/
//\ FOSDEM 2005 : http://www.fosdem.org
v_/_ H.323 phone : callto:ils.seconix.com/dsandras@seconix.com
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
Hello Folks,
I am trying to use SER with some external database
(mysql), which is there on a remote system, no matter what I do, when
I add a user via serctl, the user is added to local database server
only. I am sending my ser.cfg file, kindly help me thanks . .. .
-------------------------------------------------------------------------------------------------------------------
#
# $Id: ser.cfg,v 1.25.2.1 2005/02/18 14:30:44 andrei Exp $
#
# simple quick-start config script
#
# ----------- global configuration parameters ------------------------
#debug=3 # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no # (cmd line: -E)
/* Uncomment these lines to enter debugging mode
fork=no
log_stderror=yes
*/
check_via=yes # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
#port=5060
#children=4
# advertised_address is the via header's FQDN
advertised_address="ran.test"
fifo="/tmp/ser_fifo"
fifo_db_url="mysql://ser:heslo@skywalker/ser"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
loadmodule "/usr/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/sl.so"
loadmodule "/usr/local/lib/ser/modules/tm.so"
loadmodule "/usr/local/lib/ser/modules/rr.so"
loadmodule "/usr/local/lib/ser/modules/maxfwd.so"
loadmodule "/usr/local/lib/ser/modules/usrloc.so"
loadmodule "/usr/local/lib/ser/modules/registrar.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/options.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"
loadmodule "/usr/local/lib/ser/modules/uri_db.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
#modparam("usrloc", "db_mode", 0)
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
modparam("usrloc", "db_mode", 2)
# -- auth params --
# Uncomment if you are using auth module
#
modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which true in this config),
# uncomment also the following parameter)
#
modparam("auth_db", "password_column", "password")
modparam("usrloc", "db_url", "mysql://ser:heslo@skywalker/ser")
modparam("auth_db", "db_url", "mysql://ser:heslo@skywalker/ser")
modparam("uri_db", "db_url", "mysql://ser:heslo@skywalker/ser")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# ------------------------- request routing logic -------------------
# main routing logic
route{
# initial sanity checks -- messages with
# max_forwards==0, or excessively long requests
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
break;
};
if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
break;
};
# 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 U want ip addr for RR just give record_route();
if (!method=="REGISTER") record_route_preset("sip:ran.test");
# 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);
break;
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
route(1);
break;
};
# 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") {
# Uncomment this if you want to use digest authentication
# uncomment the 4 lines if U donot authentication.
if (!www_authorize("skywalker", "subscriber")) {
www_challenge("skywalker", "0");
break;
};
save("location");
break;
};
lookup("aliases");
if (!uri==myself) {
append_hf("P-hint: outbound alias\r\n");
route(1);
break;
};
if ((method==OPTIONS) && (! uri=~"sip:.*[@]+.*")) {
options_reply();
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
append_hf("P-hint: usrloc applied\r\n");
route(1);
}
route[1]
{
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
#force_rport();
# if (!(method==ACK | method=="CANCEL" | method=="BYE")) {
#comment 4 lines for non suth
# if (!proxy_authorize("sip.test", "subscriber")) {
# proxy_challenge("sip.test","0");
# break;
# };
# };
if (!t_relay()) {
sl_reply_error();
};
}
I am trying to implement call forwarding using the uac_redirect
module. My user agents reply with a SIP 302 Moved Temporarily message
when the unconditional call forward is set. In the contact field
there is something like this...
Contact Binding: <sip:13143212222@ser1.manhattan.sipnetwork.net>
I need ser to add a plus to that then send the call back out to our
pstn carrier.
I have tried this...
if (t_check_status("302"))
get_redirects("6:2","redirect");
prefix("+");
rewritehost("pstn.carriers.ip");
t_relay();
and putting it in a failure route then forcing that route
failure_route[2] {
get_redirects("6:2","redirect");
prefix("+");
rewritehost("our.pstn.carriers.ip");
t_relay();
I even tried
if (t_check_status("302")){ # what to do if device
tells us to forward to another number
add_diversion("user-forward");
get_redirects("6:2","redirect");
prefix("+");
rewritehost("our.pstn.carriers.ip");
t_relay();
but apparently get_redirects can only be used in a failure_route
Has anyone been able to get this working? On a 302 get the redirects
from the contact field using get_redirects append with a "+" and
rewritehost somewhere else it seemed so simple.
Any help is as always greatly appreciated, especially from
daniel(a)voice-system.ro cause like me he's too far for norway beer.
Hello,
I plan to deploy a service based on SER and I'm facing a simple problem.
All users have both a username (e.g. sip:dsandras AT_ gnomemeeting.net)
and one alias (e.g. sip:600001 AT_ gnomemeeting.net). I have another
service running in back-end that only supports numerical SIP addresses.
So I would like to use "rewriteuri" in ser.cfg to rewrite the user part
of the SIP URL. The problem is that I want to rewrite the original
username (dsandras) into its numerical alias (600001).
My question is thus: how can I get the numerical alias from a username
in ser.cfg in order to use it?
Thank you,
--
_ Damien Sandras
(o- GnomeMeeting: http://www.gnomemeeting.org/
//\ FOSDEM 2005 : http://www.fosdem.org
v_/_ H.323 phone : callto:ils.seconix.com/dsandras@seconix.com