Then where do i have to insert the codes in ser.cfg, the timeout for forward
to voicemail?
I tried some places but not successfull
My ser.cfg is from onsip ser mediaproxy examle;
Here,
# $Id: nat-mediaproxy.cfg 9 2005-08-19 15:30:55Z /CN=Greger V.
Teigre/emailAddress=greger(a)onsip.org $
debug=3
fork=yes
log_stderror=no
listen=192.0.2.13 # INSERT YOUR IP ADDRESS HERE
port=5060
children=4
dns=no
rev_dns=no
fifo="/tmp/ser_fifo"
fifo_db_url="mysql://ser:heslo@localhost/ser"
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/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_db.so"
loadmodule "/usr/local/lib/ser/modules/uri.so"
loadmodule "/usr/local/lib/ser/modules/uri_db.so"
loadmodule "/usr/local/lib/ser/modules/domain.so"
loadmodule "/usr/local/lib/ser/modules/mediaproxy.so"
loadmodule "/usr/local/lib/ser/modules/nathelper.so"
loadmodule "/usr/local/lib/ser/modules/textops.so"
modparam("auth_db|domain|uri_db|usrloc", "db_url",
"mysql://ser:heslo@localhost/ser")
modparam("auth_db", "calculate_ha1", 1)
modparam("auth_db", "password_column", "password")
modparam("nathelper", "rtpproxy_disable", 1)
modparam("nathelper", "natping_interval", 0)
modparam("mediaproxy","natping_interval", 30)
modparam("mediaproxy","mediaproxy_socket",
"/var/run/mediaproxy.sock")
modparam("mediaproxy","sip_asymmetrics","/usr/local/etc/ser/sip-clients")
modparam("mediaproxy","rtp_asymmetrics","/usr/local/etc/ser/rtp-clients")
modparam("usrloc", "db_mode", 2)
modparam("registrar", "nat_flag", 6)
modparam("rr", "enable_full_lr", 1)
route {
#
-----------------------------------------------------------------
# Sanity Check Section
#
-----------------------------------------------------------------
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483", "Too Many Hops");
break;
};
if (msg:len > max_len) {
sl_send_reply("513", "Message Overflow");
break;
};
#
-----------------------------------------------------------------
# Record Route Section
#
-----------------------------------------------------------------
if (method=="INVITE" && client_nat_test("3")) {
# INSERT YOUR IP ADDRESS HERE
record_route_preset("192.0.2.13:5060;nat=yes");
} else if (method!="REGISTER") {
record_route();
};
#
-----------------------------------------------------------------
# Call Tear Down Section
#
-----------------------------------------------------------------
if (method=="BYE" || method=="CANCEL") {
end_media_session();
};
#
-----------------------------------------------------------------
# Loose Route Section
#
-----------------------------------------------------------------
if (loose_route()) {
if (has_totag() && (method=="INVITE" ||
method=="ACK")) {
if (client_nat_test("3") ||
search("^Route:.*;nat=yes")) {
setflag(6);
use_media_proxy();
};
};
route(1);
break;
};
#
-----------------------------------------------------------------
# Call Type Processing Section
#
-----------------------------------------------------------------
if (uri!=myself) {
route(4);
route(1);
break;
};
if (method=="CANCEL") {
route(1);
break;
} else if (method=="INVITE") {
route(3);
break;
} else if (method=="REGISTER") {
route(2);
break;
};
lookup("aliases");
if (uri!=myself) {
route(4);
route(1);
break;
};
if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
break;
};
route(1);
}
route[1] {
#
-----------------------------------------------------------------
# Default Message Handler
#
-----------------------------------------------------------------
t_on_reply("1");
if (!t_relay()) {
if (method=="INVITE" || method=="ACK") {
end_media_session();
};
sl_reply_error();
};
}
route[2] {
#
-----------------------------------------------------------------
# REGISTER Message Handler
#
----------------------------------------------------------------
sl_send_reply("100", "Trying");
if (!search("^Contact:[ ]*\*") &&
client_nat_test("7")) {
setflag(6);
fix_nated_register();
force_rport();
};
if (!www_authorize("","subscriber")) {
www_challenge("","0");
break;
};
if (!check_to()) {
sl_send_reply("401", "Unauthorized");
break;
};
consume_credentials();
if (!save("location")) {
sl_reply_error();
};
}
route[3] {
#
-----------------------------------------------------------------
# INVITE Message Handler
#
-----------------------------------------------------------------
if (!proxy_authorize("","subscriber")) {
proxy_challenge("","0");
break;
} else if (!check_from()) {
sl_send_reply("403", "Use From=ID");
break;
};
consume_credentials();
if (client_nat_test("3")) {
setflag(7);
force_rport();
fix_nated_contact();
};
lookup("aliases");
if (uri!=myself) {
route(4);
route(1);
break;
};
if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
break;
};
route(4);
route(1);
}
route[4] {
#
-----------------------------------------------------------------
# NAT Traversal Section
#
-----------------------------------------------------------------
if (isflagset(6) || isflagset(7)) {
use_media_proxy();
};
}
onreply_route[1] {
if ((isflagset(6) || isflagset(7)) &&
(status=~"(180)|(183)|2[0-9][0-9]")) {
if (!search("^Content-Length:[ ]*0")) {
use_media_proxy();
};
};
if (client_nat_test("1")) {
fix_nated_contact();
};
}
Toygun
Read the more recent SEMS documentation. vm.so was
deprecated.
You now use other methods (depending on whether
you're using a fifo or a
unix socket in SEMS).
For instance, I use:
if(!t_write_unix("/tmp/am_sock","voicemail")) {
t_reply("500","error contacting sems");
};
On Wed, 1 Feb 2006 20:44:36 +0200, Toygun Mavinil wrote
Hi,
I installed ser 0.9.6 on fc4
Compiled and installed with all modules but vm.so module is missing.
Looked at the source modules directory, there is no vm directory or file.
I installed sems from cvs
Sems is working
Also
Do i have to add down lines to ser.cfg
loadmodule "/home/srouter/sip_router/modules/vm/vm.so"
modparam("vm", "auth_db|domain|uri_db|usrloc", "db_url",
"mysql://ser:heslo@localhost/ser")
modparam("vm", "email_column",
"email")
modparam("vm", "subscriber_table", "subscriber")
modparam("vm", "user_column", "username")
modparam("vm", "domain_column", "domain")
if(method=="ACK" || method=="INVITE" || method=="BYE"){
if (!t_newtran()) {
log("could not create new
transaction\n");
sl_send_reply("500","could not create
new transaction");
break;
};
t_reply("100","Trying -- just wait a minute
!");
if(method=="INVITE"){
log("**************** vm start - begin
******************\n");
if(!vm("/tmp/am_fifo","voicemail")){
log("could not contact the
answer machine\n");
t_reply("500","could not
contact the answer machine");
};
log("**************** vm start - end
******************\n");
} else
if(method=="BYE"){
log("**************** vm end - begin
******************\n");
if(!vm("/tmp/am_fifo","bye")){
log("could not contact the
answer machine\n");
t_reply("500","could not
contact the answer machine");
};
log("**************** vm end - end
******************\n");
};
break;
};
if (method=="CANCEL") {
sl_send_reply("200", "cancels are junked
here");
break;
};
sl_send_reply("501", "method not understood here");
Toygun