Hi guys,
I am trying to set up radius and avp for ages now, and this time i think i am close to it. I have a problem and I can't find any information about it.
The thing is, my soft agent (set to uid 101) can't register, and it is getting "Forbidden IP" even with this in the cfg file (see below) I have set up freeradius and radiusclient-ng according to the manual on http://www.openser.org/docs/openser-radius-1.0.x.html. I can't find anything on the error i am getting in my log. If you need my complete ..cfg or log file, just ask, and I will send them promptly.
thanks in advance, best regards, Zoran
openser.cfg:
....
xlog("L_ERR","rpid = $avp(s:rpid)");
xlog("L_ERR","adresa = $avp(s:adresa)");
xlog("L_ERR","adresa2 = $avp(s:adresa2)");
# check the src ip address
# avp_load_radius("caller");
if(!avp_check("$adresa", "eq/$adresa/ig"))
{
sl_send_reply("403", "Forbidden IP");
exit;
};
save("location");
exit;
};
....
freeradius/users:
....
101 Auth-Type := Digest, User-Password == "101"
Reply-Message = "Authenticated",
Sip-Avp += "rpid:101",
Sip-Avp += "adresa:10.0.0.157",
Sip-Avp += "adresa2:10.0.0.157"
....
last entries in the log after the rejected register.
....
DEBUG:auth_radius:extract_avp: AVP val is <10.0.0.157>
DEBUG:auth_radius:generate_avps: AVP 'adresa'/0='10.0.0.157'/0 has been added
DEBUG:auth_radius:extract_avp: string is <adresa2:10.0.0.157>
DEBUG:auth_radius:extract_avp: AVP name is <adresa2>
DEBUG:auth_radius:extract_avp: AVP val is <10.0.0.157>
DEBUG:auth_radius:generate_avps: AVP 'adresa2'/0='10.0.0.157'/0 has been added
DEBUG:auth_radius:extract_avp: string is <rpid:101>
DEBUG:auth_radius:extract_avp: AVP name is <rpid>
DEBUG:auth_radius:extract_avp: AVP val is <101>
DEBUG:auth_radius:generate_avps: AVP 'rpid'/0='101'/0 has been added
DEBUG:auth_radius:extract_avp: string is <adresa:10.0.0.157>
DEBUG:auth_radius:extract_avp: AVP name is <adresa>
DEBUG:auth_radius:extract_avp: AVP val is <10.0.0.157>
DEBUG:auth_radius:generate_avps: AVP 'adresa'/0='10.0.0.157'/0 has been added
DEBUG:auth_radius:extract_avp: string is <adresa2:10.0.0.157>
DEBUG:auth_radius:extract_avp: AVP name is <adresa2>
DEBUG:auth_radius:extract_avp: AVP val is <10.0.0.157>
DEBUG:auth_radius:generate_avps: AVP 'adresa2'/0='10.0.0.157'/0 has been added
rpid = 101
adresa = 10.0.0.157
adresa2 = 10.0.0.157
xl_get_spec_value: error - null sp->itf
ERROR:avpops:ops_check_avp: cannot get src value
parse_headers: flags=ffffffffffffffff
check_via_address(192.168.52.145, 192.168.52.145, 0)
DEBUG:destroy_avp_list: destroying list 0x404d9238
receive_msg: cleaning up
Hi Users,
I'm here again.
After having read more docs I don't feel like using rtpproxy
My Asterisks have both public IP Adresses so I don't need to proxy rtp stream
I just need a configuration to randomly proxy SIP requests to
Asterisk boxes behind SER (for load balancing purposes)
and to handle registrations of user to forward incoming calls to them
(calls are coming from Asterisks to OpenSER)
I'm really stuck on it because I already have such a working setup,
with same config files.
I'm just trying to replicate it on another site
Tnx in advance for help
Edoardo
My last mail to the ml follow for reference
Tnx again Klaus,
i'll read docs more in depth and try to understand each
change to openser.cfg you suggested
>>U 2006/12/20 19:15:35.025446 OOO.OOO.OOO.OOO:5060 -> CCC.CCC.CCC.CCC:21722
>>SIP/2.0 183 Session Progress.
>>Via: SIP/2.0/UDP
>>OOO.OOO.OOO.OOO:5060;branch=z9hG4bK-d87543-3e229802603d7c32-1--d87543-;rport=21722.
>>
>
>^^^^^^^^^^^^^^
>
>strange bug again - there must be CCC.CCC.CCC.CCC
really strange, do you think it's an openser bug ?
The strangest thing is that I just copied openser configs from a
working system (Openser + Asterisks) changing just ip addresses
OpenSER version is also the same...
[...]
>># !! Nathelper
>>onreply_route[1] {
>> # NATed transaction ?
>> if (isflagset(6) && status =~ "(183)|2[0-9][0-9]") {
>> fix_nated_contact();
>> #force_rtp_proxy();
> ^
>Are you sure it is commented? I do not believe it because the ngrep
>shows that the SDP of 200 Ok is rewritten.
Sure, I also tried to remove the line without solving the previous problem
>Please read the Getting Started Turial from onsip.org carefully. It
>describes how you handle NAT correctly and also describes how to do
>NAT traversal for in-dialog messages, which is missing in your config.
I will.
Tnx again
Regards
Edoardo
May i guess U
Perform the Dispatcher modules .....
May this Hopes u to get
On 12/22/06, raviprakash sunkara <sunkara.raviprakash.feb14(a)gmail.com>
wrote:
>
>
>
>
>
> On 12/22/06, Thomas Deillon < Thomas.Deillon(a)smart-telecom.ch> wrote:
> >
> > Hi,
> >
> > I'm trying to set a load balancing solution with SER and twos Asterisk.
> > The Asterisks will be use as REGISTRAR, REDIRECT, GATEWAY ....
> >
> > The ser will just load balance the traffic on one Asterisk or an other.
> > I use the dispatcher module for the SIP message and I use 2 public ip
> > addresses for the asterisk and so, I'm able to directly send the RTP
> > traffic to them (I didn't use mediaproxy or rtpproxy).
> >
> > On each asterisk, I set the SER as default GW to be sure that all
> > message go through this computer. (Client are behind a FW/NAT and so, I
> > would like to be sure that all message come from the same IP
> > address:port else, the FW/NAT will DROP these messages).
> >
> > For the moment, with this solution, I have a problem. The message from
> > client will go to SER which will resend it to the asterisk and then, the
> >
> > asterisk will try to answer responding on the same IP -> Loop detected
> > !!
> >
> > On some device I saw that we can forward the request for the phone to
> > the asterisk without changing the source ip address ....
> >
> > Do you know how can I do this ?
> >
> > Thanks a lot for your help,
> >
> > Thomas D
> >
> >
> > _______________________________________________
> > Users mailing list
> > Users(a)openser.org
> > http://openser.org/cgi-bin/mailman/listinfo/users
> >
>
>
>
> --
> Thanks and Regards
> Ravi Prakash Sunkara
> ravi.sunkara(a)hyperion-tech.com
> M:+91 9985077535
> O:+91 40 23114549
> F:+91 40 40208727
> ravi.sunkara(a)hyperion-tech.com
> www.hyperion-tech.com
--
Thanks and Regards
Ravi Prakash Sunkara
ravi.sunkara(a)hyperion-tech.com
M:+91 9985077535
O:+91 40 23114549
F:+91 40 40208727
ravi.sunkara(a)hyperion-tech.com
www.hyperion-tech.com
I am sure this must have been covered somewhere, but I cannot find it.
I am trying to get openser to register with username and password and
forward a call to that server. This is for outbound sip termination to
the PSTN.
If somebody could point me to the right place, I would be grateful.
Bill
Hi,
I'm trying to set a load balancing solution with SER and twos Asterisk.
The Asterisks will be use as REGISTRAR, REDIRECT, GATEWAY ....
The ser will just load balance the traffic on one Asterisk or an other.
I use the dispatcher module for the SIP message and I use 2 public ip
addresses for the asterisk and so, I'm able to directly send the RTP
traffic to them (I didn't use mediaproxy or rtpproxy).
On each asterisk, I set the SER as default GW to be sure that all
message go through this computer. (Client are behind a FW/NAT and so, I
would like to be sure that all message come from the same IP
address:port else, the FW/NAT will DROP these messages).
For the moment, with this solution, I have a problem. The message from
client will go to SER which will resend it to the asterisk and then, the
asterisk will try to answer responding on the same IP -> Loop detected
!!
On some device I saw that we can forward the request for the phone to
the asterisk without changing the source ip address ....
Do you know how can I do this ?
Thanks a lot for your help,
Thomas D
Hi all,
Appreciate if someone can give me a suggestion or even an answer.
Since the call from SIP device to PSTN phone did not have Caller ID and
our Telco carriers request for the Caller ID, we have to set a number before
the calls are routed to PSTN gateway.
I did it in Asterisk before with the function calls SetCallerID(CLID) or
Set(CALLERID(number)=CLID) (depends on the Asterisk version) and these
function calls worked. But because of the scalabliity issue, I changed to
SER and would like to do the similar thing as in Asterisk.
I read the SER document and awared SIP_HF_FROM has the data for the
entired FROM field. Is there any other variables for Caller ID only ?
I searched the mailing list for SER and did not find any related topic
(only found one with title: caller-id with raius using sip-rpid, but it is
irrelevant).
Thanks in advance.
Larry
_________________________________________________________________
Try the next generation of search with Windows Live Search today!
http://imagine-windowslive.com/minisites/searchlaunch/?locale=en-us&source=…
We are Asterisk-only users and currently use Asterisk Flash Operator Panel
(http://www.asternic.org/) to get a real-time view of the different
phones/extensions, channels, etc.
We are planning on enhancing our setup by adding SER/OpenSER in front of
our Asterisk systems and to expand into other venues as well.
If we wanted to use something like SEMS instead of Asterisk for certain
services, is there any tool similar to the Flash Operator Panel (FOP)
available for SER/OpenSER + SEMS?
I guess we could always continue using FOP with our Asterisk systems
fronted by SER/OpenSER. However, for our other plans where we prefer to
use SEMS, we would love to see if there is any solution available (free,
sponsored, or commercial).
Thanks,
Daniel
Just to complete the thread, a new SNMP module is available for such
purpose. In the announcement are listed several tools that can help to
collect statistics and generate grphs. It is a matter of configuration
and maybe small shell scripting:
http://openser.org/pipermail/users/2006-December/008334.htmlhttp://cacti.net/http://oss.oetiker.ch/mrtg/
At the first sight these tools can be used with FIFO or XMLRPC interface
as well, if you write the shell script to collect the statistics.
Cheers,
Daniel
Wienand, Joerg wrote:
>> You can make a small script to pull periodically statistics via
>> FiFO/XMLRPC into a database/file and from there generate graphics at
>> your convenience.
>>
>
> This is what I thought about. I expect that I'm not the only one who is
> interested in statistics. So maybe anyone else has done this job before. ;-)
>
> regards, Jörg
>
>
Hi Jose,
I think your regexp is not correct - you need to force the end of
string, otherwise only a substring (prefix) will be matched.
try avp_check("$fU","re/^[0-9]{10}$/g")
regards,
bogdan
Jose Gil Navarrete wrote:
> Hi thanks Andrei, I tried with your recomendation but I obtain the
> same result, if $fu is: 012345678901, then "To-username
> -012345678901-" is inserted
>
> if(avp_check("$fU","re/^[0-9]{10}/g")) {
> insert_hf("To-username: -$rU- \r\n", "Call-ID");
> } else {
> sl_send_reply("400", "Peticion Erronea, numero
> invalido");
> };
>
>
> */Bogdan-Andrei Iancu <bogdan(a)voice-system.ro>/* escribió:
>
> Hi Jose,
>
> the FM operator in avp_check is not for regular expressions - FM is a
> file matching- like operator (like "sip:*@domain). See "man 3
> fnmatch".
>
> if you want to check against an regexp, you need to use the RE
> operator.
> See:
> http://www.openser.org/docs/modules/1.2.x/avpops.html#AEN384
>
> as RE op does not support an AVP as right operand, you should try:
> if(avp_check("$fU","re/^[0-9]{10}/g")) {
>
> regards,
> bogdan
>
> Jose Gil Navarrete wrote:
>
> > Hi
> > I try to check the username in the URI, this is, if the username do
> > not have ten digits then send a message, I made:
> >
> > avp_write("^[0-9]{10}","$avp(s:fm_avp)");
> > if(avp_check("$fU","fm/$avp(s:fm_avp)/g")) {
> > insert_hf("To-username: -$fU- \r\n", "Call-ID");
> > } else {
> > sl_send_reply("400", "Bad Request");
> > exit;
> > };
> >
> > but I ever obtain 400 message.
> >
> > I try too with:
> > if(avp_check("$fU","re/[0-9]{10}$/g")) {
> > insert_hf("To-username: -$fU- \r\n", "Call-ID");
> > else{
> > sl_send_reply("400", "Bad request");
> > exit;
> > }
> >
> > But I obtain the same message. Any idea?
> >
> > __________________________________________________
> > Correo Yahoo!
> > Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
> > Regístrate ya - http://correo.yahoo.com.mx/
> >
> >------------------------------------------------------------------------
> >
> >_______________________________________________
> >Users mailing list
> >Users(a)openser.org
> >http://openser.org/cgi-bin/mailman/listinfo/users
> >
> >
>
>
> __________________________________________________
> Correo Yahoo!
> Espacio para todos tus mensajes, antivirus y antispam ¡gratis!
> Regístrate ya - http://correo.yahoo.com.mx/
>
Hi ALL!!
Is it possible to have to different releases of ser on the same machine?
Have any one tired that? I couldn't find any info the web, please help :)
Thanks
Bests
tomek