I'm sure this is pretty straightforward to some of you, but I could use some help with a few issues if someone has the time. Below is my config file. This is running on RedHat 9.
I am having numerous problems.
1) Having issues with correctly increasing the number of children. If I increase it, it fails because it can't connect with mysql. I have tried increasing the number of connections in mysql in the my.cnf file, but it seems to cause even more problems.
2) I only want the call to fail to route 2 for calls that terminate in my network. I don't want calls leaving the network to try to go to voicemail after the time hits.
3) I can't seem to figure out how to format the rewrite/append/etc to trigger the voicemail call. Maybe I don't understand the routing loop. Can someone take a look at the config and give me some ideas?
4) The append to the null/parallel destination that allows the trigger to activate I don't understand at all. Why does it need to be there? Where should it be pointed to?
5) I'm not seeing the activity/routing logs going anywhere. If I run ser manually, I see information on the stderr, but nothing in the database or logs in terms of the connections.
I would really appreciate any help. I have other questions that aren't related to the configuration file, so I will save those to amuse people later.
Thanks,
Stephen
debug = 7 log_stderror=yes check_via=no dns=no rev_dns=no fifo="/tmp/ser_fifo" children=4
# ------------------ module loading ---------------------------------- # modules not listed here for brevity
modparam("tm", "fr_inv_timer", 15 ) modparam("tm", "fr_timer", 10 ) modparam("usrloc", "db_mode", 2) #modparam("auth_db", "db_url","sql://ser:heslo@localhost/ser") modparam("auth_db", "calculate_ha1", yes) modparam("auth_db", "password_column", "password") modparam("voicemail", "db_url","sql://ser:heslo@localhost/ser")
modparam("rr", "enable_full_lr", 1) # -- acc params -- modparam("acc", "report_ack", 1) modparam("acc", "log_level", 1) modparam("acc", "log_flag", 1 ) modparam("acc", "db_flag", 1 ) modparam("acc", "log_missed_flag", 3 ) modparam("acc", "db_missed_flag", 3 ) # report to syslog: From, i-uri, status, digest id modparam("acc", "log_fmt", "fisu" )
# ------------------------- request routing logic -------------------
alias="209.242.10.153" alias="test.net"
route{
if (!mf_process_maxfwd_header("10")) { log("LOG: Too many hops\n"); sl_send_reply("483","Too Many Hops"); break; }; if (len_gt( max_len )) { sl_send_reply("513", "Wow -- Message too large"); break; };
if (loose_route()) { t_relay(); break; }; if (method=="INVITE") {record_route();};
# account completed transactions via syslog setflag(1);
if (src_ip==66.155.138.5) { log("gateway-originated request"); } else { if (uri==myself) { if (method=="REGISTER") { if (!www_authorize("test.net", "subscriber")) { www_challenge("test.net", "0"); break; }; save("location"); break; }; }; }; if (uri=~"sip:voicemail+@") { t_newtran(); t_reply("100", "trying -- just a second"); if (!vm("/tmp/am_fifo","announcement")) { t_reply("500", "SEMS error"); }; break; };
if (uri=~"sip:2[0-9]+@.*") { # JUST FOR TESTING USING 2 AS LOCAL PREFIX if (!lookup("location")) { if (method=="INVITE" || method=="ACK") { t_newtran(); t_reply("100", "trying -- just a second"); if(!vm("/tmp/am_fifo","voicemail")){
t_reply("500", "SEMS error"); }; break; }; break; }; # WHAT SHOULD THIS APPEND BRANCH ACTUALLY POINT TO? # WITHOUT IT, THE CALL GOES DIRECTLY TO VOICEMAIL append_branch("sip:stall@209.242.10.153:9"); } else { rewritehostport("66.155.138.5:5060"); };
t_on_failure("1");
if (!t_relay()) { sl_reply_error(); break; }; }
failure_route[1]{ log(1,"call sent to voicemail due to no answer\n"); if (uri=~"sip:2[0-9]+@.*") { if (method=="INVITE" || method=="ACK") { append_branch("sip:voicemail@209.242.10.153"); t_relay(); }; break; }; }
At 10:26 PM 9/9/2003, Steve Dolloff wrote:
This works great if the user is offline. Is there anyway for voicemail to pick up after a certain time period or after a certain number of rings?
Roughly yes. The closest example is at http://www.iptel.org/ser/doc/seruser/seruser.html#REPLYPROCESSING
There is no number of rings in SIP -- there is the invite_fr timeout.
-Jiri