hi,
i am facing the following situation.
UA1 calls a user(UA2) who does not answer. the control comes to failure_route where i try another UA (UA3). but as UA3 rings, SER sends 408 Request timeout to UA1 and call gets disconnected.
this is the SIP message flow.
UA1 SER UA2 UA3 INVITE----------------> INVITE--------------> <----------------TRYING <----------------RINGING <------------------RINGING
CANCEL--------------> <---------------------408
INVITE----------------------------------------> <---------------------487 ACK-------------------> <-----------------------OK
<-------------------------------------------TRYING
<--------------------------------------------RINGING
(but UA already has got the busy tone) and does not hear this ringing.
if 408 was not sent to UA1, then the call could have been established.
what is going wrong,
regards,
tulika
Tulika, This is not a function of SER, but your ser.cfg file. We have just released a new Getting Started document at onsip.org that you may use as a reference to identify why your ser.cfg causes a 408 to be sent. g-)
Tulika Pradhan wrote:
hi,
i am facing the following situation.
UA1 calls a user(UA2) who does not answer. the control comes to failure_route where i try another UA (UA3). but as UA3 rings, SER sends 408 Request timeout to UA1 and call gets disconnected.
this is the SIP message flow.
UA1 SER UA2 UA3 INVITE----------------> INVITE--------------> <----------------TRYING <----------------RINGING <------------------RINGING
CANCEL-------------->
<---------------------408
INVITE----------------------------------------> <---------------------487 ACK-------------------> <-----------------------OK
<-------------------------------------------TRYING
<--------------------------------------------RINGING
(but UA already has got the busy tone) and does not hear this ringing.
if 408 was not sent to UA1, then the call could have been established.
what is going wrong,
regards,
tulika
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
my ser.cfg file is attached below.
any help/pointers for what the problem may be would be great.
the problem comes when i dial anynumber starting with '3'
i want 8001211 to be dialed and if there is failure, then 8001210 to be dialed.
thanks,
tulika
# # $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 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/acc.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" loadmodule "/usr/lib/ser/modules/exec.so" loadmodule "/usr/lib/ser/modules/uri.so" loadmodule "/usr/lib/ser/modules/textops.so" loadmodule "/usr/lib/ser/modules/xlog.so" # ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 2)
# -- auth params -- modparam("auth_db", "db_url", "sql://ser:heslo@localhost/ser") modparam("auth_db", "calculate_ha1", 1) # # 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("acc", "log_level", 1) modparam("acc", "db_flag", 1) modparam("tm", "fr_inv_timer", 15) modparam("tm", "fr_timer", 10) # 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 # 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) record_route(); if (uri==myself) { if (method=="REGISTER") {
save("location"); break; };
if (method==INVITE) { if (uri=~"^sip:0[0-9]*@") { log(1, "beginning with 0\n"); rewritehost("192.168.1.201"); rewriteport("5060"); t_relay_to_udp("192.168.1.201","5065"); break; } else if (uri=~"^sip:500@") { log(1, "Accessing Voicemail\n"); setflag(1); rewriteport("5065"); } else if (uri=~"^sip:3[0-9]*@203.197.212.208") { # call hunt numbers beginning with 3 log(1, "beginning with 3\n"); seturi("sip:8001211@192.168.1.201"); append_hf("P-hint: call hunt\r\n"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_on_failure("1"); t_relay();
} if (!lookup("location")) { if (search("(P-hint): call hunt")) { log(1, "Call Hunt number not in location- Hangup\n"); #exec_msg("echo $SIP_OUSER >> /root/temp; echo $SIP_USER >> /root/temp; echo $SIP_OURI >> /root/temp; echo $SIP_RURI >> /root/temp"); # goto next number exec_dset("/etc/ser/getnextnumber1 $SIP_OUSER; echo>/dev/null;"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding as user not logged in..\n"); rewritehost("192.168.1.201"); rewriteport("5065"); t_relay_to_udp("192.168.1.201","5065"); break; }
} t_on_failure("1");
} } if (!t_relay()) { sl_reply_error(); }; }
failure_route[1] { log(1,"Failure 1\n");
if (search("(P-hint): call hunt")) { log(1, "Call Hunt number failure - Hangup\n"); append_branch("sip:8001210@192.168.1.201"); t_on_failure("2"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding ..\n"); revert_uri(); rewritehostport(192.168.1.201:5065"); append_branch(); t_relay(); } }
failure_route[2] { # log (1, "in failure route 2\n"); }
} } if (!t_relay()) {
t_relay_to_udp("192.168.1.201","5065"); break;
if (method!="REGISTER") record_route();
From: "Greger V. Teigre" greger@teigre.com To: "Tulika Pradhan" tulikapradhan@hotmail.com, serusers@lists.iptel.org Subject: Re: [Serusers] 408 to Caller UA when CANCEL to Callee Date: Fri, 16 Sep 2005 08:36:53 +0200
Tulika, This is not a function of SER, but your ser.cfg file. We have just released a new Getting Started document at onsip.org that you may use as a reference to identify why your ser.cfg causes a 408 to be sent. g-)
Tulika Pradhan wrote:
hi,
i am facing the following situation.
UA1 calls a user(UA2) who does not answer. the control comes to failure_route where i try another UA (UA3). but as UA3 rings, SER sends 408 Request timeout to UA1 and call gets disconnected.
this is the SIP message flow.
UA1 SER UA2 UA3 INVITE----------------> INVITE--------------> <----------------TRYING <----------------RINGING <------------------RINGING
CANCEL-------------->
<---------------------408
INVITE----------------------------------------> <---------------------487 ACK-------------------> <-----------------------OK
<-------------------------------------------TRYING
<--------------------------------------------RINGING
(but UA already has got the busy tone) and does not hear this ringing.
if 408 was not sent to UA1, then the call could have been established.
what is going wrong,
regards,
tulika
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
what happens if you increase your timeout values, i.e send cancel before you get the timeout
Iqbal
Tulika Pradhan wrote:
my ser.cfg file is attached below.
any help/pointers for what the problem may be would be great.
the problem comes when i dial anynumber starting with '3'
i want 8001211 to be dialed and if there is failure, then 8001210 to be dialed.
thanks,
tulika
# # $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 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/acc.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" loadmodule "/usr/lib/ser/modules/exec.so" loadmodule "/usr/lib/ser/modules/uri.so" loadmodule "/usr/lib/ser/modules/textops.so" loadmodule "/usr/lib/ser/modules/xlog.so" # ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 2)
# -- auth params -- modparam("auth_db", "db_url", "sql://ser:heslo@localhost/ser") modparam("auth_db", "calculate_ha1", 1) # # 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("acc", "log_level", 1) modparam("acc", "db_flag", 1) modparam("tm", "fr_inv_timer", 15) modparam("tm", "fr_timer", 10) # 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 # 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) record_route(); if (uri==myself) { if (method=="REGISTER") { save("location"); break; }; if (method==INVITE) { if (uri=~"^sip:0[0-9]*@") { log(1, "beginning with 0\n"); rewritehost("192.168.1.201"); rewriteport("5060"); t_relay_to_udp("192.168.1.201","5065"); break; } else if (uri=~"^sip:500@") { log(1, "Accessing Voicemail\n"); setflag(1); rewriteport("5065"); } else if
(uri=~"^sip:3[0-9]*@203.197.212.208") { # call hunt numbers beginning with 3 log(1, "beginning with 3\n"); seturi("sip:8001211@192.168.1.201"); append_hf("P-hint: call hunt\r\n"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_on_failure("1"); t_relay();
} if (!lookup("location")) { if (search("(P-hint): call hunt")) { log(1, "Call Hunt number not in
location- Hangup\n"); #exec_msg("echo $SIP_OUSER >> /root/temp; echo $SIP_USER >> /root/temp; echo $SIP_OURI >> /root/temp; echo $SIP_RURI >> /root/temp"); # goto next number
exec_dset("/etc/ser/getnextnumber1 $SIP_OUSER; echo>/dev/null;"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding as user not logged in..\n"); rewritehost("192.168.1.201"); rewriteport("5065"); t_relay_to_udp("192.168.1.201","5065"); break; }
} t_on_failure("1"); } } if (!t_relay()) { sl_reply_error(); };
}
failure_route[1] { log(1,"Failure 1\n");
if (search("(P-hint): call hunt")) { log(1, "Call Hunt number failure - Hangup\n"); append_branch("sip:8001210@192.168.1.201"); t_on_failure("2"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru>
<%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding ..\n"); revert_uri(); rewritehostport(192.168.1.201:5065"); append_branch(); t_relay(); } }
failure_route[2] { # log (1, "in failure route 2\n"); }
} } if (!t_relay()) { t_relay_to_udp("192.168.1.201","5065"); break; if (method!="REGISTER") record_route();
From: "Greger V. Teigre" greger@teigre.com To: "Tulika Pradhan" tulikapradhan@hotmail.com, serusers@lists.iptel.org Subject: Re: [Serusers] 408 to Caller UA when CANCEL to Callee Date: Fri, 16 Sep 2005 08:36:53 +0200
Tulika, This is not a function of SER, but your ser.cfg file. We have just released a new Getting Started document at onsip.org that you may use as a reference to identify why your ser.cfg causes a 408 to be sent. g-)
Tulika Pradhan wrote:
hi,
i am facing the following situation.
UA1 calls a user(UA2) who does not answer. the control comes to failure_route where i try another UA (UA3). but as UA3 rings, SER sends 408 Request timeout to UA1 and call gets disconnected.
this is the SIP message flow.
UA1 SER UA2 UA3 INVITE----------------> INVITE--------------> <----------------TRYING <----------------RINGING <------------------RINGING
CANCEL-------------->
<---------------------408
INVITE----------------------------------------> <---------------------487 ACK-------------------> <-----------------------OK
<-------------------------------------------TRYING
<--------------------------------------------RINGING
(but UA already has got the busy tone) and does not hear this ringing.
if 408 was not sent to UA1, then the call could have been established.
what is going wrong,
regards,
tulika
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
.
You config file shows "(uri=~"^si"^sip:3[0-9]*@203.197.212.208") " is this really what you meant? I think the first "^si" is a typo is it not?
-Steve
Iqbal wrote:
what happens if you increase your timeout values, i.e send cancel before you get the timeout
Iqbal
Tulika Pradhan wrote:
my ser.cfg file is attached below.
any help/pointers for what the problem may be would be great.
the problem comes when i dial anynumber starting with '3'
i want 8001211 to be dialed and if there is failure, then 8001210 to be dialed.
thanks,
tulika
# # $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 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/acc.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" loadmodule "/usr/lib/ser/modules/exec.so" loadmodule "/usr/lib/ser/modules/uri.so" loadmodule "/usr/lib/ser/modules/textops.so" loadmodule "/usr/lib/ser/modules/xlog.so" # ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 2)
# -- auth params -- modparam("auth_db", "db_url", "sql://ser:heslo@localhost/ser") modparam("auth_db", "calculate_ha1", 1) # # 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("acc", "log_level", 1) modparam("acc", "db_flag", 1) modparam("tm", "fr_inv_timer", 15) modparam("tm", "fr_timer", 10) # 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 # 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) record_route(); if (uri==myself) { if (method=="REGISTER") { save("location"); break; }; if (method==INVITE) { if (uri=~"^sip:0[0-9]*@") { log(1, "beginning with 0\n"); rewritehost("192.168.1.201"); rewriteport("5060"); t_relay_to_udp("192.168.1.201","5065"); break; } else if (uri=~"^sip:500@") { log(1, "Accessing Voicemail\n"); setflag(1); rewriteport("5065"); } else if
(uri=~"^sip:3[0-9]*@203.197.212.208") { # call hunt numbers beginning with 3 log(1, "beginning with 3\n"); seturi("sip:8001211@192.168.1.201"); append_hf("P-hint: call hunt\r\n"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_on_failure("1"); t_relay();
} if (!lookup("location")) { if (search("(P-hint): call hunt")) { log(1, "Call Hunt number not
in location- Hangup\n"); #exec_msg("echo $SIP_OUSER >> /root/temp; echo $SIP_USER >> /root/temp; echo $SIP_OURI >> /root/temp; echo $SIP_RURI >> /root/temp"); # goto next number
exec_dset("/etc/ser/getnextnumber1 $SIP_OUSER; echo>/dev/null;"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding as user not logged in..\n"); rewritehost("192.168.1.201"); rewriteport("5065"); t_relay_to_udp("192.168.1.201","5065"); break; }
} t_on_failure("1"); } } if (!t_relay()) { sl_reply_error(); };
}
failure_route[1] { log(1,"Failure 1\n");
if (search("(P-hint): call hunt")) { log(1, "Call Hunt number failure - Hangup\n"); append_branch("sip:8001210@192.168.1.201"); t_on_failure("2"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru>
<%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding ..\n"); revert_uri(); rewritehostport(192.168.1.201:5065"); append_branch(); t_relay(); } }
failure_route[2] { # log (1, "in failure route 2\n"); }
} } if (!t_relay()) { t_relay_to_udp("192.168.1.201","5065"); break; if (method!="REGISTER") record_route();
From: "Greger V. Teigre" greger@teigre.com To: "Tulika Pradhan" tulikapradhan@hotmail.com, serusers@lists.iptel.org Subject: Re: [Serusers] 408 to Caller UA when CANCEL to Callee Date: Fri, 16 Sep 2005 08:36:53 +0200
Tulika, This is not a function of SER, but your ser.cfg file. We have just released a new Getting Started document at onsip.org that you may use as a reference to identify why your ser.cfg causes a 408 to be sent. g-)
Tulika Pradhan wrote:
hi,
i am facing the following situation.
UA1 calls a user(UA2) who does not answer. the control comes to failure_route where i try another UA (UA3). but as UA3 rings, SER sends 408 Request timeout to UA1 and call gets disconnected.
this is the SIP message flow.
UA1 SER UA2 UA3 INVITE----------------> INVITE--------------> <----------------TRYING <----------------RINGING <------------------RINGING
CANCEL-------------->
<---------------------408
INVITE----------------------------------------> <---------------------487 ACK-------------------> <-----------------------OK
<-------------------------------------------TRYING
<--------------------------------------------RINGING
(but UA already has got the busy tone) and does not hear this ringing.
if 408 was not sent to UA1, then the call could have been established.
what is going wrong,
regards,
tulika
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
.
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
did I miss it...where ?
Steve Blair wrote:
You config file shows "(uri=~"^si"^sip:3[0-9]*@203.197.212.208") " is this really what you meant? I think the first "^si" is a typo is it not?
-Steve
Iqbal wrote:
what happens if you increase your timeout values, i.e send cancel before you get the timeout
Iqbal
Tulika Pradhan wrote:
my ser.cfg file is attached below.
any help/pointers for what the problem may be would be great.
the problem comes when i dial anynumber starting with '3'
i want 8001211 to be dialed and if there is failure, then 8001210 to be dialed.
thanks,
tulika
# # $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 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/acc.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" loadmodule "/usr/lib/ser/modules/exec.so" loadmodule "/usr/lib/ser/modules/uri.so" loadmodule "/usr/lib/ser/modules/textops.so" loadmodule "/usr/lib/ser/modules/xlog.so" # ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 2)
# -- auth params -- modparam("auth_db", "db_url", "sql://ser:heslo@localhost/ser") modparam("auth_db", "calculate_ha1", 1) # # 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("acc", "log_level", 1) modparam("acc", "db_flag", 1) modparam("tm", "fr_inv_timer", 15) modparam("tm", "fr_timer", 10) # 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 # 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) record_route(); if (uri==myself) { if (method=="REGISTER") { save("location"); break; }; if (method==INVITE) { if (uri=~"^sip:0[0-9]*@") { log(1, "beginning with 0\n"); rewritehost("192.168.1.201"); rewriteport("5060"); t_relay_to_udp("192.168.1.201","5065"); break; } else if (uri=~"^sip:500@") { log(1, "Accessing Voicemail\n"); setflag(1); rewriteport("5065"); } else if
(uri=~"^sip:3[0-9]*@203.197.212.208") { # call hunt numbers beginning with 3 log(1, "beginning with 3\n"); seturi("sip:8001211@192.168.1.201"); append_hf("P-hint: call hunt\r\n"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_on_failure("1"); t_relay();
} if (!lookup("location")) { if (search("(P-hint): call hunt")) { log(1, "Call Hunt number not
in location- Hangup\n"); #exec_msg("echo $SIP_OUSER >> /root/temp; echo $SIP_USER >> /root/temp; echo $SIP_OURI >> /root/temp; echo $SIP_RURI >> /root/temp"); # goto next number
exec_dset("/etc/ser/getnextnumber1 $SIP_OUSER; echo>/dev/null;"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding as user not logged in..\n"); rewritehost("192.168.1.201"); rewriteport("5065"); t_relay_to_udp("192.168.1.201","5065"); break; }
} t_on_failure("1"); } } if (!t_relay()) { sl_reply_error(); };
}
failure_route[1] { log(1,"Failure 1\n");
if (search("(P-hint): call hunt")) { log(1, "Call Hunt number failure - Hangup\n"); append_branch("sip:8001210@192.168.1.201"); t_on_failure("2"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru>
<%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding ..\n"); revert_uri(); rewritehostport(192.168.1.201:5065"); append_branch(); t_relay(); } }
failure_route[2] { # log (1, "in failure route 2\n"); }
} } if (!t_relay()) { t_relay_to_udp("192.168.1.201","5065"); break; if (method!="REGISTER") record_route();
From: "Greger V. Teigre" greger@teigre.com To: "Tulika Pradhan" tulikapradhan@hotmail.com, serusers@lists.iptel.org Subject: Re: [Serusers] 408 to Caller UA when CANCEL to Callee Date: Fri, 16 Sep 2005 08:36:53 +0200
Tulika, This is not a function of SER, but your ser.cfg file. We have just released a new Getting Started document at onsip.org that you may use as a reference to identify why your ser.cfg causes a 408 to be sent. g-)
Tulika Pradhan wrote:
hi,
i am facing the following situation.
UA1 calls a user(UA2) who does not answer. the control comes to failure_route where i try another UA (UA3). but as UA3 rings, SER sends 408 Request timeout to UA1 and call gets disconnected.
this is the SIP message flow.
UA1 SER UA2 UA3 INVITE----------------> INVITE--------------> <----------------TRYING <----------------RINGING <------------------RINGING
CANCEL-------------->
<---------------------408
INVITE----------------------------------------> <---------------------487 ACK-------------------> <-----------------------OK
<-------------------------------------------TRYING
<--------------------------------------------RINGING
(but UA already has got the busy tone) and does not hear this ringing.
if 408 was not sent to UA1, then the call could have been established.
what is going wrong,
regards,
tulika
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
.
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Look at the middle of his routing statements. There is the following section of code :
---- cut here ----
} else if (uri=~"^sip:500@") { log(1, "Accessing Voicemail\n"); setflag(1); rewriteport("5065"); } else if (uri=~"^si"^sip:3[0-9]*@203.197.212.208") { # call hunt numbers beginning with 3 log(1, "beginning with 3\n"); seturi("sip:8001211@192.168.1.201");
--- end cut ----
See the line beginning with "rewriteport("5065")" ?
Iqbal wrote:
did I miss it...where ?
Steve Blair wrote:
You config file shows "(uri=~"^si"^sip:3[0-9]*@203.197.212.208") " is this really what you meant? I think the first "^si" is a typo is it not?
-Steve
Iqbal wrote:
what happens if you increase your timeout values, i.e send cancel before you get the timeout
Iqbal
Tulika Pradhan wrote:
my ser.cfg file is attached below.
any help/pointers for what the problem may be would be great.
the problem comes when i dial anynumber starting with '3'
i want 8001211 to be dialed and if there is failure, then 8001210 to be dialed.
thanks,
tulika
# # $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 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/acc.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" loadmodule "/usr/lib/ser/modules/exec.so" loadmodule "/usr/lib/ser/modules/uri.so" loadmodule "/usr/lib/ser/modules/textops.so" loadmodule "/usr/lib/ser/modules/xlog.so" # ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 2)
# -- auth params -- modparam("auth_db", "db_url", "sql://ser:heslo@localhost/ser") modparam("auth_db", "calculate_ha1", 1) # # 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("acc", "log_level", 1) modparam("acc", "db_flag", 1) modparam("tm", "fr_inv_timer", 15) modparam("tm", "fr_timer", 10) # 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 # 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) record_route(); if (uri==myself) { if (method=="REGISTER") { save("location"); break; }; if (method==INVITE) { if (uri=~"^sip:0[0-9]*@") { log(1, "beginning with 0\n"); rewritehost("192.168.1.201"); rewriteport("5060"); t_relay_to_udp("192.168.1.201","5065"); break; } else if (uri=~"^sip:500@") { log(1, "Accessing Voicemail\n"); setflag(1); rewriteport("5065"); } else
if (uri=~"^sip:3[0-9]*@203.197.212.208") { # call hunt numbers beginning with 3 log(1, "beginning with 3\n"); seturi("sip:8001211@192.168.1.201"); append_hf("P-hint: call hunt\r\n"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_on_failure("1"); t_relay();
} if (!lookup("location")) { if (search("(P-hint): call hunt")) { log(1, "Call Hunt number not
in location- Hangup\n"); #exec_msg("echo $SIP_OUSER
/root/temp; echo $SIP_USER >> /root/temp; echo $SIP_OURI >>
/root/temp; echo $SIP_RURI >> /root/temp"); # goto next number
exec_dset("/etc/ser/getnextnumber1 $SIP_OUSER; echo>/dev/null;"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding as user not logged in..\n"); rewritehost("192.168.1.201"); rewriteport("5065"); t_relay_to_udp("192.168.1.201","5065"); break; }
} t_on_failure("1"); } } if (!t_relay()) { sl_reply_error(); };
}
failure_route[1] { log(1,"Failure 1\n");
if (search("(P-hint): call hunt")) { log(1, "Call Hunt number failure - Hangup\n"); append_branch("sip:8001210@192.168.1.201"); t_on_failure("2"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru>
<%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding ..\n"); revert_uri(); rewritehostport(192.168.1.201:5065"); append_branch(); t_relay(); } }
failure_route[2] { # log (1, "in failure route 2\n"); }
} } if (!t_relay()) { t_relay_to_udp("192.168.1.201","5065"); break; if (method!="REGISTER") record_route();
From: "Greger V. Teigre" greger@teigre.com To: "Tulika Pradhan" tulikapradhan@hotmail.com, serusers@lists.iptel.org Subject: Re: [Serusers] 408 to Caller UA when CANCEL to Callee Date: Fri, 16 Sep 2005 08:36:53 +0200
Tulika, This is not a function of SER, but your ser.cfg file. We have just released a new Getting Started document at onsip.org that you may use as a reference to identify why your ser.cfg causes a 408 to be sent. g-)
Tulika Pradhan wrote:
hi,
i am facing the following situation.
UA1 calls a user(UA2) who does not answer. the control comes to failure_route where i try another UA (UA3). but as UA3 rings, SER sends 408 Request timeout to UA1 and call gets disconnected.
this is the SIP message flow.
UA1 SER UA2 UA3 INVITE----------------> INVITE--------------> <----------------TRYING <----------------RINGING <------------------RINGING
CANCEL-------------->
<---------------------408
INVITE----------------------------------------> <---------------------487 ACK-------------------> <-----------------------OK
<-------------------------------------------TRYING
<--------------------------------------------RINGING
(but UA already has got the busy tone) and does not hear this ringing.
if 408 was not sent to UA1, then the call could have been established.
what is going wrong,
regards,
tulika
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
.
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
:-), Friday, heavy lunch
Iqbal
Steve Blair wrote:
Look at the middle of his routing statements. There is the following section of code :
---- cut here ---- } else if (uri=~"^sip:500@") { log(1, "Accessing Voicemail\n"); setflag(1); rewriteport("5065"); } else if
(uri=~"^si"^sip:3[0-9]*@203.197.212.208") { # call hunt numbers beginning with 3 log(1, "beginning with 3\n"); seturi("sip:8001211@192.168.1.201");
--- end cut ----
See the line beginning with "rewriteport("5065")" ?
Iqbal wrote:
did I miss it...where ?
Steve Blair wrote:
You config file shows "(uri=~"^si"^sip:3[0-9]*@203.197.212.208") " is this really what you meant? I think the first "^si" is a typo is it not?
-Steve
Iqbal wrote:
what happens if you increase your timeout values, i.e send cancel before you get the timeout
Iqbal
Tulika Pradhan wrote:
my ser.cfg file is attached below.
any help/pointers for what the problem may be would be great.
the problem comes when i dial anynumber starting with '3'
i want 8001211 to be dialed and if there is failure, then 8001210 to be dialed.
thanks,
tulika
# # $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 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/acc.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" loadmodule "/usr/lib/ser/modules/exec.so" loadmodule "/usr/lib/ser/modules/uri.so" loadmodule "/usr/lib/ser/modules/textops.so" loadmodule "/usr/lib/ser/modules/xlog.so"
# ----------------- setting module-specific parameters
# -- usrloc params --
modparam("usrloc", "db_mode", 2)
# -- auth params -- modparam("auth_db", "db_url", "sql://ser:heslo@localhost/ser") modparam("auth_db", "calculate_ha1", 1) # # 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("acc", "log_level", 1) modparam("acc", "db_flag", 1) modparam("tm", "fr_inv_timer", 15) modparam("tm", "fr_timer", 10) # 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 # 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) record_route(); if (uri==myself) { if (method=="REGISTER") { save("location"); break; }; if (method==INVITE) { if (uri=~"^sip:0[0-9]*@") { log(1, "beginning with 0\n"); rewritehost("192.168.1.201"); rewriteport("5060"); t_relay_to_udp("192.168.1.201","5065"); break; } else if (uri=~"^sip:500@") { log(1, "Accessing Voicemail\n"); setflag(1); rewriteport("5065"); } else
if (uri=~"^sip:3[0-9]*@203.197.212.208") { # call hunt numbers beginning with 3 log(1, "beginning with 3\n"); seturi("sip:8001211@192.168.1.201"); append_hf("P-hint: call hunt\r\n"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_on_failure("1"); t_relay();
} if (!lookup("location")) { if (search("(P-hint): call hunt")) { log(1, "Call Hunt number
not in location- Hangup\n"); #exec_msg("echo $SIP_OUSER
> /root/temp; echo $SIP_USER >> /root/temp; echo $SIP_OURI >>
/root/temp; echo $SIP_RURI >> /root/temp"); # goto next number
exec_dset("/etc/ser/getnextnumber1 $SIP_OUSER; echo>/dev/null;"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding as user not logged in..\n"); rewritehost("192.168.1.201"); rewriteport("5065"); t_relay_to_udp("192.168.1.201","5065"); break; }
} t_on_failure("1"); } } if (!t_relay()) { sl_reply_error(); };
}
failure_route[1] { log(1,"Failure 1\n");
if (search("(P-hint): call hunt")) { log(1, "Call Hunt number failure - Hangup\n"); append_branch("sip:8001210@192.168.1.201"); t_on_failure("2"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru>
<%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding ..\n"); revert_uri(); rewritehostport(192.168.1.201:5065"); append_branch(); t_relay(); } }
failure_route[2] { # log (1, "in failure route 2\n"); }
} } if (!t_relay()) { t_relay_to_udp("192.168.1.201","5065"); break; if (method!="REGISTER") record_route();
From: "Greger V. Teigre" greger@teigre.com To: "Tulika Pradhan" tulikapradhan@hotmail.com, serusers@lists.iptel.org Subject: Re: [Serusers] 408 to Caller UA when CANCEL to Callee Date: Fri, 16 Sep 2005 08:36:53 +0200
Tulika, This is not a function of SER, but your ser.cfg file. We have just released a new Getting Started document at onsip.org that you may use as a reference to identify why your ser.cfg causes a 408 to be sent. g-)
Tulika Pradhan wrote:
> hi, > > i am facing the following situation. > > UA1 calls a user(UA2) who does not answer. the control comes to > failure_route where i try another UA (UA3). but as UA3 rings, SER > sends 408 Request timeout to UA1 and call gets disconnected. > > this is the SIP message flow. > > UA1 SER UA2 > UA3 > INVITE----------------> > INVITE--------------> > <----------------TRYING > <----------------RINGING > <------------------RINGING > > > CANCEL--------------> > <---------------------408 > > INVITE----------------------------------------> > <---------------------487 > ACK-------------------> > <-----------------------OK > > <-------------------------------------------TRYING > > <--------------------------------------------RINGING > > (but UA already has got the busy tone) and does not hear this > ringing. > > if 408 was not sent to UA1, then the call could have been > established. > > what is going wrong, > > regards, > > tulika > > > _______________________________________________ > Serusers mailing list > serusers@lists.iptel.org > http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
.
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
hello,
that was a problem when i did cut and paste from the ser.cfg, it should be as below,
} else if (uri=~"^sip:500@") { log(1, "Accessing Voicemail\n"); setflag(1); rewriteport("5065"); t_relay_to_udp("192.168.1.201","5065"); break;
} else if (uri=~"^sip:3[0-9]*@192.168.1.201") { # call hunt numbers beginning with 3 log(1, "beginning with 3\n"); seturi("sip:8001211@192.168.1.201"); append_hf("P-hint: call hunt\r\n"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_on_failure("1"); t_relay(); }
-tulika
From: Iqbal iqbal@gigo.co.uk To: Steve Blair blairs@isc.upenn.edu CC: Tulika Pradhan tulikapradhan@hotmail.com, serusers@lists.iptel.org Subject: Re: [Serusers] 408 to Caller UA when CANCEL to Callee Date: Fri, 16 Sep 2005 14:34:06 +0100
:-), Friday, heavy lunch
Iqbal
Steve Blair wrote:
Look at the middle of his routing statements. There is the following section of code :
---- cut here ---- } else if (uri=~"^sip:500@") { log(1, "Accessing Voicemail\n"); setflag(1); rewriteport("5065"); } else if
(uri=~"^si"^sip:3[0-9]*@203.197.212.208") { # call hunt numbers beginning with 3 log(1, "beginning with 3\n"); seturi("sip:8001211@192.168.1.201");
--- end cut ----
See the line beginning with "rewriteport("5065")" ?
Iqbal wrote:
did I miss it...where ?
Steve Blair wrote:
You config file shows "(uri=~"^si"^sip:3[0-9]*@203.197.212.208") " is this really what you meant? I think the first "^si" is a typo is it not?
-Steve
Iqbal wrote:
what happens if you increase your timeout values, i.e send cancel before you get the timeout
Iqbal
Tulika Pradhan wrote:
my ser.cfg file is attached below.
any help/pointers for what the problem may be would be great.
the problem comes when i dial anynumber starting with '3'
i want 8001211 to be dialed and if there is failure, then 8001210 to be dialed.
thanks,
tulika
# # $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 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/acc.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" loadmodule "/usr/lib/ser/modules/exec.so" loadmodule "/usr/lib/ser/modules/uri.so" loadmodule "/usr/lib/ser/modules/textops.so" loadmodule "/usr/lib/ser/modules/xlog.so" # ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 2)
# -- auth params -- modparam("auth_db", "db_url", "sql://ser:heslo@localhost/ser") modparam("auth_db", "calculate_ha1", 1) # # 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("acc", "log_level", 1) modparam("acc", "db_flag", 1) modparam("tm", "fr_inv_timer", 15) modparam("tm", "fr_timer", 10) # 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 # 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) record_route(); if (uri==myself) { if (method=="REGISTER") { save("location"); break; }; if (method==INVITE) { if (uri=~"^sip:0[0-9]*@") { log(1, "beginning with 0\n"); rewritehost("192.168.1.201"); rewriteport("5060"); t_relay_to_udp("192.168.1.201","5065"); break; } else if (uri=~"^sip:500@") { log(1, "Accessing Voicemail\n"); setflag(1); rewriteport("5065"); } else if
(uri=~"^sip:3[0-9]*@203.197.212.208") { # call hunt numbers beginning with 3 log(1, "beginning with 3\n"); seturi("sip:8001211@192.168.1.201"); append_hf("P-hint: call hunt\r\n"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_on_failure("1"); t_relay();
} if (!lookup("location")) { if (search("(P-hint): call hunt")) { log(1, "Call Hunt number not
in location- Hangup\n"); #exec_msg("echo $SIP_OUSER >> /root/temp; echo $SIP_USER >> /root/temp; echo $SIP_OURI >> /root/temp; echo $SIP_RURI >> /root/temp"); # goto next number
exec_dset("/etc/ser/getnextnumber1 $SIP_OUSER; echo>/dev/null;"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding as user not logged in..\n"); rewritehost("192.168.1.201"); rewriteport("5065"); t_relay_to_udp("192.168.1.201","5065"); break; }
} t_on_failure("1"); } } if (!t_relay()) { sl_reply_error(); };
}
failure_route[1] { log(1,"Failure 1\n");
if (search("(P-hint): call hunt")) { log(1, "Call Hunt number failure - Hangup\n"); append_branch("sip:8001210@192.168.1.201"); t_on_failure("2"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru>
<%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding ..\n"); revert_uri(); rewritehostport(192.168.1.201:5065"); append_branch(); t_relay(); } }
failure_route[2] { # log (1, "in failure route 2\n"); }
} } if (!t_relay()) { t_relay_to_udp("192.168.1.201","5065"); break; if (method!="REGISTER") record_route();
>From: "Greger V. Teigre" greger@teigre.com >To: "Tulika Pradhan" tulikapradhan@hotmail.com, >serusers@lists.iptel.org >Subject: Re: [Serusers] 408 to Caller UA when CANCEL to Callee >Date: Fri, 16 Sep 2005 08:36:53 +0200 > >Tulika, >This is not a function of SER, but your ser.cfg file. We have just >released a new Getting Started document at onsip.org that you may use >as a reference to identify why your ser.cfg causes a 408 to be sent. >g-) > >Tulika Pradhan wrote: > >>hi, >> >>i am facing the following situation. >> >>UA1 calls a user(UA2) who does not answer. the control comes to >>failure_route where i try another UA (UA3). but as UA3 rings, SER >>sends 408 Request timeout to UA1 and call gets disconnected. >> >>this is the SIP message flow. >> >>UA1 SER UA2 >>UA3 >>INVITE----------------> >> INVITE--------------> >> <----------------TRYING >> <----------------RINGING >><------------------RINGING >> >> >> CANCEL--------------> >><---------------------408 >> >>INVITE----------------------------------------> >> <---------------------487 >> ACK-------------------> >> <-----------------------OK >> >><-------------------------------------------TRYING >> >><--------------------------------------------RINGING >> >>(but UA already has got the busy tone) and does not hear this >>ringing. >> >>if 408 was not sent to UA1, then the call could have been >>established. >> >>what is going wrong, >> >>regards, >> >>tulika >> >> >>_______________________________________________ >>Serusers mailing list >>serusers@lists.iptel.org >>http://lists.iptel.org/mailman/listinfo/serusers > > > > > >
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
.
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
if i increase my fr_inv_timer, then the CANCEL is sent after that amount of time and 408 also gets sent at the same time. both CANCEL and 408 get sent to callee and caller respectively when the fr_inv_timer expires. how do i separate the sending of the two messages.
-tulika
From: Iqbal iqbal@gigo.co.uk To: Tulika Pradhan tulikapradhan@hotmail.com CC: greger@teigre.com, serusers@lists.iptel.org Subject: Re: [Serusers] 408 to Caller UA when CANCEL to Callee Date: Fri, 16 Sep 2005 12:13:45 +0100
what happens if you increase your timeout values, i.e send cancel before you get the timeout
Iqbal
Tulika Pradhan wrote:
my ser.cfg file is attached below.
any help/pointers for what the problem may be would be great.
the problem comes when i dial anynumber starting with '3'
i want 8001211 to be dialed and if there is failure, then 8001210 to be dialed.
thanks,
tulika
# # $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 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/acc.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" loadmodule "/usr/lib/ser/modules/exec.so" loadmodule "/usr/lib/ser/modules/uri.so" loadmodule "/usr/lib/ser/modules/textops.so" loadmodule "/usr/lib/ser/modules/xlog.so" # ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 2)
# -- auth params -- modparam("auth_db", "db_url", "sql://ser:heslo@localhost/ser") modparam("auth_db", "calculate_ha1", 1) # # 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("acc", "log_level", 1) modparam("acc", "db_flag", 1) modparam("tm", "fr_inv_timer", 15) modparam("tm", "fr_timer", 10) # 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 # 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) record_route(); if (uri==myself) { if (method=="REGISTER") { save("location"); break; }; if (method==INVITE) { if (uri=~"^sip:0[0-9]*@") { log(1, "beginning with 0\n"); rewritehost("192.168.1.201"); rewriteport("5060"); t_relay_to_udp("192.168.1.201","5065"); break; } else if (uri=~"^sip:500@") { log(1, "Accessing Voicemail\n"); setflag(1); rewriteport("5065"); } else if
(uri=~"^sip:3[0-9]*@203.197.212.208") { # call hunt numbers beginning with 3 log(1, "beginning with 3\n"); seturi("sip:8001211@192.168.1.201"); append_hf("P-hint: call hunt\r\n"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_on_failure("1"); t_relay();
} if (!lookup("location")) { if (search("(P-hint): call hunt")) { log(1, "Call Hunt number not in
location- Hangup\n"); #exec_msg("echo $SIP_OUSER >> /root/temp; echo $SIP_USER >> /root/temp; echo $SIP_OURI >> /root/temp; echo $SIP_RURI >> /root/temp"); # goto next number exec_dset("/etc/ser/getnextnumber1 $SIP_OUSER; echo>/dev/null;"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding as user not logged in..\n"); rewritehost("192.168.1.201"); rewriteport("5065"); t_relay_to_udp("192.168.1.201","5065"); break; }
} t_on_failure("1"); } } if (!t_relay()) { sl_reply_error(); };
}
failure_route[1] { log(1,"Failure 1\n");
if (search("(P-hint): call hunt")) { log(1, "Call Hunt number failure - Hangup\n"); append_branch("sip:8001210@192.168.1.201"); t_on_failure("2"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru>
<%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding ..\n"); revert_uri(); rewritehostport(192.168.1.201:5065"); append_branch(); t_relay(); } }
failure_route[2] { # log (1, "in failure route 2\n"); }
} } if (!t_relay()) { t_relay_to_udp("192.168.1.201","5065"); break; if (method!="REGISTER") record_route();
From: "Greger V. Teigre" greger@teigre.com To: "Tulika Pradhan" tulikapradhan@hotmail.com, serusers@lists.iptel.org Subject: Re: [Serusers] 408 to Caller UA when CANCEL to Callee Date: Fri, 16 Sep 2005 08:36:53 +0200
Tulika, This is not a function of SER, but your ser.cfg file. We have just released a new Getting Started document at onsip.org that you may use as a reference to identify why your ser.cfg causes a 408 to be sent. g-)
Tulika Pradhan wrote:
hi,
i am facing the following situation.
UA1 calls a user(UA2) who does not answer. the control comes to failure_route where i try another UA (UA3). but as UA3 rings, SER sends 408 Request timeout to UA1 and call gets disconnected.
this is the SIP message flow.
UA1 SER UA2 UA3 INVITE----------------> INVITE--------------> <----------------TRYING <----------------RINGING <------------------RINGING
CANCEL-------------->
<---------------------408
INVITE----------------------------------------> <---------------------487 ACK-------------------> <-----------------------OK
<-------------------------------------------TRYING
<--------------------------------------------RINGING
(but UA already has got the busy tone) and does not hear this ringing.
if 408 was not sent to UA1, then the call could have been established.
what is going wrong,
regards,
tulika
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
.
Tulika, You would be better off referencing with "best practice" (or at least well-proven) than to expect others to help you with your config file. g-)
Tulika Pradhan wrote:
my ser.cfg file is attached below.
any help/pointers for what the problem may be would be great.
the problem comes when i dial anynumber starting with '3'
i want 8001211 to be dialed and if there is failure, then 8001210 to be dialed.
thanks,
tulika
# # $Id: ser.cfg,v 1.21.4.1 2003/11/10 15:35:15 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/acc.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" loadmodule "/usr/lib/ser/modules/exec.so" loadmodule "/usr/lib/ser/modules/uri.so" loadmodule "/usr/lib/ser/modules/textops.so" loadmodule "/usr/lib/ser/modules/xlog.so" # ----------------- setting module-specific parameters ---------------
# -- usrloc params --
modparam("usrloc", "db_mode", 2)
# -- auth params -- modparam("auth_db", "db_url", "sql://ser:heslo@localhost/ser") modparam("auth_db", "calculate_ha1", 1) # # 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("acc", "log_level", 1) modparam("acc", "db_flag", 1) modparam("tm", "fr_inv_timer", 15) modparam("tm", "fr_timer", 10) # 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 # 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) record_route(); if (uri==myself) { if (method=="REGISTER") { save("location"); break; }; if (method==INVITE) { if (uri=~"^sip:0[0-9]*@") { log(1, "beginning with 0\n"); rewritehost("192.168.1.201"); rewriteport("5060"); t_relay_to_udp("192.168.1.201","5065"); break; } else if (uri=~"^sip:500@") { log(1, "Accessing Voicemail\n"); setflag(1); rewriteport("5065"); } else if
(uri=~"^sip:3[0-9]*@203.197.212.208") { # call hunt numbers beginning with 3 log(1, "beginning with 3\n"); seturi("sip:8001211@192.168.1.201"); append_hf("P-hint: call hunt\r\n"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_on_failure("1"); t_relay();
} if (!lookup("location")) { if (search("(P-hint): call hunt")) { log(1, "Call Hunt number not in
location- Hangup\n"); #exec_msg("echo $SIP_OUSER >> /root/temp; echo $SIP_USER >> /root/temp; echo $SIP_OURI >> /root/temp; echo $SIP_RURI >> /root/temp"); # goto next number exec_dset("/etc/ser/getnextnumber1 $SIP_OUSER; echo>/dev/null;"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru> <%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding as user not logged in..\n"); rewritehost("192.168.1.201"); rewriteport("5065"); t_relay_to_udp("192.168.1.201","5065"); break; }
} t_on_failure("1"); } } if (!t_relay()) { sl_reply_error(); };
}
failure_route[1] { log(1,"Failure 1\n");
if (search("(P-hint): call hunt")) { log(1, "Call Hunt number failure - Hangup\n"); append_branch("sip:8001210@192.168.1.201"); t_on_failure("2"); xlog("L_ERR", "time [%Tf] method <%rm> r-uri <%ru>
<%tu>\n"); t_relay(); } else { log(1, "Asterisk forwarding ..\n"); revert_uri(); rewritehostport(192.168.1.201:5065"); append_branch(); t_relay(); } }
failure_route[2] { # log (1, "in failure route 2\n"); }
} } if (!t_relay()) { t_relay_to_udp("192.168.1.201","5065"); break; if (method!="REGISTER") record_route();
From: "Greger V. Teigre" greger@teigre.com To: "Tulika Pradhan" tulikapradhan@hotmail.com, serusers@lists.iptel.org Subject: Re: [Serusers] 408 to Caller UA when CANCEL to Callee Date: Fri, 16 Sep 2005 08:36:53 +0200
Tulika, This is not a function of SER, but your ser.cfg file. We have just released a new Getting Started document at onsip.org that you may use as a reference to identify why your ser.cfg causes a 408 to be sent. g-)
Tulika Pradhan wrote:
hi,
i am facing the following situation.
UA1 calls a user(UA2) who does not answer. the control comes to failure_route where i try another UA (UA3). but as UA3 rings, SER sends 408 Request timeout to UA1 and call gets disconnected.
this is the SIP message flow.
UA1 SER UA2 UA3 INVITE----------------> INVITE--------------> <----------------TRYING <----------------RINGING <------------------RINGING
CANCEL-------------->
<---------------------408
INVITE----------------------------------------> <---------------------487 ACK-------------------> <-----------------------OK
<-------------------------------------------TRYING
<--------------------------------------------RINGING
(but UA already has got the busy tone) and does not hear this ringing. if 408 was not sent to UA1, then the call could have been established. what is going wrong,
regards,
tulika
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers