Hi,
i'm trying to forward the calls to deltathree's netfork but the problem is that i can CANCEL the call but if the call has started i can't send BYE to the server. SER is not recording any BYE messages and a simple call from 10-20 sec. is recorder as 100-110 sec.'s on deltathree servers.
Here is my config:
debug=3 fork=yes log_stderror=no
listen=192.168.0.2 #listen=127.0.0.1
# hostname matching an alias will satisfy the condition uri==myself". alias=intranet.com.mk alias=192.168.0.2
# dns - Uses dns to check if it is necessary to add a "received=" field # to a via. Default is no. # rev_dns - Same as dns but use reverse DNS.
dns=no rev_dns=no
port=5060 children=4
# check_via - Turn on or off Via host checking when forwarding replies. # Default is no. arcane. looks for discrepancy between name and # ip address when forwarding replies.
check_via=yes
# syn_branch - Shall the server use stateful synonym branches? It is # faster but not reboot-safe. Default is yes.
syn_branch=yes
# memlog - Debugging level for final memory statistics report. Default # is L_DBG -- memory statistics are dumped only if debug is set high.
memlog=3
# sip_warning - Should replies include extensive warnings? By default # yes, it is good for trouble-shooting.
sip_warning=yes
# fifo - FIFO special file pathname
fifo="/tmp/ser_fifo"
# server_signature - Should locally-generated messages include server's # signature? By default yes, it is good for trouble-shooting.
server_signature=yes
# reply_to_via - A hint to reply modules whether they should send reply # to IP advertised in Via. Turned off by default, which means that # replies are sent to IP address from which requests came.
reply_to_via=no
# user | uid - uid to be used by the server. 99 = nobody.
uid="nobody"
# group | gid - gid to be used by the server. 99 = nobody.
gid="nobody"
# mhomed -- enable calculation of outbound interface; useful on # multihomed servers.
mhomed=0
# ------------- external module loading
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/acc.so" loadmodule "/usr/local/lib/ser/modules/exec.so" loadmodule "/usr/local/lib/ser/modules/group.so" loadmodule "/usr/local/lib/ser/modules/print.so" loadmodule "/usr/local/lib/ser/modules/textops.so" loadmodule "/usr/local/lib/ser/modules/uri.so"
# ------------- tm parameters
modparam("tm", "fr_timer", 12) modparam("tm", "fr_inv_timer", 24)
# ------------- rr parameters modparam("rr", "enable_full_lr", 1) modparam("rr", "append_fromtag", 1)
# ------------- accounting parameters
modparam("acc", "db_url", "sql://ser:heslo@localhost/ser") modparam("acc", "db_flag", 1) modparam("acc", "db_missed_flag", 3)
modparam("acc", "report_ack", 0) modparam("acc", "report_cancels", 1) modparam("acc", "early_media", 1)
# Account failed transactions modparam("acc", "failed_transactions", 1) modparam("acc", "log_fmt", "miocfst")
# ------------- usrloc parameters modparam("usrloc", "db_mode", 2) modparam("usrloc", "timer_interval", 10) modparam("usrloc", "db_url", "sql://ser:heslo@localhost/ser")
# ------------- auth parameters modparam("auth_db", "db_url", "sql://ser:heslo@localhost/ser") modparam("auth_db", "calculate_ha1", yes) modparam("auth_db", "password_column", "password")
# ------------- routing logic
route{ # filter too old messages if (!mf_process_maxfwd_header("10")) { log("LOG: Too many hops\n"); sl_send_reply("483","Too Many Hops"); break; }; if (msg:len > max_len) { sl_send_reply("513", "Message too large"); break; };
/* ********* RR ********************************** */
/* Do strict routing if route headers present */ loose_route();
/* record-route INVITEs -- all subsequent requests must visit us */ if (method=="INVITE") { record_route(); } else if (method=="REGISTER") { log("here is a register"); save("location"); break; };
# now check if it really is a PSTN destination which should be handled # by our gateway; if not, and the request is an invitation, drop it -- # we cannot terminate it in PSTN; relay non-INVITE requests -- it may # be for example BYEs sent by gateway to call originator if (!uri=~"sip:9[0-9]*@.*") { if (method=="INVITE") { sl_send_reply("403", "Call cannot be served here"); setflag(1); } else if(method=="BYE") { setflag(1); t_relay(); } else if(method=="CANCEL") { setflag(1); t_relay(); } else { t_relay(); }; break; };
# account completed transactions via syslog setflag(1);
strip(1);
rewritehostport("natrelay.deltathree.com:5060");
# forward the request now if (!t_relay()) { sl_reply_error(); break; }; }