Hey guys,
I'm using Radius to do pretty much everything regarding my users, i.e.
registrations, authorization, features and preferences. I implemented my own
way of doing speeddial by using AVPs provided by radius and AVPOPs module,
Here is the snippet:
AVP-SIP = speedial:30:15615551212
avp_subst("s:caller_speedial/i:99", "/(.*):(.*)/\2/");
#15615551212
avp_printf("i:98","$rU:*"); #30
avp_printf("i:97","sip:$avp($temp2)@$td"); #
sip:15615551212@xx.xx.xx.xx
avp_printf("i:96","<sip:$avp($temp2)@$td>\r\n"); #
<sip:15615551212@xx.xx.xx.xx>.
xlog("L_N"," SPEEDIALING: $fU is speed-dialing
$hdr(To)->$avp($temp2)\n");
if (avp_check("s:caller_speedial", "fm/$temp1/g")) {
#avp_pushto("$To","i:96");
#avp_pushto("$ruri","i:97");
#avp_pushto("$duri","i:97");
#subst('/^To: (.*)(a)(.*)/To: "$avp($temp2)"
<$avp($temp2)@\2/');
#append_hf("To: \"5615551212\"
<15615551212(a)xx.xx.xx.xx>;user=phone");
#subst_uri('/^sip:(.*)@(.*)$/sip:$avp($temp2)@\2/i');
#subst_user('/(.*)/$avp($temp2)/');
#remove_hf("To");
rewriteuser("15615551212");
xlog("L_N"," SPEEDIALING: $fU is dialing $hdr(To)
$avp($temp2)\n");
avp_delete("$temp1/g");
avp_delete("$temp2/g");
};
In this scenario, im forcing it instead of getting the value from AVPs just
for ease of showing my point. The problem that I'm having is that no matter
what I do to change the To header or change the R-URI, radius ALWAYS sends
the accounting records with the original R-URI, in my case 30(a)xx.xx.xx.xx,
how can I get acc.so to send the final resulting URI
(15615551212(a)xx.xx.xx.xx) in the Called-Station-Id AVP?
rad_recv: Accounting-Request packet from host xx.xx.xx.xx:39216, id=97,
length=298
Acct-Status-Type = Start
Service-Type = Sip-Session
Acct-Terminate-Cause = 200
Error-Cause = Invite
User-Name = "1000(a)xx.xx.xx.xx"
Calling-Station-Id = "sip:1000@xx.xx.xx.xx"
Called-Station-Id = "sip:30@xx.xx.xx.xx;user=phone"
Sip-Translated-Request-URI =
"sip:949449852150#15615551212@gateway;user=phone"
Acct-Session-Id = "000d2890-d47f01e8-1dcc30bc-7a49c7a4(a)yy.yy.yy.yy"
Sip-To-Tag = "230383F4-2AF"
Sip-From-Tag = "000d2890d47f20f54576a906-290bdc33"
Sip-CSeq = "102"
NAS-IP-Address = xx.xx.xx.xx
NAS-Port = 5060
Acct-Delay-Time = 0
rlm_sql (sql): Reserving sql socket id: 12
rlm_sql (sql): Released sql socket id: 12
Sending Accounting-Response of id 97 to xx.xx.xx.xx:39216
rad_recv: Accounting-Request packet from host xx.xx.xx.xx:39216, id=98,
length=292
Acct-Status-Type = Stop
Service-Type = Sip-Session
Acct-Terminate-Cause = 200
Error-Cause = 8
User-Name = "1000(a)xx.xx.xx.xx"
Calling-Station-Id = "sip:1000@xx.xx.xx.xx"
Called-Station-Id = "sip:30@xx.xx.xx.xx;user=phone"
Sip-Translated-Request-URI =
"sip:949449852150#15615551212@gateway:5060"
Acct-Session-Id = "000d2890-d47f01e8-1dcc30bc-7a49c7a4(a)yy.yy.yy.yy"
Sip-To-Tag = "230383F4-2AF"
Sip-From-Tag = "000d2890d47f20f54576a906-290bdc33"
Sip-CSeq = "103"
NAS-IP-Address = xx.xx.xx.xx
NAS-Port = 5060
Acct-Delay-Time = 0
Thanks in advance!
Lenir
Hey guys,
I'm using Radius to do pretty much everything regarding my users, i.e.
registrations, authorization, features and preferences. I implemented my own
way of doing speeddial by using AVPs provided by radius and AVPOPs module,
Here is the snippet:
AVP-SIP = speedial:30:15615551212
avp_subst("s:caller_speedial/i:99", "/(.*):(.*)/\2/");
#15615551212
avp_printf("i:98","$rU:*"); #30
avp_printf("i:97","sip:$avp($temp2)@$td"); #
sip:15615551212@xx.xx.xx.xx
avp_printf("i:96","<sip:$avp($temp2)@$td>\r\n"); #
<sip:15615551212@xx.xx.xx.xx>.
xlog("L_N"," SPEEDIALING: $fU is speed-dialing
$hdr(To)->$avp($temp2)\n");
if (avp_check("s:caller_speedial", "fm/$temp1/g")) {
#avp_pushto("$To","i:96");
#avp_pushto("$ruri","i:97");
#avp_pushto("$duri","i:97");
#subst('/^To: (.*)(a)(.*)/To: "$avp($temp2)"
<$avp($temp2)@\2/');
#append_hf("To: \"5615551212\"
<15615551212(a)xx.xx.xx.xx>;user=phone");
#subst_uri('/^sip:(.*)@(.*)$/sip:$avp($temp2)@\2/i');
#subst_user('/(.*)/$avp($temp2)/');
#remove_hf("To");
rewriteuser("15615551212");
xlog("L_N"," SPEEDIALING: $fU is dialing $hdr(To)
$avp($temp2)\n");
avp_delete("$temp1/g");
avp_delete("$temp2/g");
};
In this scenario, im forcing it instead of getting the value from AVPs just
for ease of showing my point. The problem that I'm having is that no matter
what I do to change the To header or change the R-URI, radius ALWAYS sends
the accounting records with the original R-URI, in my case 30(a)xx.xx.xx.xx,
how can I get acc.so to send the final resulting URI
(15615551212(a)xx.xx.xx.xx) in the Called-Station-Id AVP?
rad_recv: Accounting-Request packet from host xx.xx.xx.xx:39216, id=97,
length=298
Acct-Status-Type = Start
Service-Type = Sip-Session
Acct-Terminate-Cause = 200
Error-Cause = Invite
User-Name = "1000(a)xx.xx.xx.xx"
Calling-Station-Id = "sip:1000@xx.xx.xx.xx"
Called-Station-Id = "sip:30@xx.xx.xx.xx;user=phone"
Sip-Translated-Request-URI =
"sip:949449852150#15615551212@gateway;user=phone"
Acct-Session-Id = "000d2890-d47f01e8-1dcc30bc-7a49c7a4(a)yy.yy.yy.yy"
Sip-To-Tag = "230383F4-2AF"
Sip-From-Tag = "000d2890d47f20f54576a906-290bdc33"
Sip-CSeq = "102"
NAS-IP-Address = xx.xx.xx.xx
NAS-Port = 5060
Acct-Delay-Time = 0
rlm_sql (sql): Reserving sql socket id: 12
rlm_sql (sql): Released sql socket id: 12
Sending Accounting-Response of id 97 to xx.xx.xx.xx:39216
rad_recv: Accounting-Request packet from host xx.xx.xx.xx:39216, id=98,
length=292
Acct-Status-Type = Stop
Service-Type = Sip-Session
Acct-Terminate-Cause = 200
Error-Cause = 8
User-Name = "1000(a)xx.xx.xx.xx"
Calling-Station-Id = "sip:1000@xx.xx.xx.xx"
Called-Station-Id = "sip:30@xx.xx.xx.xx;user=phone"
Sip-Translated-Request-URI =
"sip:949449852150#15615551212@gateway:5060"
Acct-Session-Id = "000d2890-d47f01e8-1dcc30bc-7a49c7a4(a)yy.yy.yy.yy"
Sip-To-Tag = "230383F4-2AF"
Sip-From-Tag = "000d2890d47f20f54576a906-290bdc33"
Sip-CSeq = "103"
NAS-IP-Address = xx.xx.xx.xx
NAS-Port = 5060
Acct-Delay-Time = 0
Thanks in advance!
Lenir
What indexes would you recommend on the LCR table?
-- Bjorn
-----Original Message-----
From: serusers-bounces(a)iptel.org [mailto:serusers-bounces@lists.iptel.org] On
Behalf Of Juha Heinanen
Sent: Saturday, November 12, 2005 8:48 AM
To: Stefan Prelle
Cc: serusers(a)lists.iptel.org
Subject: [Serusers] LCR question
Stefan Prelle writes:
> I am having huge performance problems. The OpenSER drops to
effectivly > 1 CPS. My lcr table contains only 20 entries and I have
just 2 gateways > configured, so this shouldn't be a problem.
currently load_gws() makes a complex mysql query, but only one mysql
query per second seems very slow to me. load_gws could be rewritten
totally in c, but so far nobody has had time to do so.
-- juha
_______________________________________________
Serusers mailing list
serusers(a)lists.iptel.org
http://lists.iptel.org/mailman/listinfo/serusers
I thought I'd regrab code for SEMS lately and make sure I had the most up to
date source, but I noticed the sems.berlios.de page is conspicuously blank.
Has the page for SEMS been moved somewhere?
While I'm at it, does anyone know of a conference-capable application (hacked
SEMS, Asterisk, other) that does multicast RTP? Just playing around with a few
ideas, so I was curious if anyone's run across one or two.
N.
Hey all,
I have a question regarding usrloc. I have run into a problem..
We have static routes sent to an asterisk server for all of our SIP
usernames. In addition our IAD's will register with the same username, so
that calls coming into our switch for that username will be routed to both
the asterisk box and the SIP IAD. This way, whichever endpoint (IAD or
asterisk) answers the call first will take the call.
For example.
root:/ # serctl ul show +18646404810
<sip:+18646404810@192.168.1.60>;q=1;expires=-1012151
<sip:+18646404810@192.168.1.157:5060>;q=;expires=403
192.168.1.60 is the asterisk server. This is a static route added by
serctl.
192.168.1.157 is my IAD which registers with the switch every 10 minutes.
So when calls are made to (864) 640-4810 then SER will send an INVITE to
both location.
I explained all of this just to explain now what my problem is, and ask if
anyone may know a possible solution.
Now, we also use asterisk to perform call fwd'ing functions. Asterisk will
answer the call and then originate another call out back to SER to a new
location. Now the problem! (finally!) This call fwd'ing method works very
well in most cases, except that if the call fwd'ing is being sent to another
location registered with SER then it will be redirected back to asterisk
again, albeit to a different URI, and asterisk will kill the call because it
thinks that it has looped (which I guess it has. sort of).
So, I'm wondering if there is possibly a way to retrieve only the usrloc
locations that don't contain the IP address 192.168.1.60 in the contact URI?
This way I can just check if the src_ip is 192.168.1.60 and if so then
retrieve all the usrloc locations - without asterisk - and the call will not
be redirected back to asterisk.
Is this possible? Or if anyone has any other ideas that may help then I am
definitely open to suggestions.
Thanks for your help!!
Darren Nay
Ionosphere, Inc
VoIP Network Development
dnay(a)ionosphere.net
Dear Serusers:
I cannot seem to find information on t_fork. There is only a small reference
to it the the TM.so documentation, but no description of t_fork itself. Does
anyone know where I can find information about this?
Leo P.
Hi,
We are trying to forward INVITE to SEMS and play announcement.
It doesn't play anything.
The UA which is sending INVITE is getting time out
But the same .wav file for announcement if I open from sound recorder manually
,then it plays.
How to check that there is problem with codec ?
Regards,
Rajesh
-----Original Message-----
From: Xavier TRENTIN [mailto:xtrentin@softiphone.net]
Sent: Monday, November 14, 2005 10:00 PM
To: Rajesh Rajguru (WT01 - Voice & Next Generation Networks)
Cc: serusers(a)lists.iptel.org
Subject: Re: [Serusers] SEMS:announcement plug in
Does it play nothing or does it hang off?
Perhaps the problem could be the Codec you used to record the file.
B.R.
Xavier.
rajesh.rajguru(a)wipro.com a écrit :
>***********************
>Pas de virus detecté dans l'attachement no filename
>
>Votre Mail a été vérifié par InterScan.
>***********-***********
>
>
>
>Hi,
>
>In our ser.cfg following is mentioned for announcement
>
>----
> if(!t_write_req("/tmp/am_fifo","announcement")) {
> t_reply("500","error contacting sems");
>-----
>
>we are using fifo for communicating between ser and sems.
>ser and sems are running on the same server (Fedora) When we start
>sems, the default announcement file mentioned in sems.conf
>(default_announce=default_en.wav) is not played.
>Also there is no error in /var/log/messages wrt announcement plug in
>
>What could be the problem ?
>
>How does sems decides which sound recorder to play ?
>
>
>The ll /tmp/am_fifo shows following
>
>
>prw-r--r-- 1 root root 0 Nov 14 09:48 /tmp/am_fifo
>
>Regards,
>Rajesh
>
>
>
>
>Confidentiality Notice
>
>
>The information contained in this electronic message and any
>attachments to this message are intended for the exclusive use of the
>addressee(s) and may contain confidential or privileged information. If
>you are not the intended recipient, please notify the sender at Wipro or Mailadmin(a)wipro.com immediately and destroy all copies of this message and any attachments.
>
>_______________________________________________
>Serusers mailing list
>serusers(a)lists.iptel.org
>http://lists.iptel.org/mailman/listinfo/serusers
>
>
>
Confidentiality Notice
The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin(a)wipro.com immediately
and destroy all copies of this message and any attachments.
Hi
effectively, the first error is " ca't connect to rtpproxy". Where can
i download a rtpproxy? Can i installed rtpproxy on the same host?
regards!
Serge!
Hello all,
I am a student currently studying SIP with SER on a Slackware 10.2 system. I
could have my test network working fine in proxy/registrar mode but I am
having trouble in configuring SER for redirect mode.
Actually I am totally new at SER administration and don't feel really
comfortable in implementing code blocks into ser.cfg
When I use the following ser.cfg file, SER simply ignore the redirect block
and call alice at 192.168.1.2 whereas the call should be redirected to
192.168.1.4
I've been driftng all around the Internet gathering hints and tips for a few
days but I'm still at that point.
I guess it's a programming problem but can't find what's wrong exactly.
Thank you in advance for your help.
Matthieu
Here is my uname -a result:
Linux PC1 2.4.31 #6 Sun Jun 5 19:04:47 PDT 2005 i686 unknown unknown
GNU/Linux
My SER build:
version: ser 0.9.4 (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 15:54:20 Sep 6 2005 with gcc 4.0.1
My ser.cfg file based upon default ser.cfg:
#
# $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=8 # debug level (cmd line: -dddddddddd)
fork=no
log_stderror=yes # (cmd line: -E)
/* Uncomment these lines to enter debugging mode
fork=no
log_stderror=yes
*/
listen=192.168.1.1
check_via=yes # (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"
# 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();
# 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;
};
# redirect block, maybe at the wrong place
if (uri=="sip:alice@192.168.1.2") {
rewritehost("192.168.1.4");
sl_send_reply("302", "Redirect");
}
};
append_hf("P-hint: usrloc applied\r\n");
route(1);
}
route[1]
{
# send it out now; use stateful forwarding as it works reliably
# even for UDP2TCP
if (!t_relay()) {
sl_reply_error();
};
}
_________________________________________________________________
Recherchez sur votre PC comme sur le Web avec Windows Desktop Search !
http://desktop.msn.fr/
Hi to all,
any idea as to limit the concurrent calls outgoing to a particular PSTN
gateway supposing to let ser becoming dialogs aware so to have the status of
active open calls??
Thanks,
Bye,
Marcello