OK..
I looked at the logs and discovered that usrloc and
registrar MUST have the same value.
When I added both modparams for usrloc and registrar,
OpenSER started without a problem.
Thanks!
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
When I use:
modparam("registrar", "use_domain", 1)
OR
modparam("usrloc", "use_domain", 1)
OpenSER will not start and I get an error.
Any thoughts?
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Hi Guys,
I am trying to get ser to t_relay a communication to a given gateway,
then t_relay to another one if that didn't work. I have tried
t_on_failure and t_on_negative, and failure_route[1] and reply_route[1],
but all I can manage to do is to break my SER config because -
presumably - I'm using old or deprecated commands.
How can I do this please? I'm using:
version: ser 0.9.6 (i386/linux)
flags: STATS: Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, USE_MCAST,
DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, F_MALLOC,
FAST_LOCK-ADAPTIVE_WAIT
ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16,
MAX_URI_SIZE 1024, BUF_SIZE 65535
@(#) $Id: main.c,v 1.197.2.1 2005/07/25 16:56:24 andrei Exp $
main.c compiled on 00:45:42 Jan 11 2006 with gcc 3.3.5
Thanks for helping!
Jean-Michel.
--
Jean-Michel Hiver - http://ykoz.net/
Découvrez la Réunion des Technologies IP & Telecom
TEL: +262 (0)262 55 03 98 - RCS 434 273 330 SAINT PIERRE
Gents,
I am using 0.9.7 for ser along with RTP proxy to do some performance
numbers. I notice that 200 OK for REGISTER method
has a Cseq field as opposed to CSeq field. I found this bug because the UAC
I am using is case sensitive.
Gaurav
Hi
iam getting following error in my syslog
is this bug or common error
ser[6831]: ERROR: t_forward_nonack: failure to add branches
ser[6821]: ERROR: build_req_buf_from_sip_req: out of memory
ser[6821]: ERROR: print_uac_request: no pkg_mem
ram
I am working on a plan to implement VoIP at a company which has 3-4
remote sites across the state connected back to the main headquarters.
I would like to use SER for its scalability and feature set but I am
unsure if it will meet some of my business needs.
I need to have a single SIP domain across the 4 sites while at the same
time ensure remote survivability and access to their local PSTN
connections if the WAN connection to the main headquarters goes down. I
also want to use the WAN links and PSTN connections at each site for
Toll Bypass within the state. Will SER accommodate this type of
architecture?
Thanks,
Jeremy
I am having issues with avp's as part of db_extra. In the below scenario
which ever avp value is listed first in the db_extra statement ends up in
both fields in the table that involve avp's. The Pseudo-variables seem to
get populated correctly.
I have verified that the values are correct in the avp's via the xlog
statement but the sql insert has the wrong values when I send ngrep it.
modparam("avpops","avp_aliases","outbound_cust_id=i:5024;inbound_cust_id=i:5
025")
modparam("acc", "db_extra", "inbound_cust_id=$avp($inbound_cust_id);
src_ip=$si; recv_ip=$Ri; outbound_cust_id=$avp($outbound_cust_id)")
avp_db_query("select id from customers where gateway1 = '$si' or gateway2 =
'$si'","$avp($outbound_cust_id)");
avp_db_query("select cust_id from customer_dids where did =
'$tU'","$avp($inbound_cust_id)");
xlog("L_ERR", "AVP outbound_cust_id [$avp($outbound_cust_id)]\n");
xlog("L_ERR", "AVP inbound_cust_id [$avp($inbound_cust_id)]\n");
Hi all,
I am trying to implement simple call forwarding in my script. The problem is when the call is forwarded to a another registered user and if the user is not in the location table, the message is correctly returned as "User Not Found".
But if the user is present in the location table, the call does not get forwarded and invite comes to the same number again. This happens when the call is forwarded on no answer. I try to do serial forking using avp_pushto() but it does'nt seem to work.
Can someone please help me out. The blind forwarding works perfectly.
Here is my script:
debug=3
fork=yes
log_stderror=no
listen=202.XX.61.XX # INSERT YOUR IP ADDRESS HERE
port=5060
children=4
dns=no
rev_dns=no
fifo="/tmp/openser_fifo"
fifo_db_url="mysql://openser:openserrw@localhost/openser"
loadmodule "/usr/local/lib/openser/modules/mysql.so"
loadmodule "/usr/local/lib/openser/modules/sl.so"
loadmodule "/usr/local/lib/openser/modules/tm.so"
loadmodule "/usr/local/lib/openser/modules/rr.so"
loadmodule "/usr/local/lib/openser/modules/maxfwd.so"
loadmodule "/usr/local/lib/openser/modules/usrloc.so"
loadmodule "/usr/local/lib/openser/modules/registrar.so"
loadmodule "/usr/local/lib/openser/modules/auth.so"
loadmodule "/usr/local/lib/openser/modules/auth_db.so"
loadmodule "/usr/local/lib/openser/modules/uri.so"
loadmodule "/usr/local/lib/openser/modules/uri_db.so"
loadmodule "/usr/local/lib/openser/modules/mediaproxy.so"
loadmodule "/usr/local/lib/openser/modules/nathelper.so"
loadmodule "/usr/local/lib/openser/modules/textops.so"
loadmodule "/usr/local/lib/openser/modules/avpops.so"
loadmodule "/usr/local/lib/openser/modules/domain.so"
loadmodule "/usr/local/lib/openser/modules/permissions.so"
modparam("auth_db|permissions|uri_db|usrloc",
"db_url", "mysql://openser:openserrw@localhost/openser")
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("usrloc", "use_domain", 1)
modparam("registrar", "nat_flag", 6)
modparam("registrar", "use_domain", 1)
modparam("rr", "enable_full_lr", 1)
modparam("tm", "fr_inv_timer", 27)
modparam("tm", "fr_inv_timer_avp", "inv_timeout")
modparam("permissions", "db_mode", 1)
modparam("permissions", "trusted_table", "trusted")
modparam("avpops", "avp_url", "mysql://openser:openserrw@localhost/openser")
modparam("avpops", "avp_table", "usr_preferences")
route {
# -----------------------------------------------------------------
# Sanity Check Section
# -----------------------------------------------------------------
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483", "Too Many Hops");
return;
};
if (msg:len > max_len) {
sl_send_reply("513", "Message Overflow");
return;
};
# -----------------------------------------------------------------
# Record Route Section
# -----------------------------------------------------------------
if (method=="INVITE" && client_nat_test("3")) {
# INSERT YOUR IP ADDRESS HERE
record_route_preset("202.XX.61.XX: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);
return;
};
# -----------------------------------------------------------------
# Call Type Processing Section
# -----------------------------------------------------------------
if (!is_uri_host_local()) {
if (is_from_local() || allow_trusted()) {
route(4);
route(1);
} else {
sl_send_reply("403", "Forbidden");
};
return;
};
if (method=="CANCEL") {
route(1);
return;
} else if (method=="INVITE") {
route(3);
return;
} else if (method=="REGISTER") {
route(2);
return;
};
lookup("aliases");
if (uri!=myself) {
route(4);
route(1);
return;
};
if (!lookup("location")) {
sl_send_reply("404", "User Not Found");
return;
};
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");
return;
};
if (!check_to()) {
sl_send_reply("401", "Unauthorized");
return;
};
consume_credentials();
if (!save("location")) {
sl_reply_error();
};
}
route[3] {
# -----------------------------------------------------------------
# INVITE Message Handler
# -----------------------------------------------------------------
if (!allow_trusted()) {
if (!proxy_authorize("","subscriber")) {
proxy_challenge("","0");
return;
} else if (!check_from()) {
sl_send_reply("403", "Use From=ID");
return;
};
consume_credentials();
};
if (client_nat_test("3")) {
setflag(7);
force_rport();
fix_nated_contact();
};
if (uri=~"^sip:1[0-9]{10}@") {
strip(1);
};
lookup("aliases");
if (uri!=myself) {
route(4);
route(1);
return;
};
if (uri=~"^sip:011[0-9]*@") {
route(4);
route(5);
return;
};
if (avp_db_load("$ruri/username", "$avp(s:callfwd)")) {
setflag(22);
avp_pushto("$ruri", "$avp(s:callfwd)");
route(6);
return;
};
if (!lookup("location")) {
/*if (uri=~"^sip:[0-9]{10}@") {
route(4);
route(5);
return;
};*/
sl_send_reply("404", "User Not Found");
return;
};
if (avp_db_load("$ruri/username", "$avp(s:fwdbusy)")) {
if (!avp_check("$avp(s:fwdbusy)", "eq/$ruri/i")) {
setflag(26);
};
};
if (avp_db_load("$ruri/username", "$avp(s:fwdnoanswer)")) {
if (!avp_check("$avp(s:fwdnoanswer)", "eq/$ruri/i")) {
setflag(27);
};
};
t_on_failure("1");
route(4);
route(1);
}
route[4] {
# -----------------------------------------------------------------
# NAT Traversal Section
# -----------------------------------------------------------------
if (isflagset(6) || isflagset(7)) {
if (!isflagset(8)) {
setflag(8);
use_media_proxy();
};
};
}
route[5] {
# -----------------------------------------------------------------
# PSTN Handler
# -----------------------------------------------------------------
rewritehost("216.168.162.97"); # INSERT YOUR PSTN GATEWAY IP ADDRESS
avp_write("i:45", "$avp(s:inv_timeout)");
t_on_failure("1");
route(4);
route(1);
}
route[6] {
# ------------------------------------------------------------------------
# Call Forwarding Reply Route Handler
#
# This must be done as a route block because sl_send_reply() cannot be
# called from the failure_route block
# ------------------------------------------------------------------------
if (uri=~"^sip:1[0-9]{10}@") {
strip(1);
};
lookup("aliases");
if (!isflagset(22)) {
append_branch();
};
if (uri!=myself) {
route(4);
route(1);
return;
};
if (uri=~"^sip:011[0-9]*@") {
route(4);
route(5);
return;
};
if (!lookup("location")) {
/*if (uri=~"^sip:[0-9]{10}@") {
route(4);
route(1);
return;
};*/
sl_send_reply("404", "User Not Found");
return;
};
route(4);
route(1);
}
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();
};
}
failure_route[1] {
if (t_check_status("487")) {
return;
};
if (isflagset(26) && t_check_status("486")) {
if (avp_pushto("$ruri", "$avp(s:fwdbusy)")) {
avp_delete("$avp(s:fwdbusy)");
resetflag(26);
route(6);
return;
};
};
if (isflagset(27) && t_check_status("408")) {
if (avp_pushto("$ruri", "$avp(s:fwdnoanswer)")) {
avp_delete("$avp(s:fwdnoanswer)");
resetflag(27);
route(6);
return;
};
};
end_media_session();
}
---------------------------------
Jiyo cricket on Yahoo! India cricket
Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
Has any one tried doing exec_msg with an awk command.
I want to the line below using the exec_msg command. I basically want to extract the caller's id (from $SIP_HF_CONTACT variable).
uid=`echo $SIP_HF_CONTACT | awk -F : '{print $2}' | awk -F @ '{print($1)}' ;`
Thanks & Regards,
Binu V B
Trikon Electronics Pvt Ltd