Hello all,
I need to execute an exec_msg command inside onreply_route code buy SER doesn't permit this.
This is my ser.cfg:
route{
......
if (method=="INVITE"){
..........
t_relay();
route(2);
break;
};
route[2]
{
t_on_reply("2");
}
onreply_route[2]
{
if (status=~"200"){
if ( search("msrp:") ){
exec_msg("printenv SRCIP > /tmp/200ok.txt; cat >> /tmp/200ok.txt; /bin/bash /usr/local/ser_snapshot/sbin/controlador2");
replace_all_file("msrp:\/\/[0-9\.:\/;a-z]*\r","/tmp/pathmsrp200ok.txt");
}
}
}
In onreply_route, I need to execute exec_msg to manipulate 200 ok, but SER doesn't permit it.
What can I execute exec_msg??
I try to probe this:
route[2]
{
t_on_reply("2");
}
onreply_route[2]
{
if (status=~"200"){
if ( search("msrp:") ){
t_on_failure("2");
}
}
}
failure_route[2] {
exec_msg("printenv SRCIP > /tmp/200ok.txt; cat >> /tmp/200ok.txt; /bin/bash /usr/local/ser_snapshot/sbin/controlador2");
replace_all_file("msrp:\/\/[0-9\.:\/;a-z]*\r","/tmp/pathmsrp200ok.txt");
t_relay();
}
But never enter in failure route!!!
Thank you in advance for any help.
_________________________________________________________________
Busca desde cualquier página Web con una protección excepcional. Consigue la Barra de herramientas de Windows Live hoy mismo y GRATUITAMENTE.
http://www.toolbar.live.com
Hi,
I am trying to do some tests using TCP protocol with
SER as a proxy. SER accepts SIP message through TCP
correctly, but after SER accepts SIP messages, SER
automatically picks up UDP for transmission. Is there
a way to force SER to use TCP for forwarding message?
thanks,
Joy
____________________________________________________________________________________
Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index
Hello list,
I had ser-0.9.6, freeradius-1.1.3 and mysql installed. I am doing AAA for
ser by freeradius where freeradius should have to fetch data from default
mysql tables setup by freeradius.
I am able to do authentication of sip clients without problem, accounting
packets also gets logged into mysql database (when group membership checking
disabled in ser.cfg).But I am unable to manage with group membership check.
I am not sure what should be the AVPs I have to insert into mysql tables for
group membership check. I followed various articles about freeradius and
ser, and tried all possibilities, but no success. Can anyone give me any
clue about that. Below mentioned are some of my conf files.
In radiusd.conf I had enabled “sql” and disabled “files” in order to read
values from mysql db instead of flat files.
Part of ser.cfg for radius group check
if (!lookup("location")) {
if(uri=~"^sip:0[1-9].*@abc.xyz.pt") { #Towards National PSTN gateway
if (!radius_is_user_in("From", "ld")) {
sl_send_reply("403", "No permission to call on National numbers...");
break;
};
route(4);
route(5);
break;
};
In radcheck table I have 2 entries for each user they are like mentioned
below
mysql> select * from radcheck;
+----+--------------------------------+---------------+----+-------------+
| id | UserName | Attribute | op | Value |
+----+--------------------------------+---------------+----+-------------+
| 1 | 69021(a)abc.xyz.pt | User-Password | == | "teste" |
17 | 69021(a)abc.xyz.pt | Auth-Type | := | Digest
usergroup table has entry like below
mysql> select * from usergroup;
+----------------------------+-----------+----------+
| UserName | GroupName | priority |
+----------------------------+-----------+----------+
| 69021(a)abc.xyz.pt | ld | 1 |
+----------------------------+-----------+----------+
1 row in set (0.00 sec)
And radgroupcheck has entries like mentioned below
mysql> select * from radgroupcheck;
+----+-----------+--------------+----+-------------+
| id | GroupName | Attribute | op | Value |
+----+-----------+--------------+----+-------------+
| 1 | ld | Service-type | == | Group-Check |
+----+-----------+--------------+----+-------------+
1 row in set (0.00 sec)
Any clue will be much appreciated..
Thanks
Lokesh
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.15.3/561 - Release Date: 12/1/2006
Hi,
If a SIP device is using TCP, to accept incoming calls it must bind on port
5060.
To call someone, this device must create a socket to reach the proxy on port
5060. The port source of this socket cannot be 5060 ! In TCP you cannot bind
on a port and in same time using it in another socket. So the port source is
generally chosen randomly (XYZ)
Now that all sockets and bind are done, what are the correct info used to
create the Contact header ?
For me, the port used in the contact header in this case must be 5060 since
the device accepts incoming calls on this port and never XYZ.
But in a NAT context, if this SIP device is behind a NAT, the port 5060
cannot be used to reach it ! It's necessary to reuse the socket previously
opensed to reach it.
So in conclusion, the Contact header must be set with 5060 by the device and
on the proxy side, if the client is detected behind a NAT, this Contact
header is modified to used instead XYZ
Am I right ?
For TLS, the problem is the same but instead of 5060 it's 5061.
Thanks,
Christophe
Hi,
just a little question about mysql insert into location.
I might be wrong here, but please be patient whith me. Im not too good
to read through the source tree.... :-)
Would there be anything wrong with changing the insert statement from
insert into.....
to:
insert into.....on duplicate key update.....
(my sipp register stress-test scenario gave me this idea....)
br hw
Hello Folks,
I got some strange issue with RadAuth module.
I have a running server which works just great with RadAuth.
The problem comes when in the FROM and TO headers are no descriptions.
EG:
Following request will be properly processed:
#
INVITE sip:0012345@babble.net SIP/2.0.
To: "0012345"<sip:0012345@babble.net>.
From: "Some User"<sip:user@babble.net>;tag=5a7e9242.
BUT the following one will not:
INVITE sip:00123456@babble.net SIP/2.0.
To: <sip:0012345@babble.net>.
From: <sip:user@babble.net:10101>;tag=1-2963920204.
Here is what I will get WRONG in RADIUS Server:
Packet-Type = Access-Request
Thu Nov 30 22:52:31 2006
User-Name = "user(a)babble.net"
Digest-Attributes = "\n\020user(a)babble.net"
Digest-Attributes = "\001\014babble.net"
Digest-Attributes = "\002*456f61dc0d715ea80fd0ed0431df75b73a4c4092"
Digest-Attributes = "\004\020sip:babble.net"
Digest-Attributes = "\003\010INVITE"
Digest-Response = "c96792da6dfb093215150ccd250fac34"
Service-Type = Sip-Session
Sip-Uri-User = "user"
NAS-IP-Address = 127.0.0.1
NAS-Port = 5060
Client-IP-Address = 87.102.50.17
The problem is that in the Digest-URI part I will not get the sip:0012345@babble.net, but the sip:babble.net, therefore completly erroneous info.
I have checked with xlog the request on openser server just before passing the info to radius_proxy_authorize function, and all the FROM-URI, TO-URI, R-URI avps were just fine.
Can somebody from the DEVELOPERS help me? I cannot see other solution, since there is nothing to be tuned in the settings of radauth module.
Thank you in advance for your time!
Cheers,
Dan
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
I have been using 0.9.6 version of SER that has DNS SRV load balancing,
but now want to try the build that has DNS SRV failover/rollover
capabilities built in using the SRV priority. I think this is called
the "CVS HEAD" build. I cannot see this on the FTP download
directories.
Is this available?
Thank you,
Paul