Hi Everyone,
I have a problem. I use avp_load_radius to load caller or callee preferences
and use them. But when I do call forwarding, it will load original caller's
preferences for further processing instead of the user who has configured
call forwarding. Ideally we should load the preferences of the user who
forwarded the call as caller preferences. We can do this using avp_db_load
but I think there should be provision in avp_load_radius as well. Currently
it supports "caller", "callee" & "digest". I think it should support
parameters same as avp_db_load. Let me know your thoughts about this.
Perhaps this has been asked before, but where are all these core and
module functions that the Perl module documentation alleges to be
exposed via "autoload"?
When I try to run any of them as methods of the OpenSER object, the Perl
module tells me they exist but are unavailable, or something to that
general effect.
So, for now, the only use I get out of the perl module is to be able to
communicate to the OpenSER route plan via setting AVPs.
Is this going to change any time soon? Will functions like
$m->rewrite_ruri() eventually work? Or am I missing some kind of
autoload option?
--
Alex Balashov
Evariste Systems
Web : http://www.evaristesys.com/
Tel : (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (706) 338-8599
Hello all,
I'm required to set a specific caller id on an outbound call. I've tried
with P-Asserted-Id but it seems the carrier wants me to change the FROM-URI,
I'm trying to set $fU but I get an error saying:
line 380, column 17-18: invalid left operand in assignment
So I assume $fU is not readable?
How do i change it?
thanks
Hi to all,
I am able to start correctly openser, using mysql for authentication and
user location.
Then, I would configure redirect, but I don't know how.
I have this situation:
Internal network behind parallel NAT (any port open)
Possibility to have a public IP
Users should authenticate on openser, to being redirect (or forwarded ?) all
to a single SIP provider, using the same credentials.
As you can see, I an not clear if I have to use redirect or forward (I
suspect forward).
Is it possible ?
Can you help me, suggesting also a possible configuration ?
Thanks to all.
Valerio
Hi All,
I am using OpenSER as a NAT proxy for asterisk and would like to use it to deliver SIP 'MESSAGES' between clients.
At the moment I have the following configuration however messages are not being sent to the other clients. Instead they are being passed to asterisk.
I would be very grateful if anyone could point me in the right direction.
Ross
---------- Config --------------
debug=5 # 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=yes # (cmd. line: -v)
dns=no # (cmd. line: -r)
rev_dns=no # (cmd. line: -R)
port=5065
children=4
# --- module loading
mpath="/usr/local/lib64/openser/modules/"
loadmodule "mysql.so"
loadmodule "sl.so"
loadmodule "tm.so"
loadmodule "rr.so"
loadmodule "maxfwd.so"
loadmodule "usrloc.so"
loadmodule "registrar.so"
loadmodule "textops.so"
loadmodule "nathelper.so"
loadmodule "auth.so"
loadmodule "auth_db.so"
loadmodule "mi_fifo.so"
# --- setting module parameters
# -- mi_fifo params --
modparam("mi_fifo", "fifo_name", "/tmp/openser_fifo")
modparam("usrloc|auth_db","db_url","<MYSQL CONNECTION STRING>")
# -- usrloc params --
modparam("usrloc", "db_mode", 2)
modparam("usrloc", "nat_bflag", 6)
# -- registrar params --
modparam("registrar|nathelper", "received_avp", "$avp(i:42)")
# -- auth params --
modparam("auth_db", "calculate_ha1", yes)
modparam("auth_db", "password_column", "password")
# -- rr params --
modparam("rr", "enable_full_lr", 1)
# -- nathelper params ---
modparam("nathelper", "rtpproxy_sock", "udp:127.0.0.1:7890")
modparam("nathelper", "natping_interval", 30)
modparam("nathelper", "ping_nated_only", 1)
modparam("nathelper", "sipping_bflag", 7)
modparam("nathelper", "sipping_from", "sip:<ADDRESS>")
# --- main routing logic
route{
if (!mf_process_maxfwd_header("10")) {
sl_send_reply("483","Too Many Hops");
exit;
};
if (msg:len >= 2048 ) {
sl_send_reply("513", "Message too big");
exit;
};
# NAT detection
route(2);
if (!method=="REGISTER")
{
record_route();
}
if (loose_route()) {
append_hf("P-hint: rr-enforced\r\n");
route(1);
};
if (!uri==myself) {
append_hf("P-hint: outbound\r\n");
route(1);
};
if (uri==myself) {
if (method=="REGISTER") {
if (!www_authorize("", "subscriber")) {
www_challenge("", "0");
exit;
};
if (isflagset(5)) {
# set branch flag -- when someone will call this user
# the INVITE will have branch flag 6 set after lookup("location")
setbflag(6);
# if you want OPTIONS natpings uncomment next
# setbflag(7);
};
save("location");
exit;
};
if (!lookup("location")) {
sl_send_reply("404", "Not Found");
exit;
};
append_hf("P-hint: usrloc applied\r\n");
};
if(method=="MESSAGE")
{
if (!lookup("location"))
{
sl_send_reply("404", "User Offline");
exit;
}
route(4);
}
if (method=="REGISTER")
{
save("location");
}
route(1);
}
route[1] {
if (subst_uri('/(sip:.*);nat=yes/\1/')){
setbflag(6);
};
if (isflagset(5)||isbflagset(6)) {
route(3);
}
if (!t_relay()) {
sl_reply_error();
};
exit;
}
route[2]{
force_rport();
if (nat_uac_test("19")) {
if (method=="REGISTER") {
fix_nated_register();
} else {
fix_nated_contact();
};
setflag(5);
};
}
route[3] {
if (is_method("BYE"))
{
unforce_rtp_proxy();
}
else if (is_method("INVITE"))
{
force_rtp_proxy();
t_on_failure("2");
};
if (isflagset(5))
{
search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
}
t_on_reply("1");
}
route[4]
{
if (!t_relay())
{
sl_reply_error();
};
exit;
}
failure_route[2] {
if (isbflagset(6) || isflagset(5))
{
unforce_rtp_proxy();
}
}
onreply_route[1]
{
if ((isflagset(5) || isbflagset(6)) && status=~"(183)|(2[0-9][0-9])" && is_method("INVITE"))
{
force_rtp_proxy();
}
search_append('Contact:.*sip:[^>[:cntrl:]]*', ';nat=yes');
if (isbflagset(6)) {
fix_nated_contact();
}
exit;
}
---------- End Config --------------
_________________________________________________________________
http://clk.atdmt.com/UKM/go/msnnkmgl0010000007ukm/direct/01/
Hi all,
I have a doubt, about to constructing a REGISTER Request by third-party, if
is possible with OpenSER`s modules??? and how?
If can to force a "Proxy A", to perform a Register of the UAc on behalf of
an UAc to Proxy/Registrar "B"....
10.2 item rfc3261....."Registration on behalf of a
particular address-of-record can be performed by a suitably authorized
third party."...
best regards,
Marcio
Hi,
I just committed in SVN trunk (1.4, next major release) support for
dialog profiling.
What dialog profiling is
=========================
Dialog profiling is a mechanism that helps in classifying, sorting and
keeping trace of certain types of dialogs, using whatever properties of
the dialog (like caller, destination, type of calls, etc). Dialogs can
be dynamically added in different (and several) profile tables -
logically, each profile table can have a special meaning (like dialogs
outside the domain, dialogs terminated to PSTN, etc).
Information provided by the profiles can be used also for doing real
load-balancing - by real, I mean routing decisions based on load. So far
dispatcher module can do probabilistic dispatching with no feedback on
the actual load of the peer (or about the call success). See example 3 -
load balancing between 2 asterisk boxes with identical capacities.
Being able to actually trace the ongoing dialog, gives liberty to do
more complex routing logics.
There are two types of profiles:
* with no value - a dialog simply belongs to a profile. (like
outbound calls profile). There is no other additional
information to describe the dialog's belonging to the
profile;
* with value - a dialog belongs to a profile having a certain
value (like in caller profile, where the value is the
caller ID). The belonging of the dialog to the profile is
strictly related to the value.
A dialog can be added to multiple profiles in the same time.
What it should be used for
===========================
Example 1:
Count the calls terminating to PSTN in order to monitor the load. Before
routing the call the GW, check if the number of ongoing calls (to the
GW) do not exceed some value.
modparam("dialog","profiles_no_value","pstn_calls")
....
/* do some checking */
get_dialog_size("pstn_calls","$avp(cnt)");
if ( $avp(cnt) > 32 ) {
sl_send_reply("500","GW full");
exit;
}
set_dlg_profile("pstn_calls");
/* route to the GW */
.....
Example 2:
Allow only 2 parallel calls per user - use a profile with value to count
the outgoing calls for each subscriber
modparam("dialog","profiles_with_value","caller")
....
/* do some checking */
get_dialog_size("caller","$fu","$avp(cnt)");
if ( $avp(cnt) > 2 ) {
sl_send_reply("403","Not allowed");
exit;
}
set_dlg_profile("caller","$fu");
/* route the call */
.....
Example 3:
Do load balancing between 2 asterisk boxes with identical capacities -
use a profile with values to count the ongoing calls through each
Asterisk box.
modparam("dialog","profiles_with_value","asterisk")
....
/* do some checking */
get_dialog_size("asterisk","box1","$avp(cnt1)");
get_dialog_size("asterisk","box2","$avp(cnt2)");
if ( $avp(cnt1) > $avp(cnt2) ) {
setdsturi("sip:IP_BOX2:PORT_BOX2");
set_dlg_profile("asterisk","box2");
} else {
setdsturi("sip:IP_BOX1:PORT_BOX1");
set_dlg_profile("asterisk","box1");
}
/* route the call */
.....
Of course, this can be extended for asymmetric load or for multiple boxes.
Regards,
Bogdan
Hi, I'm experimenting problems with my carrier gateway since sometimes it
doesn't reply "100 Trying" in several seconds.
I set "fr_timer" to 12 seconds so after this time the transaction is closed.
In case the response ("100 Trying") arrives more than "fr_timer" seconds to
OpenSer, does OpenSer forward it upstream as RFC3261 indicates? or does
Openser drop it?
Thanks.
--
Iñaki Baz Castillo
ibc(a)in.ilimit.es