OK here is my config file. Also you are right Klaus. There is no user
8000. It should just be an alias. And users 1001 and 1000 have
voicemail configured. Once I take out the aliases everything works fine.
#
# $Id: ser.cfg,v 1.21.2.1 2003/07/30 16:46:18 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
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=5060
children=4
fifo="/tmp/ser_fifo"
# ------------------ module loading ----------------------------------
# Uncomment this if you want to use SQL database
loadmodule "/usr/lib/ser/modules/mysql.so"
loadmodule "/usr/lib/ser/modules/sl.so"
loadmodule "/usr/lib/ser/modules/tm.so"
loadmodule "/usr/lib/ser/modules/rr.so"
loadmodule "/usr/lib/ser/modules/maxfwd.so"
loadmodule "/usr/lib/ser/modules/usrloc.so"
loadmodule "/usr/lib/ser/modules/registrar.so"
loadmodule "/usr/lib/ser/modules/group.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/lib/ser/modules/auth.so"
loadmodule "/usr/lib/ser/modules/auth_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")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
modparam("group", "db_url",
"mysql://ser:heslo@localhost/ser")
# time to give up on ringing -- global timer, applies to
# all transactions
modparam("tm", "fr_inv_timer", 10)
# ------------------------- request routing logic -------------------
# main routing logic
route {
if (!mf_process_maxfwd_header("10")) {
log("LOG: Too many hops\n");
sl_send_reply("483", "Alas Too Many Hops");
break;
};
if (!(method=="REGISTER")) record_route();
if (loose_route()) {
t_relay();
break;
};
if (!uri==myself) {
t_relay();
break;
};
if (method == "REGISTER") {
if (!save("location")) {
sl_reply_error();
};
break;
};
# Destination PSTN or H323?
if( uri=~"^sip:9[0-9]*@ mydomain.com" )
{
route(1);
break;
};
if( uri=~"^sip:\*74@mydomain.com" )
{
route(2);
break;
};
# does the user wish redirection on no availability? (i.e., is
he
# in the voicemail group?) -- determine it now and store it in
# flag 4, before we rewrite the flag using UsrLoc
#if (is_user_in("Request-URI", "voicemail")) {
# setflag(4);
#};
# native SIP destinations are handled using our USRLOC DB
if (!lookup("location")) {
# handle user which was not found
route(4);
break;
};
# if user is on-line and is in voicemail group, enable
redirection
if (method == "INVITE" ) {
t_on_failure("1");
# && isflagset(4)
};
t_relay();
}
# ------------ Send it to our PSTN ----------------------
route[1] {
# Route to PSTN Gateways(s)
if (uri=~"^sip:9[0-9]*@mydomain.com") { ## This assumes
that th
e caller is
log("Forwarding to PSTN\n"); ## registered
in our re
alm
strip(1);
t_relay_to_udp( "gateway.com", "5060" );
break;
};
}
route[2] {
if (uri=~"^sip:\*74@mydomain.com") { ## This assumes
that the c
aller is
log("Picking up a Call on PSTN\n"); ##
registered in
our realm
t_relay_to_udp( "gateway.com", "5060" );
break;
};
}
# ------------- handling of unavailable user ------------------
route[4] {
# non-Voip -- just send "off-line"
if (!(method == "INVITE" || method == "ACK" || method ==
"CANCEL")) {
sl_send_reply("404", "Not Found");
break;
};
# not voicemail subscriber
#if (!isflagset(4)) {
# sl_send_reply("404", "Not Found and no voicemail turned
on");
# break;
#};
# forward to voicemail now
rewritehostport("voicemail.com:5090");
t_relay_to_udp("voicemail.com", "5090");
t_relay_to_tcp ("voicemail.com","5090");
}
# if forwarding downstream did not succeed, try voicemail running
# at voicemail.com:5090
failure_route[1] {
revert_uri();
rewritehostport("voicemail.com:5090");
append_branch();
t_relay_to_udp("voicemail.com", "5090");
t_relay_to_tcp ("voicemail.com","5090");
}
On Thursday, February 5, 2004, at 04:49 PM, Klaus Darilion wrote:
Srbislav Cvetkovic wrote:
Hello,
I have a question. I have two users 1000 and 1001. I have two
grandstream phones that I registered with those usernames. I have
added aliases for them:
serctl alias add 8000 sip:1000@mydomain.com
serctl alias add 8000 sip:1001@mydomain.com
When i try to call 8000 from a softphone both of the phones ring.
However after the timer is out I get 408: Request Timeout error
instead of going to voicemail. I have a user 8000 with voicemail
configured. my voicemail is running on a different machine though.
voicemail for user 8000? 8000 ist just an alias - shouldn't be
voicemail configured for user 1000 or 1001? Also your ser.cfg would be
useful.
klaus
> Any clues?
> I tried adding it to the location table but still the same issue. I
> just want my phones to ring together, and if no answer go to
> voicemail. If it's picked up, then it will ring all phones again, so
> someone else can take the second call.I would like to use aliases so
> I we can still call local extensions internaly.
> thanks in advance
> Srbo Cvetkovic | CityNet, Inc.
> srbo(a)city-net.com | Pittsburgh, PA voice: 412.481.5406
> | fax: 412.431.1315
> _______________________________________________
> Serusers mailing list
> serusers(a)lists.iptel.org
>
http://lists.iptel.org/mailman/listinfo/serusers
>
Srbo Cvetkovic | CityNet, Inc.
srbo(a)city-net.com | Pittsburgh, PA
voice: 412.481.5406 | fax: 412.431.1315