Hi,
i just imported a new module, called 'userblacklist', into the svn trunk. To
quote from the README:
The userblacklist module allows OpenSER to handle blacklists on a per user
basis. This information is stored in a database table, which is queried to
decide if the number is blacklisted or not.
An additional functionality that this module provides is the ability to handle
global blacklists. This lists are loaded on startup into memory, thus
providing a better performance then in the userblacklist case. This global
lists could also used to prevent the blacklisting of important numbers, as
whitelisting is also supported. This is useful for example to prevent the
customer from blocking emergency call number or service hotlines.
The module exports two functions, check_blacklist and check_user_blacklist for
usage in the config file. Furthermore its provide a FIFO function to reload
the global blacklist cache.
The documentation for this module can be found at:
http://www.openser.org/docs/modules/devel/userblacklist.html
Best regards,
Henning Westerholt
--
Henning Westerholt - Development Consumer Products / DSL Core
1&1 Internet AG, Ernst-Frey-Str. 9, 76135 Karlsruhe
Hi there,
I was trying to do this in OpenSER 1.2.2:
failure_route[1] {
if (t_check_status("302")){
xlog("L_ERR", "302 source ip address is $si");
if (src_ip == 192.168.5.1) {
# Do something
};
};
};
But the proxy sending the 302 (192.168.5.1) is not the one who ends up
in my logs, instead my sip-server (192.168.1.1) who initiated the call
ends up in the log.
"302 source ip address is 192.168.1.1".
Have I understood the "$si" psuedo variable wrong? Can I find the
correct source address of the 302-message somehow?
Br,
/Tobias
When trying to build openser-1.3.0-tls (tarball from openser.org) on
Debian stable, "make all" throws this error:
if [ "no" = "yes" ]; then \
cd utils/db_berkeley; make all ; \
fi ; \
/bin/sh: -c: line 4: syntax error: unexpected end of file
make: *** [utils] Error 2
The last backslash (after "fi ;") is the problem (line #521 in the
top-level Makefile). This is in SVN trunk and 1.3 branch too as far
as I can tell.
Thanks,
Sajith.
--
Don't you wish you had more energy... or less ambition?
9DB8FF06 : CB80 0BA6 7D13 B10A 6FBB D43E B4D2 28AD 9DB8 FF06
echo tbkjui(a)opozfo.jo | tr [b-y] [a-x]
Thank you for your replies.
The sipwise code did have an append branch and a branch route that dropped local branches.
--
zahid
-----Original Message-----
From: "Andreas Granig" <agranig(a)sipwise.com>
To: "Bogdan-Andrei Iancu" <bogdan(a)voice-system.ro>
Cc: "Zahid Mehmood" <zm23(a)columbia.edu>; "users(a)lists.openser.org" <users(a)lists.openser.org>
Sent: 2/28/08 6:32 AM
Subject: Re: [OpenSER-Users] OpenSER 1.2.2 and 302 Moved, funny log issue?
Hi,
Puh, it's been a while since I wrote that, so let me think :)
As far as I remember, the idea was to extract the first branch and push
it into R-URI, then jump somewhere into the route sections where quite
some R-URI manipulation and checking is done (and most of the functions
can only operate on r-uri, so...)... after that, the ruri is again
appended as branch before sending it out. Only problem is that you can
only use one destination.
Bogdan, what exactly do you mean by "if it does append_branch somewhere
later, it will just duplicate a branch"?
Cheers,
Andreas
Bogdan-Andrei Iancu wrote:
> Hi Zahid,
>
> To be honest, I do not see the purpose of this:
>
> # get last URI from destination-set and set it as R-URI
> avp_delete("$avp(s:tmp)/g");
> $avp(s:tmp) = $ds;
> avp_subst("$avp(s:tmp)", "/.*(sip:.+@[^:;>]+).*$/\1/");
> avp_pushto("$ru", "$avp(s:tmp)");
>
> This code fetches the first branch (by using the $ds pv and the regexp)
> and push it as RURI; but if there is no following append_branch(), it
> has 0 effect. And if it does append_branch somewhere later, it will just
> duplicate a branch....
>
> Maybe Andreas (here CCed) can give you some details on this.....
>
> Regards,
> Bogdan
>
>
> Zahid Mehmood wrote:
>> Hi,
>> If get_redirect() is already pushing the contacts as branches,
>> then what is the purpose / benefit / drawback of doing something
>> like this:
>>
>> taken from sipwise online config:
>>
>> if(!get_redirects("1:1"))
>> {
>>
>> xlog("L_ERROR", "Failed to fetch contact '$ct' from
>> 301/302 - M=$rm RURI=$ru F=$fu T=$tu IP=$si ID=$ci\n");
>> acc_db_request("480", "acc");
>> t_reply("480", "Temporarily Unavailable");
>> exit;
>> }
>> # get last URI from destination-set and set it as R-URI
>> avp_delete("$avp(s:tmp)/g");
>> $avp(s:tmp) = $ds;
>> avp_subst("$avp(s:tmp)", "/.*(sip:.+@[^:;>]+).*$/\1/");
>> avp_pushto("$ru", "$avp(s:tmp)");
>>
>>
>> I'd greatly appreciate your answers as they will help me better
>> understand the use of branches/destination set.
>>
>> Thanks.
>>
>>
>
Hello,
I believe your problem is related nat traversal. Do you do port
forwarding on the firewall?
As a tip, you should do record routing on openser. To troubleshoot,
watch the sip traffic on your network and on the firewall box -- see
whether messages are going caller -- asterisk all the time or they are
blocked by firewall.
Cheers,
Daniel
On 02/28/08 12:59, Antonio Basti wrote:
>
> Hi , i’ve a problem with the dispatcher module, for the load balancing
> for asterisk
>
> The schema of the network is this :
>
> Firewall (public ip: 199.199.199.199:5060)
>
> |
>
> |
>
> -------------------
>
> Pc1 pc2
>
> Pc1: 192.168.0.1:5060 Asterisk Pc2:192.168.0.3:5060 Asterisk
>
> Pc1:192.168.0.2:5060 Openser
>
> The ip public is natted with Openser
>
> The dispatcher.list is:
>
> 1 sip:192.168.0.1:5060
>
> 1 sip:192.168.0.3:5060
>
> Openser.cfg:
>
> route{
>
> if ((method=="INVITE") ){
>
> ds_select_dst("1","4"); # 4 = round-robin
>
> t_relay();
>
> exit();
>
> }
>
> }
>
> In asterisk for test there is an ivr ,and when I make a call from an
> other site to this public ip, ast answer but after few seconds I see
> from the log of the pc01 the the call hang but from the remote
> asterisk (the one where I make the call) the call remain up.
>
> The configuration of openser is correct ?
>
> thanks
>
>
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 2898 (20080223) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users(a)lists.openser.org
> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>
Hi , i've a problem with the dispatcher module, for the load balancing for
asterisk
The schema of the network is this :
Firewall (public ip:
199.199.199.199:5060)
|
|
-------------------
Pc1
pc2
Pc1: 192.168.0.1:5060 Asterisk
Pc2:192.168.0.3:5060 Asterisk
Pc1:192.168.0.2:5060 Openser
The ip public is natted with Openser
The dispatcher.list is:
1 sip:192.168.0.1:5060
1 sip:192.168.0.3:5060
Openser.cfg:
route{
if ((method=="INVITE") ){
ds_select_dst("1","4"); # 4 = round-robin
t_relay();
exit();
}
}
In asterisk for test there is an ivr ,and when I make a call from an other
site to this public ip, ast answer but after few seconds I see from the log
of the pc01 the the call hang but from the remote asterisk (the one where I
make the call) the call remain up.
The configuration of openser is correct ?
thanks
Hi, "subscriber" table has a column "timezone". While it could be useful for
CDR purposes and so, I find no relationship with OpenSer itself of its
modules.
Why does this column exist by default in subscriber table?
Thanks.
--
Iñaki Baz Castillo
ibc(a)in.ilimit.es
Hi Jonathan,
More or less this is the whole idea - many openser admins configures a
different additional set of fields in the subscriber table, based on the
needs of some provisioning tools.
Of course, we cannot find a common set for this extra (non-openser)
fields, so the most clear way to do it is to keep in the openser default
DB struct only the fields that are used by openser. Then, anybody may
"customize" the tables, based on his particular needs, without
conflicting with the "particular" needs of somebody else ;)
Regards,
Bogdan
Jonathan K. Creasy wrote:
> I have applications that use this to display information to the customer (CDR data for example). You may still want to take it out but I just wanted to speak up that there could still be valid use for it.
>
> -Jonathan
>
>
>> -----Original Message-----
>> From: users-bounces(a)lists.openser.org [mailto:users-
>> bounces(a)lists.openser.org] On Behalf Of Bogdan-Andrei Iancu
>> Sent: Thursday, February 21, 2008 3:50 AM
>> To: Henning Westerholt
>> Cc: users(a)lists.openser.org
>> Subject: Re: [OpenSER-Users] What is "timezone" field in "subscriber"
>> table for?
>>
>> Hi Henning,
>>
>> I would definitely say so.
>>
>> Thanks and regards,
>> Bogdan
>>
>> Henning Westerholt wrote:
>>
>>> On Thursday 21 February 2008, Bogdan-Andrei Iancu wrote:
>>>
>>>
>>>> Hi Inaki,
>>>>
>>>> Right - this field is more or less used only by serweb (cdr
>>>>
>> purposes) -
>>
>>>> openser is not using it at all.
>>>>
>>>>
>>> Hi Bogdan,
>>>
>>> so i guess its safe if i remove this from trunk?
>>>
>>> Henning
>>>
>>>
>>>
>> _______________________________________________
>> Users mailing list
>> Users(a)lists.openser.org
>> http://lists.openser.org/cgi-bin/mailman/listinfo/users
>>
>
>
Hi List,
Do you have some sample xml config file for provisioning sip settings on
nokia E90? I'm using kannel with an smpp connection to send the config.
Thanks.
Mark D.
hi
i have large voip udp packets over internet problems and i need the
transfer medium to be tcp. below is what i had in mind.
SIPp_client A (TCP out) -> (listen TCP) SER 1 (UDP out) --> Soft-switch
(UDP in /out only) --> (to) ring Client B (listen UDP)
Client A and Client B registers to above Soft-switch. All the above are
individual servers (Linux CentOS based)
i need help in a (conversion) ser.cfg. Can anyone post a sample ?? below
is my ser.cfg (tried using t_relay_to_udp(), rewritehost(),
rewritehostport(), forward functions BUT none seems to work the way i
want it to)
SER 1 == 192.168.10.203
Softswitch == 192.168.10.251
Client A == 192.168.10.221 or .236 (SIPp client-registered to
soft-switch successfully)
Client B == 192.168.x.x (registered to soft-switch successfully)
Thanks
shengmai
shengmai_goh(a)innomedia.com.sg
#
# $Id: ser.cfg,v 1.25.2.1 2005/02/18 14:30:44 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
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/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/print.so"
loadmodule "/usr/local/lib/ser/modules/uri.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_db.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")
# -- rr params --
# add value to ;lr param to make some broken UAs happy
modparam("rr", "enable_full_lr", 1)
# ------------------------- 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 >= 2048 ) {
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
if (!method=="REGISTER") record_route();
#if (method == "INVITE") {
# if (uri =~ "sip:*@*"){
# log(1, "Forwarding to Vsp12K\n");
# rewritehostport("192.168.10.204:5060");
# t_relay();
# break;
# }
#};
if (uri =~ "sip:*@*"){
#log(1, "Forwarding to Vsp12K\n");
#rewritehostport("192.168.10.204:5060");
if (uri =~ "sip:*@192.168.10.203"){
rewritehostport("192.168.10.251:5060");
}
t_relay_to_udp("192.168.10.251", "5060");
#t_relay();
break;
};
# 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") {
# Uncomment this if you want to use digest authentication
# if (!www_authorize("iptel.org", "subscriber")) {
# www_challenge("iptel.org", "0");
# break;
# };
save("location");
break;
};
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]
{
# -----------------------------------------------------------------
# Pass on stuff going to PSTN to Asterisk
# -----------------------------------------------------------------
#if (uri=~"^sip:*@.*") {
# rewritehostport ("*192.168.10.204:5060");
# if (!t_relay()) {
# # sl_send_reply ("403", "prout");
# sl_reply_error();
# };
# break;
#};
rewritehostport("192.168.10.204:5060");
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
break;
}