Hi, all
I'm implementing a black list, the control access to the gateway and other
control policies and I have a problem with the call forking.
In case of a call that generates a parallel forking I want the capability to
select if accept or refuse the call for each single contact, but if the
first reply that I send to the caller is an error message 4xx, the UA caller
shuts down the call.
What would I have to do to add my reject (caused by my access control
policy) to the call forking administration and so reply an error only if all
contacts can not be reachable?
I'm trying to implement a solution to reply an error only if all the
contacts can not be reachable.
To do this thing I need to know the number of contacts that the lookup
function has found for the request-uri that is arrived ( Is it possible to
know if I have a single contact or a parallel forking?) and, if there are
more than one contact associated to the sip uri, how can I go to serve the
next contact in list without sending a reply for the destinations that I
have to block?
Any suggestion?
Thanks
Daniele
Hi all,
trying to compile the acc.so module from 0.8.12-1rc5 stable cvs is giving me
the following errors:
../../Makefile.modules:21: "you should run make from the main ser directory"
acc.c: In function `acc_rad_request':
acc.c:576: warning: passing arg 1 of `rc_avpair_add' from incompatible
pointer type
acc.c:576: warning: passing arg 2 of `rc_avpair_add' makes pointer from
integer without a cast
acc.c:576: warning: passing arg 3 of `rc_avpair_add' makes integer from
pointer without a cast
acc.c:576: too few arguments to function `rc_avpair_add'
acc.c:581: warning: passing arg 1 of `rc_avpair_add' from incompatible
pointer type
acc.c:581: warning: passing arg 2 of `rc_avpair_add' makes pointer from
integer without a cast
acc.c:581: warning: passing arg 3 of `rc_avpair_add' makes integer from
pointer without a cast
acc.c:581: too few arguments to function `rc_avpair_add'
acc.c:588: warning: passing arg 1 of `rc_avpair_add' from incompatible
pointer type
acc.c:588: warning: passing arg 2 of `rc_avpair_add' makes pointer from
integer without a cast
acc.c:588: warning: passing arg 3 of `rc_avpair_add' makes integer from
pointer without a cast
acc.c:588: too few arguments to function `rc_avpair_add'
acc.c:593: warning: passing arg 1 of `rc_avpair_add' from incompatible
pointer type
acc.c:593: warning: passing arg 2 of `rc_avpair_add' makes pointer from
integer without a cast
acc.c:593: warning: passing arg 3 of `rc_avpair_add' makes integer from
pointer without a cast
acc.c:593: too few arguments to function `rc_avpair_add'
acc.c:612: warning: passing arg 1 of `rc_avpair_add' from incompatible
pointer type
acc.c:612: warning: passing arg 2 of `rc_avpair_add' makes pointer from
integer without a cast
acc.c:612: warning: passing arg 3 of `rc_avpair_add' makes integer from
pointer without a cast
acc.c:612: warning: passing arg 4 of `rc_avpair_add' makes pointer from
integer without a cast
acc.c:612: too few arguments to function `rc_avpair_add'
acc.c:623: warning: passing arg 1 of `rc_avpair_add' from incompatible
pointer type
acc.c:623: warning: passing arg 2 of `rc_avpair_add' makes pointer from
integer without a cast
acc.c:623: warning: passing arg 3 of `rc_avpair_add' makes integer from
pointer without a cast
acc.c:623: warning: passing arg 4 of `rc_avpair_add' makes pointer from
integer without a cast
acc.c:623: too few arguments to function `rc_avpair_add'
acc.c:645: warning: passing arg 1 of `rc_avpair_add' from incompatible
pointer type
acc.c:645: warning: passing arg 2 of `rc_avpair_add' makes pointer from
integer without a cast
acc.c:645: warning: passing arg 3 of `rc_avpair_add' makes integer from
pointer without a cast
acc.c:645: warning: passing arg 4 of `rc_avpair_add' makes pointer from
integer without a cast
acc.c:645: too few arguments to function `rc_avpair_add'
acc.c:656: warning: passing arg 1 of `rc_avpair_add' from incompatible
pointer type
acc.c:656: warning: passing arg 2 of `rc_avpair_add' makes pointer from
integer without a cast
acc.c:656: warning: passing arg 3 of `rc_avpair_add' makes integer from
pointer without a cast
acc.c:656: warning: passing arg 4 of `rc_avpair_add' makes pointer from
integer without a cast
acc.c:656: too few arguments to function `rc_avpair_add'
acc.c:666: warning: passing arg 1 of `rc_avpair_add' from incompatible
pointer type
acc.c:666: warning: passing arg 2 of `rc_avpair_add' makes pointer from
integer without a cast
acc.c:666: warning: passing arg 3 of `rc_avpair_add' makes integer from
pointer without a cast
acc.c:666: warning: passing arg 4 of `rc_avpair_add' makes pointer from
integer without a cast
acc.c:666: too few arguments to function `rc_avpair_add'
acc.c:673: warning: passing arg 1 of `rc_acct' makes pointer from integer
without a cast
acc.c:673: warning: passing arg 2 of `rc_acct' makes integer from pointer
without a cast
acc.c:673: too few arguments to function `rc_acct'
make: *** [acc.o] Error 1
Any ideas?
Thanks alot,
Martin
Tjapko ,
There is no syntax change for ser.cfg in the latest version of
MediaProxy.
Adrian
----
Hello ,
Can someone provide me full working ser.cfg example for latest version
of Mediaproxy (example distributed with new mediaproxy does not seem to
work properly). Herunder you will find the test.cfg that we use.
Regards, Tjapko.
hello friends,
iam using this one two port fxs and one xlite
softphone
in my acc database i observed that only if the called
party cancels the session then only bye messages are
recording in databases if calling party i.e destinatin
cancels the calls no record of bye messages in the
acc
from fxs if we ring to the softphone only invites
are recording not any other i.e no bye and ack
messages
where may be the problem
my config file is
********************************************************
# ----------- global configuration parameters
------------------------
debug=8 # debug level (cmd line:
-dddddddddd)
fork=yes
log_stderror=yes # (cmd line: -E)
/* Uncomment these lines to enter debugging mode
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/local/lib/ser/modules/mysql.so"
loadmodule "/usr/local/lib/ser/modules/exec.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/textops.so"
loadmodule "/usr/local/lib/ser/modules/domain.so"
# Uncomment this if you want digest authentication
# mysql.so must be loaded !
loadmodule "/usr/local/lib/ser/modules/auth.so"
loadmodule "/usr/local/lib/ser/modules/auth_radius.so"
loadmodule "/usr/local/lib/ser/modules/acc.so"
# !! Nathelper
loadmodule "/usr/local/lib/ser/modules/nathelper.so"
# ----------------- setting module-specific parameters
---------------
# -- usrloc params --
#modparam("usrloc", "db_mode", 0)
# Uncomment this if you want to use SQL database
# for persistent storage and comment the previous line
modparam("usrloc", "db_mode", 2)
# -- auth params --
# Uncomment if you are using auth module
#
#modparam("auth_db", "calculate_ha1", yes)
#
# If you set "calculate_ha1" parameter to yes (which
true in this config),
# uncomment also the following parameter)
#
#modparam("auth_db", "password_column", "password")
modparam("auth_radius","radius_config","/root/radiusclient.conf")
modparam("auth_radius","service_type",15)
modparam("acc", "log_level", 1)
modparam("acc", "log_flag", 1)
modparam("acc", "db_flag", 1)
modparam("acc", "db_missed_flag", 2)
modparam("acc", "log_fmt", "miocfst")
modparam("acc", "failed_transactions" ,1)
modparam("acc", "radius_flag", 1)
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# !! Nathelper
modparam("registrar", "nat_flag", 6)
modparam("nathelper", "natping_interval", 30) # Ping
interval 30 s
modparam("nathelper", "ping_nated_only", 1) # Ping
only clients behind NAT
# ------------------------- request routing logic
-------------------
# 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;
};
# !! Nathelper
# Special handling for NATed clients; first,
NAT test is
# executed: it looks for via!=received and
RFC1918 addresses
# in Contact (may fail if line-folding is
used); also,
# the received test should, if completed,
should check all
# vias for rpesence of received
if (nat_uac_test("3")) {
# Allow RR-ed requests, as these may
indicate that
# a NAT-enabled proxy takes care of
it; unless it is
# a REGISTER
if (method == "REGISTER" || !
search("^Record-Route:")) {
log("LOG: Someone trying to
register from private IP, rewriting\n");
# This will work only for user
agents that support symmetric
# communication. We tested quite
many of them and majority is
# smart enough to be symmetric. In
some phones it takes a configuration
# option. With Cisco 7960, it is
called NAT_Enable=Yes, with kphone it is
# called "symmetric media" and
"symmetric signalling".
fix_nated_contact(); # Rewrite
contact with source IP of signalling
if (method == "INVITE") {
fix_nated_sdp("1"); # Add
direction=active to SDP
};
force_rport(); # Add rport
parameter to topmost Via
setflag(6); # Mark as NATed
};
};
setflag(1);
setflag(2);
# 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
if (!method=="REGISTER") record_route();
# subsequent messages withing a dialog should
take the
# path determined by record-routing
if (loose_route()) {
# mark routing logic in request
append_hf("P-hint: rr-enforced\r\n");
route(1);
break;
};
if (!uri==myself) {
# mark routing logic in request
append_hf("P-hint: outbound\r\n");
route(1);
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") {
#cdr tool
if ( method == "REGISTER" ||
method=="INVITE" || method=="BYE" || method ==
"CANCEL" ) {
# save messages in mysql for
CDRTool
exec_msg("/usr/local/etc/ser/sertrace.py; exit 1");
};
#end of cdrtool
# Uncomment this if you want to use digest
authentication
if (uri==myself) {
if (method=="REGISTER")
{
if
(!radius_www_authorize("")) {
www_challenge("", "0");
break;
};
save("location");
break;
};
if (method=="INVITE") {
log(1, "INVITE\n");
setflag(1); /* set for accounting
(the same value as in log_flag!) */
};
if (method=="MESSAGE") {
log(1, "MESSAGE\n");
setflag(1); /* set for accounting
(the same value as in log_flag!) */
};
if ( method=="BYE" || method=="CANCEL" ) {
log (1, "BYE or CANCEL\n");
setflag(1);
};
lookup("aliases");
if (!uri==myself) {
append_hf("P-hint: outbound
alias\r\n");
route(1);
break;
};
# native SIP destinations are handled
using our USRLOC DB
if (!lookup("location")) {
sl_send_reply("404", "Not
Found");
break;
};
};
append_hf("P-hint: usrloc applied\r\n");
route(1);
}
route[1]
{
# !! Nathelper
if
(uri=~"[@:](192\.168\.|10\.|172\.(1[6-9]|2[0-9]|3[0-1])\.)"
&& !search("^Route:")){
sl_send_reply("479", "We don't forward to
private IP addresses");
break;
};
# if client or server know to be behind a NAT,
enable relay
if (isflagset(6)) {
force_rtp_proxy();
};
# NAT processing of replies; apply to all
transactions (for example,
# re-INVITEs from public to private UA are
hard to identify as
# NATed at the moment of request processing);
look at replies
t_on_reply("1");
# send it out now; use stateful forwarding as
it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
}
# !! Nathelper
onreply_route[1] {
# NATed transaction ?
if (isflagset(6) && status =~ "(183)|2[0-9][0-9]")
{
fix_nated_contact();
force_rtp_proxy();
# otherwise, is it a transaction behind a NAT and
we did not
# know at time of request processing ? (RFC1918
contacts)
} else if (nat_uac_test("1")) {
fix_nated_contact();
};
}
so kindly help me
with regards
rama kanth
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
My ser is running fine as is mysql database. I have been monitoring the
ser_fifo file and noticed it never changes in size. Is this normal? Since I
am having trouble getting the serweb working properly (only admin can
login), I was wondering if this is a related problem?
I cannot seem to get my system to work with aliases. I have the userloc
and uri modules enabled as per the manual, as well as lookup("aliases");
command. I tried entering aliases with "serctl alias add 1001
sip:bo@domain.net" as well as "serctl alias add 1001(a)domain.net
sip:bo@domain.net". Both commands successfully complete but I always
get a busy signal on the other phone when I call 1001.
0(14359) SIP Request:
0(14359) method: <INVITE>
0(14359) uri: <sip:1001@domain.net;user=phone>
0(14359) version: <SIP/2.0>
0(14359) parse_headers: flags=1
0(14359) end of header reached, state=5
0(14359) parse_headers: Via found, flags=1
0(14359) parse_headers: this is the first via
0(14359) After parse_msg...
0(14359) preparing to run routing scripts...
0(14359) DEBUG : is_maxfwd_present: searching for max_forwards header
0(14359) parse_headers: flags=128
0(14359) end of header reached, state=9
0(14359) DEBUG: get_hdr_field: <To> [50];
uri=[sip:1001@domain.net;user=phone]
0(14359) DEBUG: to body [<sip:1001@domain.net;user=phone>
]
0(14359) get_hdr_field: cseq <CSeq>: <1> <INVITE>
0(14359) DEBUG: get_hdr_body : content_length=249
0(14359) found end of header
0(14359) DEBUG: is_maxfwd_present: max_forwards header not found!
0(14359) DEBUG: add_param: tag=2562321765
0(14359) end of header reached, state=29
0(14359) parse_headers: flags=256
0(14359) find_first_route(): No Route headers found
0(14359) loose_route(): There is no Route HF
0(14359) check_self - checking if host==us: 26==13 && [domain.net] ==
[x.x.x.x]
0(14359) check_self - checking if port 5060 matches port 5060
0(14359) lookup(): '1001' Not found in usrloc
0(14359) lookup(): '1001' Not found in usrloc
0(14359) parse_headers: flags=-1
0(14359) check_via_address(x.x.x.x, x.x.x.x, 0)
0(14359) receive_msg: cleaning up
0(14359) SIP Request:
0(14359) method: <ACK>
0(14359) uri: <sip:1001@domain.net;user=phone>
0(14359) version: <SIP/2.0>
0(14359) parse_headers: flags=1
0(14359) end of header reached, state=5
0(14359) parse_headers: Via found, flags=1
0(14359) parse_headers: this is the first via
0(14359) After parse_msg...
0(14359) parse_headers: flags=4
0(14359) DEBUG: add_param: tag=4ddff14623b40c25b5f0541000aec456.33da
0(14359) end of header reached, state=29
0(14359) DEBUG: get_hdr_field: <To> [92];
uri=[sip:1001@domain.net;user=phone]
0(14359) DEBUG: to body [<sip:1001@domain.net;user=phone>]
0(14359) DEBUG: sl_filter_ACK : local ACK found -> dropping it!
0(14359) receive_msg: cleaning up
# ser -V
version: ser 0.8.12 (i386/freebsd)
flags: STATS:Off, USE_IPV6, USE_TCP, DISABLE_NAGLE, 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.168 2003/10/12 15:09:08 andrei Exp $
main.c compiled on 14:15:39 Nov 21 2003 with gcc 2.95
Bo Byrd
Hi,
Has any one done using Asterisk/Digium T1 card as PSTN gateway, and SER as
the backend soft switch?
I am looking to install Asterisk boxes in a few cities to act as PSTN
gateways and using SER to accept these calls. SER will have to communicate
with other long distance carriers to allow world wide calling.
Will this combination work? I like to know your comments or suggestions on
this combination.
thanks
Tony Lum
Hello everybody,
I'm trying to configure voicemail using sems. I've
figured out that I have problem with 'vm' module in
second ser instance. In cfg file I have problem with
these two lines:
loadmodule "/usr/lib/ser/modules/vm.so"
modparam("voicemail",
"db_url","sql://root:@127.0.0.1/ser")
I recieve error:
ser[4525]: DBT:dbt_cache_get_db: database
[sql://root:@127.0.0.1/ser] does not exists!
ser[4525]: DBT:dbt_init: cannot get the link to
database
ser[4525]: ERROR; vm_init_child: could not init db
sql://root:@127.0.0.1/ser
ser[4525]: init_mod_child(): Error while initializing
module voicemail
ser[4525]: init_child failed
However I use database properly with same parameters
for other modules. I tried with another database
(created with 'ser_mysql.sh copy vm'), unfortunately I
have same results. I recompiled ser, but I didn't
found lines to uncomment to activate voicemail, so I
concluded that voicemail is enabled by default in ser
0.8.12.
Can you help me solve this problem?
Milivoje
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail
Hi,
I'm getting this message when my grandstream ht286 trys to register. It
seens ht286 isn't sending authorization header field to SER. Or, ht286
sending strange contact (*) disturbs SER to process REGISTER requests ?
This message starts few days ago. As I changed my ser box to last cvs
version these days I'm confuse if it's a grandstream's problem or a
ser's problem.
ngrep logs: attached
--
[]s
Carlo Pires
U 193.126.48.33:5060 -> 200.193.194.142:5060
REGISTER sip:sip.televoip.net SIP/2.0..Via: SIP/2.0/UDP 192.168.0.111;branch=z9hG4bK4977acbbc428883a..From: "Reginaldo Paula Souza" <sip:reginaldo_ptt@sip.televoip.net>;tag=307110492b802983..To: <sip:reginaldo_ptt@sip.televoip.net>..Contact: *..Call-ID: 6221319848b4afe5@192.168.0.111..CSeq: 106 REGISTER..Expires: 0..User-Agent: Grandstream HT286 1.0.4.68..Max-Forwards: 70..Allow: INVITE,ACK,CANCEL,BYE,NOTIFY,REFER,OPTIONS,INFO,SUBSCRIBE..Content-Length: 0....
#
U 200.193.194.142:5060 -> 193.126.48.33:5060
SIP/2.0 401 Unauthorized..Via: SIP/2.0/UDP 192.168.0.111;branch=z9hG4bK4977acbbc428883a;rport=5060;received=193.126.48.33..From: "Reginaldo Paula Souza" <sip:reginaldo_ptt@sip.televoip.net>;tag=307110492b802983..To: <sip:reginaldo_ptt@sip.televoip.net>;tag=a791a9ab0b94eb4c05eab9b15c0fec4f.f9b6..Call-ID: 6221319848b4afe5@192.168.0.111..CSeq: 106 REGISTER..P-NATed-Caller: Yes..WWW-Authenticate: Digest realm="sip.televoip.net", nonce="40d46cd7c8d155389bef79bb516a0a2b2a5524f8"..Server: Sip EXpress router (0.8.13-dev-30-db_api (i386/linux))..Content-Length: 0..Warning: 392 200.193.194.142:5060 "Noisy feedback tells: pid=11293 req_src_ip=193.126.48.33 req_src_port=5060 in_uri=sip:sip.televoip.netout_uri=sip:sip.televoip.net via_cnt==1"....