Has anyone found a way to selectively respond to failures using
failure_route's? For instance I want to only run the actions in the
failure_route if the code that triggered the failure route is certain
400 or 500 error codes. Since the sip msg passed into the failure_route
is the initial message that triggered the failure (usually the INVITE)
using methods from the textops module don't work.
Thanks,
Evan
Anybody please help with subj
0.8.14 binaries from iptel.org
ser -dddddddd says:
ERROR: bad config file (4 errors)
config as in the manual:
# ----------- global configuration parameters ------------------------
debug=5 # debug level (cmd line: -dddddddddd)
#fork=yes
#log_stderror=no # (cmd line: -E)
/* Uncomment these lines to enter debugging mode
debug=7
fork=no
log_stderror=yes
*/
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5065
#children=4
fifo="/tmp/ser_fifo"
# ------------------ module loading ----------------------------------
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/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_radius.so"
# ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 2)
# -- auth params --
modparam("auth_radius", "radius_config","/etc/radiusclient/radiusclient.conf")
modparam("auth_radius", "service_type", 15)
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
#modparam("acc", "log_level", 1)
#modparam("acc", "radius_flag", 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 > max_len ) {
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
record_route();
# loose-route processing
if (loose_route()) {
t_relay();
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
if (!radius_www_authorize("")) {
www_challenge("", "1");
break;
};
save("location");
break;
};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
break;
};
};
# forward to current uri now; use stateful forwarding; that
# works reliably even if we forward from TCP to UDP
if (!t_relay()) {
sl_reply_error();
};
}
Sir,
Please entry my email address to your mailing list.
My address is as below.
ksatoh(a)asgent.co.jp
Thanks and Regards,
Ken Sato
------------------------------------
Ken Sato
MoIP Business
Asgent, Inc.
19-7 Nihonbashi-Koamicho Chuo-ku,
Tokyo 103-0016, Japan
TEL: +81-3-5643-2561
FAX: +81-3-5643-2571
http://www.asgent.co.jp/
------------------------------------
Hello all,
Im having trouble getting DTMF working on my sip client phone -
asterisk doesnt receive any DTMF tones - i've even tried inband.
setup;
sip phone --> SER --> asterisk
Thanks,
Patrick
Hi
I have been toying with serweb, however in order for it to scale, I
woulkd need it to be installed on a different server than SER itself.
Looking at the code, it seems that it needs to talk to ser via ser_fifo
(is that correct ?), if so I obviously cant get this to happen over a
remote connection unless I go and share drives...which cant happen.
I looked into the ser_fifo in ser, and it seems that you can run ser_fifo
out of a DB, has anyone done this, and if so, is it possible to link
serweb to this DB also, rather than the file.
Iqbal
Hi All.
I'm using ser-0.9.
When someone calls a subscriber who has multiple records in the
location table SER sends out an INVITE message to each of the contact
locations.
But when the caller CANCELs the call, SER still seems to send INVITE
retransmissions to some of the contact locations.
Can this be stopped?
Regards,
Paul
At 03:45 PM 2/16/2005, Matt Schulte wrote:
>I still get errors, our sip provider requires a + anyway :-)
>
>I seem to get errors no matter what commands I run. Here's the latest
>trying to add a "domain".
>
>./serctl domain add blah.blah.net
>
>500 command 'domain_reload' not available
>Feb 16 09:43:36 brak /usr/local/sbin/ser[4315]: ERROR: fifo_server:
>command domain_reload is not available
That's easy. If you wish to use multidomain processing, you need to load and
use the domain module. You can't access a module via fifo if the module
is not used.
>Is there something that has to be done with the fifo_server before doing
>all this?
>
>ser *is* running
>
>[serctl]
>SER_FIFO=/tmp/ser_fifo
>
>[ser.cfg]
>fifo="/tmp/ser_fifo"
>
>
>
>-----Original Message-----
>From: Felipe Martins [mailto:fmartins@mundivox.com]
>Sent: Wednesday, February 16, 2005 8:31 AM
>To: serusers(a)lists.iptel.org
>Subject: Re: [Serusers] SER 0.9.0 adding users?
>
>
>Try
>
># serctl add 18165551212 blahblah blah@blah
>
>
>
>On Wed, 16 Feb 2005 07:06:13 -0600
>"Matt Schulte" <mschulte(a)netlogic.net> wrote:
>
>> I get this when adding a user in ser (using serctl)
>>
>> root@brak sbin]# ./serctl add +18165551212 blahblah blah@blah MySql
>> password:
>> error: 400; check if you use aliases in SER
>>
>> Um error 400?? I'm lost. no docs, frustrated. venting.
That's easy too. Read the manual to avoid frustration.
http://www.iptel.org/ser/doc/seruser/seruser.html#AEN1087
-jiri
>>
>> Matt
>>
>> _______________________________________________
>> Serusers mailing list
>> serusers(a)lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
>>
>
>
>--
> Felipe Martins
> TEP Solution & New Technologies
> Mundivox Communications
> fmartins(a)mundivox.com
>
> Site: www.mundivox.com
> Tel.: +55 +21 +3820 8839
> Cel.: +55 +21 +9823 8602
> Fax.: +55 +21 +3820 8844
>
>_______________________________________________
>Serusers mailing list
>serusers(a)lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
>
>_______________________________________________
>Serusers mailing list
>serusers(a)lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
--
Jiri Kuthan http://iptel.org/~jiri/
I configured ser to work with an pstn gw accounting all call to mysql db.
But I when I call a local user I get accounted the INVITE and the BYE
messages, but when I call an outging uri I get accounted only BYE
messages and not the INVTE.
Where is the probelm?
THANKS
below there is may ser.cfg file:
______________________________________________________________
#
# Italycom SER server ver 0.052
#
# modificato il 16-02-2005
#
# con nathelper e rtpproxy funzioannte
# da perfezionare l'accounting
#
#
# ----------- global configuration parameters ------------------------
/* Uncomment these lines to enter debugging mode
debug=9
fork=no
log_stderror=yes
*/
check_via=no # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5060
children=4
fifo="/tmp/ser_fifo"
fifo_mode=0666
listen=213.178.216.44
# ------------------ module loading ----------------------------------
#
#
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/nathelper.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
loadmodule "/usr/local/lib/ser/modules/xlog.so"
loadmodule "/usr/local/lib/ser/modules/acc.so"
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"
#
# ----------------- setting module-specific parameters ---------------
#
#
# -- usrloc params --
#
modparam("usrloc", "db_url", "mysql://user:password@domain.us/ser")
modparam("usrloc", "db_mode", 1)
#
#
# -- auth params --
#
modparam("auth_db", "db_url", "mysql://user:password@domain.us/ser")
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
#
#
# -- nathelper params --
#
modparam("registrar", "nat_flag", 6)
modparam("nathelper", "natping_interval", 30) # Ping interval 30 s
modparam("nathelper", "ping_nated_only", 1) # Ping only clients behind NAT
#
#
# -- acc params --
#
modparam("acc", "db_url", "mysql://ser:heslo@ns2.italycomnet.it/ser")
modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 1)
modparam("acc", "failed_transactions", 1)
modparam("acc", "report_cancels", 1)
modparam("acc", "log_fmt", "cdfimorstup")
modparam("acc", "log_level", 1)
modparam("acc", "report_ack", 0)
#
#
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# -- tm params --
modparam("tm", "fr_timer", 20)
modparam("tm", "fr_inv_timer", 40)
modparam("tm", "wt_timer", 5)
#
#
#
#
# ------------------------- request routing logic -------------------
# main routing logic
route{
if(nat_uac_test("3"))
{
if((method == "REGISTER") || !(search("^Record-Route:")))
{
log("LOG:Someone trying to register from private IP, rewriting\n");
fix_nated_contact();
if(method == "INVITE")
{
fix_nated_sdp("1");
};
force_rport();
setflag(6);
};
};
# 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 > max_len ) {
sl_send_reply("513", "Message too big");
break;
};
#
# Accounting
if (method=="INVITE" || method=="BYE") {
setflag(1);
};
#
#
# 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
record_route();
# loose-route processing
if (loose_route()) {
# mark routing logic in request
t_relay();
append_hf("P-hint: rr-enforced\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") {
if (!www_authorize("voip.mydomain.it", "subscriber")) {
www_challenge("voip.mydomain.it", "0");
break;
};
save("location");
break;
};
#
lookup("aliases") ;
#
#
if (!lookup("location")) {
if (method=="INVITE") {
if ( (uri=~"sip:[0-9]{5,20}@.*") ) {
rewritehostport( "pstngw.com:5060" );
forward( pstngw.com, 5060 );
break;
};
sl_send_reply("404", "Not Found");
break;
} else {
# forward to user's current destination
t_relay();
break;
};
};
};
append_hf("P-hint: usrloc applied\r\n");
route(1);
}
#
route[1]
{
# !! Nathelper
if (uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)" &&
!search("^Route:")){
sl_send_reply("479", "We don't forward to private IP addresses");
break;
};
# if client or server know to be behind a NAT, enable relay
if (isflagset(6)) {
force_rtp_proxy();
};
#
# NAT processing of replies; apply to all transactions (for example,
# re-INVITEs from public to private UA are hard to identify as
# NATed at the moment of request processing); look at replies
t_on_reply("1");
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
}
# !! Nathelper
onreply_route[1] {
if (isflagset(6) && status =~ "(180)|(183)|2[0-9][0-9]") {
# fix_nated_contact();
if (!search("^Content-Length:\ 0")) {
force_rtp_proxy();
};
# force_rtp_proxy();
};
if (nat_uac_test("1")) {
fix_nated_contact();
};
}
Dear ALL:
My scenario is two domains(domainA, domainB), two SER sip server
(SER_A, SER_B) and two UAs (UA_A, UA_B).
If UA_A registers to SER_A using a numberic ID (886701234567)
and another UA_B registers to SER_B using a numberic ID (886207654321).
How can SER_A know to forward to call to UA_B under SER_B with only
numberic ID? Is it possible?
If it is impossible, now SER_A and SER_B using the same DB, does this
question have answer?
How can SER_A search the DB and find the UA_B's URI or
886207654321(a)domainB.com with only 886207654321?
Can someone give me a ser.cfg to reference? Please....
Charles
Hi Greger,
> Any conclusions or progress you have made after the discussion on the
> mailing list? I learned a few things :-) Tried to summarize my
> understanding of the different issues and how I understood the
> "recommended" approach, but didn't see any response from you.
There was a lot that had to be done in the meanwhile, sorry ;o)
But here's my current (not perfect but perfectly working) solution:
Locations are replicated on SIP-layer using forward_tcp(...) (thanks to
Juha for the hint) on one side and save_noreply(...) on the other side.
This works very reliable with three SERs although it wouldn't scale
much, so this has to be improved in the future.
The config looks like:
if(method == "REGISTER")
{
if(src_ip==<IP of peer1> || src_ip==<IP of peer2>)
{
save_noreply("location");
}
else
{
if(!www_authorize("<my domain>", "subscriber"))
{
www_challenge("<my domain>", "0");
break;
}
if(!check_to())
{
sl_send_reply("403", "Use To=username next time");
break;
}
if(!save("location")) { sl_reply_error(); break; }
forward_tcp("<IP of peer1", 5060);
forward_tcp("<IP of peer2", 5060);
}
break;
}
The usrloc modules operates in write-through-mode so locations are
always synched to the db.
When a SER goes down, I've a script for recovering the location tables,
and it looks like:
mysqldump -h${SER_PEER} -u${DB_RUSER} -p${DB_RPASS} -Q \
--extended-insert --add-drop-table ser ${SER_LOCATIONS} \
| mysql -u${DB_LUSER} -p${DB_LPASS} ser
/usr/local/ser/sbin/ser.sh start
where $SER_LOCATIONS holds the location tables like "location",
"aliases" and so on.
What still has to be done is replicating the nonce value so UAs with
DNS-SRV implementations which change the server on each request and SERs
behind load balancers will work too.
It's not as nifty as using diameter or something like that but it grants
me some reprieve ;o)
For distributing FIFO commands to provision call forwards and read SER's
status etc I wrote an XML-RPC server which communicates with SER's
unixsocket-FIFO-interface. So a simple PHP script communicating with a
SER looks like this:
$url = "http://my.server:5080/xmlrpc";
$method = "fifo.execute";
$fifocmd = "ul_show_contact";
$fifoparams = array("location", "012345");
$ar = array("cmdname"=>$fifocmd,"cmdparams"=>$fifoparams);
$request = xmlrpc_encode_request($method, $ar);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $request);
$response = curl_exec($ch);
$xmlar = xmlrpc_decode($response);
if(xmlrpc_is_fault($xmlar))
{ /* fault processing, print the error */ }
else
{ /* normal processing, print the response parameters etc */ }
The XML-RPC solution seems to be more flexible to me than the
TCP-interface for SER because it can not only execute FIFO commands but
can easily be extended to communicate with the mediaproxy for example.
But this opinion may depend on one's needs.
The licensing question of the XML-RPC server is still not clear (chiefs,
you know), but I hope I get it licensed as GPL.
Cheers,
Andy