Re: [OpenSIPS-Users] Mediaproxy relay avp question

2009-01-16 Thread Giuseppe Roberti
Dan Pascu wrote:
> On Friday 16 January 2009, Giuseppe Roberti wrote:
>> Dan Pascu wrote:
>>> On Thursday 15 January 2009, Giuseppe Roberti wrote:
 Hi,
 can media_relay_avp be used with engage_media_proxy() or only for
 use_media_proxy() ?
>>> It works with both.
>> Anyone is sure that it really works ?
> 
> I can't speak for anyone, but if you use the latest mediaproxy version 
> (2.3.2) you may become a believer yourself ;)
> 
:D

I say that because i have tried and it doesnt work for me, so maybe i
have an error somewhere in my configuration.
I will check it next week.

Thanks.

-- 
Giuseppe Roberti


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [Kamailio-Users] Registered user

2009-01-16 Thread Bogdan-Andrei Iancu
Hi Alex,

I will post only on OpenSIPS lists as it seams there are really nervous 
people on the other side,,

yes, the AVPs are still kept in a list.

Regards,
Bogdan

Alex Balashov wrote:
> Bogdan,
>
> In OpenSIPS, are AVP searches still linear for AVPs that have string 
> identifiers?  My understanding is that traditionally they were linear, 
> as opposed to hashed.
>
> Thanks,
>
> -- Alex
>
> Bogdan-Andrei Iancu wrote:
>
>> Of course this notation is present since openser 1.3 and it was 
>> inherited by both OpenSIPS 1.4.4 and Kamilio 1.4.3, but now we try to 
>> get a better approach of this functionality: why put the value into 
>> an AVP and let the function search all the time for that AVP (set or 
>> not set), when you can simply take advantage and directly pass the 
>> value as parameter to the function. You get read of (1) useless 
>> transit via an AVP and (2) useless AVP search all the time. Also you 
>> get a more compact and clear scripting
>
>


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Max No Of Registered users

2009-01-16 Thread Iñaki Baz Castillo
El Viernes, 16 de Enero de 2009, Bogdan-Andrei Iancu escribió:
> Iñaki Baz Castillo wrote:
> > El Viernes, 16 de Enero de 2009, Bogdan-Andrei Iancu escribió:
> >> Hi  Zen,
> >>
> >> even 64M should be enough for 3K of registrationsAn this is not
> >> related to CPU.
> >
> > Yes, the problem is the private memory. With just 1 MB I couldn't restart
> > OpenSIPS with 5000 users registered.
>
> It will if you set a smaller "fetch_rows" for the usrloc module :)

Yes, yes, what I mean is that with many users you need to check your PKG 
memory and also other parameters.

Thanks for pointing it.


-- 
Iñaki Baz Castillo

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Max No Of Registered users

2009-01-16 Thread Bogdan-Andrei Iancu
Iñaki Baz Castillo wrote:
> El Viernes, 16 de Enero de 2009, Bogdan-Andrei Iancu escribió:
>   
>> Hi  Zen,
>>
>> even 64M should be enough for 3K of registrationsAn this is not
>> related to CPU.
>> 
>
> Yes, the problem is the private memory. With just 1 MB I couldn't restart 
> OpenSIPS with 5000 users registered.
>   
It will if you set a smaller "fetch_rows" for the usrloc module :)

Regards,
Bogdan


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [Kamailio-Users] Registered user

2009-01-16 Thread Alex Balashov
Bogdan,

In OpenSIPS, are AVP searches still linear for AVPs that have string 
identifiers?  My understanding is that traditionally they were linear, 
as opposed to hashed.

Thanks,

-- Alex

Bogdan-Andrei Iancu wrote:

> Of course this notation is present since openser 1.3 and it was 
> inherited by both OpenSIPS 1.4.4 and Kamilio 1.4.3, but now we try to 
> get a better approach of this functionality: why put the value into an 
> AVP and let the function search all the time for that AVP (set or not 
> set), when you can simply take advantage and directly pass the value as 
> parameter to the function. You get read of (1) useless transit via an 
> AVP and (2) useless AVP search all the time. Also you get a more compact 
> and clear scripting


-- 
Alex Balashov
Evariste Systems
Web: http://www.evaristesys.com/
Tel: (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (678) 237-1775

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Max No Of Registered users

2009-01-16 Thread Iñaki Baz Castillo
El Viernes, 16 de Enero de 2009, Bogdan-Andrei Iancu escribió:
> Hi  Zen,
>
> even 64M should be enough for 3K of registrationsAn this is not
> related to CPU.

Yes, the problem is the private memory. With just 1 MB I couldn't restart 
OpenSIPS with 5000 users registered.

-- 
Iñaki Baz Castillo

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [Kamailio-Users] Registered user

2009-01-16 Thread Bogdan-Andrei Iancu


Daniel-Constantin Mierla wrote:
>
> On 01/16/2009 03:50 PM, Alex Balashov wrote:
>> But doesn't that check if the AOR in the RURI can be located.
>>   
> kamailio (openser) has for quite some time a parameter in registrar 
> module that can overwrite from where to get the aor:
> http://www.kamailio.org/docs/modules/devel/registrar.html#id2467548
>
> It is in the last two major release at least: openser 1.3.x and 
> kamailio 1.4.x
I like you logic here :)..you are funny man :)...
>
> modparam("registrar", "aor_avp", "$avp(i:3223)")
> $avp(i:3223) = $fu;
> if(registered())
> {
> ...
> }
Of course this notation is present since openser 1.3 and it was 
inherited by both OpenSIPS 1.4.4 and Kamilio 1.4.3, but now we try to 
get a better approach of this functionality: why put the value into an 
AVP and let the function search all the time for that AVP (set or not 
set), when you can simply take advantage and directly pass the value as 
parameter to the function. You get read of (1) useless transit via an 
AVP and (2) useless AVP search all the time. Also you get a more compact 
and clear scripting

Regards,
Bogdan
>
>
> Cheers,
> Daniel
>
>
>> Michel,
>>
>> The proper way to do this -- assuming your motive is security and 
>> authorisation -- is to challenge the incoming INVITE initial request 
>> of the caller (who is supposed to be registered) with a 407 proxy 
>> challenge, i.e. proxy_authorize()/proxy_challenge().
>>
>> Bogdan-Andrei Iancu wrote:
>>
>>  
>>> Hi Michel,
>>>
>>> See the registered() function from the registrar module:
>>>
>>> http://www.opensips.org/html/docs/modules/1.4.x/registrar.html#id271407
>>>
>>> Regards,
>>> Bogdan
>>>
>>> michel freiha wrote:
>>>
 Dear All,
 I need to ask please about which function should I use in order to 
 check while making a call if the user who is dialing the number is 
 making the call from a registered account or not?

 Regards
  


 ___
 Users mailing list
 Users@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/users
 
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>> 
>>
>>
>>   
>


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registered user

2009-01-16 Thread Bogdan-Andrei Iancu
Alex, you are right...The link was not correct:

Check the devel version :
http://www.opensips.org/html/docs/modules/1.5.x/registrar.html#id271407

where you can do:
registered("location","$fu")

Regards,
Bogdan

Alex Balashov wrote:
> But doesn't that check if the AOR in the RURI can be located.
>
> Michel,
>
> The proper way to do this -- assuming your motive is security and 
> authorisation -- is to challenge the incoming INVITE initial request 
> of the caller (who is supposed to be registered) with a 407 proxy 
> challenge, i.e. proxy_authorize()/proxy_challenge().
>
> Bogdan-Andrei Iancu wrote:
>
>> Hi Michel,
>>
>> See the registered() function from the registrar module:
>>
>> http://www.opensips.org/html/docs/modules/1.4.x/registrar.html#id271407
>>
>> Regards,
>> Bogdan
>>
>> michel freiha wrote:
>>> Dear All,
>>> I need to ask please about which function should I use in order to 
>>> check while making a call if the user who is dialing the number is 
>>> making the call from a registered account or not?
>>>
>>> Regards
>>>  
>>>
>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>   
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [Kamailio-Users] Registered user

2009-01-16 Thread Bogdan-Andrei Iancu
Sorry, that was the link for stable version.

The correct link is (for devel version) :
http://www.opensips.org/html/docs/modules/1.5.x/registrar.html#id271407

Here you can do  :
if (registered("location","$fu")) {

}

Regards,
Bogdan

Luciano Afranllie wrote:
> registered function does not check if called party is registered?
>
> I think he wants to know if calling party is using a regitered device...
>
> On Fri, Jan 16, 2009 at 11:42 AM, Bogdan-Andrei Iancu
>  wrote:
>   
>> Hi Michel,
>>
>> See the registered() function from the registrar module:
>>
>> http://www.opensips.org/html/docs/modules/1.4.x/registrar.html#id271407
>>
>> Regards,
>> Bogdan
>>
>> michel freiha wrote:
>> 
>>> Dear All,
>>> I need to ask please about which function should I use in order to
>>> check while making a call if the user who is dialing the number is
>>> making the call from a registered account or not?
>>>
>>> Regards
>>> 
>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>   
>> ___
>> Kamailio (OpenSER) - Users mailing list
>> us...@lists.kamailio.org
>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>
>> 
>
>   


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] CDRtool

2009-01-16 Thread Brian Chamberlain

Hi Adrian.

I am inclined to agree with you, I did indeed load the samples  
originally to get a feel for the functionallity. I have emptied the  
tables since. There must be some weird caching going on.


mysql> use cdrtool
Database changed
mysql> select * from destinations;
Empty set (0.00 sec)

mysql>


It's quite odd as the only thing getting updated on the radacct table  
for the CDR's is normalised = 1, I noted yesterday that canonicaluri  
and destinationID were getting updated.


Thanks,
Brian


On 16 Jan 2009, at 14:23, Adrian Georgescu wrote:

What you describe are the sample destinations in Dutch that come  
with the source code in a csv file that you have most probably  
loaded into your system. If you really had  an empty destinations  
table as you claim, they will not show up during normalization.


Adrian


On Jan 16, 2009, at 2:47 PM, Brian Chamberlain wrote:


Hi Adrian,

Thanks for the reply. I just imported my 200901 CDR's into a 200805  
table. I then ran some scripts to make the start of the SIP  
Destinations palatable to CDRTool.


CDRTool normalises them: +4417* (Verenigd Koninkrijk 44).  
These are fresh unnormalized CDR's fresh from OpenSIPS. My  
destinations table is empty.


With regard to the wiki are you talking about: 
http://cdrtool.ag-projects.com/browser/doc/RATING.txt

Thanks,
Brian

On 16 Jan 2009, at 13:26, Adrian Georgescu wrote:

You may have already normalized the CDRs when you had the  
destinations in your tables. The normalization updates the CDR  
table with the calculated destination id. If you normalize from  
scratch and still get data like that you obviously have  
provisioned it somehow, it cannot invent those numbers by itself  
without provisioning.


About dealing with custom prefixes you must craft an E164 class  
that deals with your dialing plan and use it instead of the  
default E164_Europe or E164_US. The updated Install wiki page  
describes this in more detail.


Adrian

On Jan 16, 2009, at 1:19 PM, Brian Chamberlain wrote:


Hi All,

I am doing some testing to normalise my destinations in the way  
that

CDRtool expects them to be before it normalises them.. :)

I have to do this as some of my providers make me do silly things  
with
prefixes etc. I know CDRTool allows me to put in a prefix to  
strip but

I have an array of them that I need to do.

Anyway, question..

I am testing to make sure my numbers are correct so I import my  
radius

records into a new table and when I look at the table in CDRTool it
seem to be matching my sip destinations to names eg.:

+1415 (VS (San Francisco) 1415)

This is confusing as I have nothing in my destination table..  
Does it

do some kind of external lookup? I did have information in the
destinations table which I purged some time ago, maybe its cached
somewhere..

Thanks,
Brian











___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
























___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] CDRtool

2009-01-16 Thread Adrian Georgescu
What you describe are the sample destinations in Dutch that come with  
the source code in a csv file that you have most probably loaded into  
your system. If you really had  an empty destinations table as you  
claim, they will not show up during normalization.


Adrian


On Jan 16, 2009, at 2:47 PM, Brian Chamberlain wrote:


Hi Adrian,

Thanks for the reply. I just imported my 200901 CDR's into a 200805  
table. I then ran some scripts to make the start of the SIP  
Destinations palatable to CDRTool.


CDRTool normalises them: +4417* (Verenigd Koninkrijk 44).  
These are fresh unnormalized CDR's fresh from OpenSIPS. My  
destinations table is empty.


With regard to the wiki are you talking about: 
http://cdrtool.ag-projects.com/browser/doc/RATING.txt

Thanks,
Brian

On 16 Jan 2009, at 13:26, Adrian Georgescu wrote:

You may have already normalized the CDRs when you had the  
destinations in your tables. The normalization updates the CDR  
table with the calculated destination id. If you normalize from  
scratch and still get data like that you obviously have provisioned  
it somehow, it cannot invent those numbers by itself without  
provisioning.


About dealing with custom prefixes you must craft an E164 class  
that deals with your dialing plan and use it instead of the default  
E164_Europe or E164_US. The updated Install wiki page describes  
this in more detail.


Adrian

On Jan 16, 2009, at 1:19 PM, Brian Chamberlain wrote:


Hi All,

I am doing some testing to normalise my destinations in the way that
CDRtool expects them to be before it normalises them.. :)

I have to do this as some of my providers make me do silly things  
with
prefixes etc. I know CDRTool allows me to put in a prefix to strip  
but

I have an array of them that I need to do.

Anyway, question..

I am testing to make sure my numbers are correct so I import my  
radius

records into a new table and when I look at the table in CDRTool it
seem to be matching my sip destinations to names eg.:

+1415 (VS (San Francisco) 1415)

This is confusing as I have nothing in my destination table.. Does  
it

do some kind of external lookup? I did have information in the
destinations table which I purged some time ago, maybe its cached
somewhere..

Thanks,
Brian











___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users














___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [Kamailio-Users] Registered user

2009-01-16 Thread Alex Balashov
Do you care if it's online, as long as it answers the challenge 
successfully with the same credentials it provides when it registers?

Daniel-Constantin Mierla wrote:

> 
> 
> On 01/16/2009 03:53 PM, Alex Balashov wrote:
>> Daniel,
>>
>> I am curious, what is the intended use case of this:
>>
>> "check if a user is calling from a registered device and if not, deny 
>> the call"
>>
>> Why not just issue a 407 Proxy Challenge for the incoming INVITE?
> you must authenticate the call, this check comes after, to be sure the 
> user is calling from a phone that was previously registered (so it is 
> online).
> 
> If you check the discussions from the last days, one good thing of doing 
> this is to prevent SIP Digest Access Authentication RELAY.
> 
> One can call from a sip phone even that phone is not registered 
> (REGISTER-200ok).
> 
> Cheers,
> Daniel
> 
> 
>>
>> -- ALex
>>
>> Daniel-Constantin Mierla wrote:
>>
>>> Hello,
>>>
>>> On 01/16/2009 03:31 PM, michel freiha wrote:
 Dear All,
 I need to ask please about which function should I use in order to 
 check while making a call if the user who is dialing the number is 
 making the call from a registered account or not?
>>> if you want to check if the user is calling from a registered phone, 
>>> you have to use kamailio trunk.
>>>
>>> See second example here:
>>> http://openser.blogspot.com/2008/10/registrar-enhancements.html
>>>
>>> Module documentation at:
>>> http://www.kamailio.org/docs/modules/devel/registrar.html
>>>
>>> Cheers,
>>> Daniel
>>>
>>
>>
> 


-- 
Alex Balashov
Evariste Systems
Web: http://www.evaristesys.com/
Tel: (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (678) 237-1775

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Need suggestion for opensips HA

2009-01-16 Thread Iñaki Baz Castillo
2009/1/16 Bogdan-Andrei Iancu :
> Personally I'm in favour of LVS or similar solution as I do not like to
> have my platform depending of the uac capabilities.

Also some clients, as Asterisk, implement very poorly the RFC 3263
(which iinvolves the SRV DNS lookup). For example Asterisk just uses
the first result when performing a SRV query.


-- 
Iñaki Baz Castillo

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] [Kamailio-Users] Registered user

2009-01-16 Thread Alex Balashov
Daniel,

I am curious, what is the intended use case of this:

"check if a user is calling from a registered device and if not, deny 
the call"

Why not just issue a 407 Proxy Challenge for the incoming INVITE?

-- ALex

Daniel-Constantin Mierla wrote:

> Hello,
> 
> On 01/16/2009 03:31 PM, michel freiha wrote:
>> Dear All,
>> I need to ask please about which function should I use in order to 
>> check while making a call if the user who is dialing the number is 
>> making the call from a registered account or not?
> if you want to check if the user is calling from a registered phone, you 
> have to use kamailio trunk.
> 
> See second example here:
> http://openser.blogspot.com/2008/10/registrar-enhancements.html
> 
> Module documentation at:
> http://www.kamailio.org/docs/modules/devel/registrar.html
> 
> Cheers,
> Daniel
> 


-- 
Alex Balashov
Evariste Systems
Web: http://www.evaristesys.com/
Tel: (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (678) 237-1775

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registered user

2009-01-16 Thread Alex Balashov
But doesn't that check if the AOR in the RURI can be located.

Michel,

The proper way to do this -- assuming your motive is security and 
authorisation -- is to challenge the incoming INVITE initial request of 
the caller (who is supposed to be registered) with a 407 proxy 
challenge, i.e. proxy_authorize()/proxy_challenge().

Bogdan-Andrei Iancu wrote:

> Hi Michel,
> 
> See the registered() function from the registrar module:
>
> http://www.opensips.org/html/docs/modules/1.4.x/registrar.html#id271407
> 
> Regards,
> Bogdan
> 
> michel freiha wrote:
>> Dear All,
>> I need to ask please about which function should I use in order to 
>> check while making a call if the user who is dialing the number is 
>> making the call from a registered account or not?
>>
>> Regards
>> 
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>   
> 
> 
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users


-- 
Alex Balashov
Evariste Systems
Web: http://www.evaristesys.com/
Tel: (+1) (678) 954-0670
Direct : (+1) (678) 954-0671
Mobile : (+1) (678) 237-1775

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] CDRtool

2009-01-16 Thread Brian Chamberlain
Hi Adrian,

Thanks for the reply. I just imported my 200901 CDR's into a 200805  
table. I then ran some scripts to make the start of the SIP  
Destinations palatable to CDRTool.

CDRTool normalises them: +4417* (Verenigd Koninkrijk 44).  
These are fresh unnormalized CDR's fresh from OpenSIPS. My  
destinations table is empty.

With regard to the wiki are you talking about: 
http://cdrtool.ag-projects.com/browser/doc/RATING.txt

Thanks,
Brian

On 16 Jan 2009, at 13:26, Adrian Georgescu wrote:

> You may have already normalized the CDRs when you had the  
> destinations in your tables. The normalization updates the CDR table  
> with the calculated destination id. If you normalize from scratch  
> and still get data like that you obviously have provisioned it  
> somehow, it cannot invent those numbers by itself without  
> provisioning.
>
> About dealing with custom prefixes you must craft an E164 class that  
> deals with your dialing plan and use it instead of the default  
> E164_Europe or E164_US. The updated Install wiki page describes this  
> in more detail.
>
> Adrian
>
> On Jan 16, 2009, at 1:19 PM, Brian Chamberlain wrote:
>
>> Hi All,
>>
>> I am doing some testing to normalise my destinations in the way that
>> CDRtool expects them to be before it normalises them.. :)
>>
>> I have to do this as some of my providers make me do silly things  
>> with
>> prefixes etc. I know CDRTool allows me to put in a prefix to strip  
>> but
>> I have an array of them that I need to do.
>>
>> Anyway, question..
>>
>> I am testing to make sure my numbers are correct so I import my  
>> radius
>> records into a new table and when I look at the table in CDRTool it
>> seem to be matching my sip destinations to names eg.:
>>
>> +1415 (VS (San Francisco) 1415)
>>
>> This is confusing as I have nothing in my destination table.. Does it
>> do some kind of external lookup? I did have information in the
>> destinations table which I purged some time ago, maybe its cached
>> somewhere..
>>
>> Thanks,
>> Brian
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ___
>> Users mailing list
>> Users@lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>










___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Registered user

2009-01-16 Thread Bogdan-Andrei Iancu
Hi Michel,

See the registered() function from the registrar module:
   
http://www.opensips.org/html/docs/modules/1.4.x/registrar.html#id271407

Regards,
Bogdan

michel freiha wrote:
> Dear All,
> I need to ask please about which function should I use in order to 
> check while making a call if the user who is dialing the number is 
> making the call from a registered account or not?
>
> Regards
> 
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] Registered user

2009-01-16 Thread michel freiha
Dear All,
I need to ask please about which function should I use in order to check
while making a call if the user who is dialing the number is making the call
from a registered account or not?

Regards
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] CDRtool

2009-01-16 Thread Adrian Georgescu
You may have already normalized the CDRs when you had the destinations  
in your tables. The normalization updates the CDR table with the  
calculated destination id. If you normalize from scratch and still get  
data like that you obviously have provisioned it somehow, it cannot  
invent those numbers by itself without provisioning.


About dealing with custom prefixes you must craft an E164 class that  
deals with your dialing plan and use it instead of the default  
E164_Europe or E164_US. The updated Install wiki page describes this  
in more detail.


Adrian

On Jan 16, 2009, at 1:19 PM, Brian Chamberlain wrote:


Hi All,

I am doing some testing to normalise my destinations in the way that
CDRtool expects them to be before it normalises them.. :)

I have to do this as some of my providers make me do silly things with
prefixes etc. I know CDRTool allows me to put in a prefix to strip but
I have an array of them that I need to do.

Anyway, question..

I am testing to make sure my numbers are correct so I import my radius
records into a new table and when I look at the table in CDRTool it
seem to be matching my sip destinations to names eg.:

+1415 (VS (San Francisco) 1415)

This is confusing as I have nothing in my destination table.. Does it
do some kind of external lookup? I did have information in the
destinations table which I purged some time ago, maybe its cached
somewhere..

Thanks,
Brian











___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


[OpenSIPS-Users] CDRtool

2009-01-16 Thread Brian Chamberlain
Hi All,

I am doing some testing to normalise my destinations in the way that  
CDRtool expects them to be before it normalises them.. :)

I have to do this as some of my providers make me do silly things with  
prefixes etc. I know CDRTool allows me to put in a prefix to strip but  
I have an array of them that I need to do.

Anyway, question..

I am testing to make sure my numbers are correct so I import my radius  
records into a new table and when I look at the table in CDRTool it  
seem to be matching my sip destinations to names eg.:

+1415 (VS (San Francisco) 1415)

This is confusing as I have nothing in my destination table.. Does it  
do some kind of external lookup? I did have information in the  
destinations table which I purged some time ago, maybe its cached  
somewhere..

Thanks,
Brian











___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Mediaproxy relay avp question

2009-01-16 Thread Dan Pascu
On Friday 16 January 2009, Giuseppe Roberti wrote:
> Dan Pascu wrote:
> > On Thursday 15 January 2009, Giuseppe Roberti wrote:
> >> Hi,
> >> can media_relay_avp be used with engage_media_proxy() or only for
> >> use_media_proxy() ?
> >
> > It works with both.
>
> Anyone is sure that it really works ?

I can't speak for anyone, but if you use the latest mediaproxy version 
(2.3.2) you may become a believer yourself ;)

-- 
Dan

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Need suggestion for opensips HA

2009-01-16 Thread Bogdan-Andrei Iancu
Hi Mark,

with SRV you move most of the logic on the client side, becoming 
dependent of it - like if it supports SRV, how often a SRV lookup is 
done, etc. Also, using SRV implies your opensips boxes have different 
IPs - this might be a problem because of the RR during a call. If a call 
is established through the opensips1 with IP1, the dialog will contain 
the RR with IP1; after a switch to the opensips2 during the call, the 
second proxy will not by default recognize the IP of the other server.

with LVS you are fully self sustained - you do not have any dependency 
of the used device , but such a setup is more complex (as all the HA is 
on your side, as provider). So, this is more complex from setup and 
managing point of view, but it is doable.

Personally I'm in favour of LVS or similar solution as I do not like to 
have my platform depending of the uac capabilities.

Regards,
Bogdan

mark morreny wrote:
> Hi,
>  
> I am currently considering using either SRV or LVS to fail-over and 
> load balance two Opensips. 
>  
> I understand SRV requires the client phone to support the specific 
> RFC, so is LVS a better solution?
>  
> Which one is typically used in a real world implementation?
>  
> Thank you in advance for your suggestion.
>  
> Regards,
> Mark
> 
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Regarding 600 bussy every where when i Forward INVITe message from B2BUA

2009-01-16 Thread Bogdan-Andrei Iancu
Hi,

You should post this question to the people working on the 
b2bua_simple.py project/app...

Regards,
Bogdan

sureshkumar.jaiswal wrote:
> Hi when i ran b2bua_simple.py
> like this  python b2bua_simple.py -f -l 172.18.2.187 -p 9 -n
> 172.18.2.187
> b2bua_simple.py  is running 172.18.2.187 and port for this is 9 and
> scscf is also running 172.18.2.187:6060
> and forward my INVITE message from scscf to b2bua_simple then b2bua 
> got this
> INVITE message but when
> b2bua again forward to scscf then we getting 600 bussy every where and 
> call
> has been terminated.
> folllowing message i have attache along this mail.
>
> can any one let me know what i have to do for successfull call using
> b2bua_simple.py.
>
>
>
> python b2bua_simple.py -f -l 172.18.2.187 -p 9 -n 172.18.2.187
> 08 Jan 15:26:22/GLOBAL/b2bua: RECEIVED message from 172.18.2.187:6060:
> INVITE sip:al...@info-spectrum.com SIP/2.0
> Record-Route: 
> Route: ,
> 
> Record-Route: 
> Via: SIP/2.0/UDP 172.18.2.187:6060;branch=z9hG4bK2ede.b679b107.0
> Via: SIP/2.0/UDP 172.18.2.187:4060;branch=z9hG4bK2ede.baaf9433.0
> Via: SIP/2.0/UDP 172.18.2.74:2423;rport=2423;branch=z9hG4bK32209
> From: ;tag=9791
> To: 
> Call-ID: 1231260517...@172.18.2.74
> CSeq: 201 INVITE
> Max-Forwards: 15
> Allow: INVITE,ACK,CANCEL,BYE,MESSAGE,OPTIONS,UPDATE,NOTIFY,PRACK
> Contact: ;expires=1000
> User-Agent: Mercuro IMS Client Beta (4.0.1011.0)
> Supported: sdp-anat
> Content-Type: application/sdp
> P-Access-Network-Info: 3GPP-UTRAN-TDD;utran-cell-id-3gpp=
> Privacy: none
> Content-Length: 468
> P-Asserted-Identity: 
> P-Charging-Vector:
> icid-value="P-CSCFabcd4965cdc600ea";icid-generated-at=172.18.2.187;orig-ioi="info-spectrum.com"
> Timestamp: 1231408582
>
> v=0
> o=- 3344 3344 IN IP4 172.18.2.74
> s=Mercuro IMS Client Session
> t=0 0
> m=audio 30904 RTP/AVP 0 8 101
> c=IN IP4 172.18.2.74
> a=rtpmap:0 PCMU/8000/1
> a=rtpmap:8 PCMA/8000/1
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-15
> m=video 30080 RTP/AVP 111 34 31
> c=IN IP4 172.18.2.74
> a=rtpmap:111 H263-1998/9
> a=fmtp:111 CIF=2;QCIF=2/MaxBR=2400
> a=rtpmap:34 H263/9
> a=fmtp:34 CIF=2;QCIF=2/MaxBR=2400
> a=rtpmap:31 H261/9
> a=fmtp:31 CIF=2;QCIF=2/MaxBR=2400
>
> 08 Jan 15:26:22/GLOBAL/b2bua: SENDING message to 172.18.2.187:6060:
> SIP/2.0 100 Trying
> Via: SIP/2.0/UDP 172.18.2.187:6060;branch=z9hG4bK2ede.b679b107.0
> Via: SIP/2.0/UDP 172.18.2.187:4060;branch=z9hG4bK2ede.baaf9433.0
> Via: SIP/2.0/UDP 172.18.2.74:2423;rport=2423;branch=z9hG4bK32209
> Record-Route: 
> Record-Route: 
> From: ;tag=9791
> To: 
> Call-ID: 1231260517...@172.18.2.74
> CSeq: 201 INVITE
> Server: Sippy B2BUA (Simple)
>
>
> 08 Jan 15:26:22/GLOBAL/b2bua: SENDING message to 172.18.2.187:5060:
> INVITE sip:al...@172.18.2.187:5060 SIP/2.0
> Via: SIP/2.0/UDP
> 172.18.2.187:9;branch=z9hG4bK8801d0c21346d39cb48f86a2abbedc18;rport
> Max-Forwards: 70
> From: ;tag=7cb0f980e37d8198e1c1dfeb4af2e531
> To: 
> Call-ID: 1231260517...@172.18.2.74
> CSeq: 200 INVITE
> Contact: Anonymous 
> Expires: 300
> User-Agent: Sippy B2BUA (Simple)
> cisco-GUID: 288073477-2250398923-1693218158-3417804826
> h323-conf-id: 288073477-2250398923-1693218158-3417804826
> Content-Length: 468
> Content-Type: application/sdp
>
> v=0
> o=- 3344 3344 IN IP4 172.18.2.74
> s=Mercuro IMS Client Session
> t=0 0
> m=audio 30904 RTP/AVP 0 8 101
> c=IN IP4 172.18.2.74
> a=rtpmap:0 PCMU/8000/1
> a=rtpmap:8 PCMA/8000/1
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-15
> m=video 30080 RTP/AVP 111 34 31
> c=IN IP4 172.18.2.74
> a=rtpmap:111 H263-1998/9
> a=fmtp:111 CIF=2;QCIF=2/MaxBR=2400
> a=rtpmap:34 H263/9
> a=fmtp:34 CIF=2;QCIF=2/MaxBR=2400
> a=rtpmap:31 H261/9
> a=fmtp:31 CIF=2;QCIF=2/MaxBR=2400
>
> 08 Jan 15:26:23/GLOBAL/b2bua: RECEIVED message from 172.18.2.187:5060:
> SIP/2.0 100 trying -- your call is important to us
> Via: SIP/2.0/UDP
> 172.18.2.187:9;branch=z9hG4bK8801d0c21346d39cb48f86a2abbedc18;rport=34463
> From: ;tag=7cb0f980e37d8198e1c1dfeb4af2e531
> To: 
> Call-ID: 1231260517...@172.18.2.74
> CSeq: 200 INVITE
> Server: Sip EXpress router (2.1.0-dev1 OpenIMSCore (i386/linux))
> Content-Length: 0
> Timestamp: 1231408582
> Warning: 392 172.18.2.187:5060 "Noisy feedback tells:  pid=3661
> req_src_ip=172.18.2.187 req_src_port=34463
> in_uri=sip:al...@172.18.2.187:5060 out_uri=sip:al...@172.18.2.187:5060
> via_cnt==1"
>
>
> 08 Jan 15:26:33/GLOBAL/b2bua: RECEIVED message from 172.18.2.187:5060:
> SIP/2.0 600 Busy everywhere - Forwarding to S-CSCF failed
> Via: SIP/2.0/UDP
> 172.18.2.187:9;branch=z9hG4bK8801d0c21346d39cb48f86a2abbedc18;rport=34463
> From: ;tag=7cb0f980e37d8198e1c1dfeb4af2e531
> To: ;tag=0fb5d9176cb7d6a1cb577893687b8ec9-47d1
> Call-ID: 1231260517...@172.18.2.74
> CSeq: 200 INVITE
> Server: Sip EXpress router (2.1.0-dev1 OpenIMSCore (i386/linux))
> Content-Length: 0
> Timestamp: 1231408593
> Warning: 392 172.18.2.187:5060 "Noisy feedback tells:  pid=3664
> req_src_ip=172.18.2.187 req_src_port=5060 
> i

Re: [OpenSIPS-Users] CRITICAL:core:receive_fd Error

2009-01-16 Thread Bogdan-Andrei Iancu
Hi Antonio,

Was this crash related to the SEAS bug you discovered? or should we 
further investigate?

Thanks and regards,
Bogdan

Antonio Frongillo wrote:
>
>
> Hi,
> below the output you requested:
>
> (gdb) bt
> #0  0x00da8031 in run_trans_callbacks (type=2048,
> trans=0xb6082b50, req=0x0, rpl=0x0, code=0) at t_hooks.c:204
> #1  0x00d951cd in free_cell (dead_cell=0xb6082b50) at h_table.c:124
> #2  0x00daa574 in delete_cell (p_cell=0xb6082b50, unlock=1) at
> timer.c:239
> #3  0x00dab589 in timer_routine (ticks=192, attr=0x0) at timer.c:409
>
> #4  0x080c5231 in start_timer_processes () at timer.c:280
> #5  0x0806b703 in main (argc=6, argv=0xbfecb0c4) at main.c:820
> (gdb) p cbp
> $1 = (struct tm_callback *) 0x69732f39
>
> What could be? thanks in advance,
> Antonio
>
>
> 2009/1/13 Bogdan-Andrei Iancu  >
>
> Thanks Antonio,
>
> in gdb, try to print cbp pointer - use "p cbp"What is the
> value?
>
>
> Regards,
> Bogdan
>
> Antonio Frongillo wrote:
>
>
>
> 2009/1/12 Antonio Frongillo    >>
>
>
>Thanks for your reply, I applied the patch you sent.
>Now it generates a single core file, following it's the
> bt from
>gdb, any ideas on what could be?
>
>
>Thanks in advance,
>Antonio
>
>GNU gdb Red Hat Linux (6.3.0.0-1.143.el4rh)
>Copyright 2004 Free Software Foundation, Inc.
>GDB is free software, covered by the GNU General Public
> License,
>and you are
>welcome to change it and/or distribute copies of it
> under certain
>conditions.
>Type "show copying" to see the conditions.
>There is absolutely no warranty for GDB.  Type "show
> warranty" for
>details.
>This GDB was configured as
> "i386-redhat-linux-gnu"...Using host
>libthread_db library "/lib/tls/libthread_db.so.1".
>
>Core was generated by `./opensips -d -d -d -d -E'.
>
>Program terminated with signal 11, Segmentation fault.
>Reading symbols from /lib/libdl.so.2...done.
>Loaded symbols for /lib/libdl.so.2
>Reading symbols from /lib/libresolv.so.2...done.
>Loaded symbols for /lib/libresolv.so.2
>Reading symbols from /lib/libssl.so.4...done.
>Loaded symbols for /lib/libssl.so.4
>Reading symbols from /lib/libcrypto.so.4...done.
>Loaded symbols for /lib/libcrypto.so.4
>Reading symbols from /lib/tls/libc.so.6...done.
>Loaded symbols for /lib/tls/libc.so.6
>Reading symbols from /lib/ld-linux.so.2...done.
>Loaded symbols for /lib/ld-linux.so.2
>Reading symbols from /usr/lib/libgssapi_krb5.so.2...done.
>Loaded symbols for /usr/lib/libgssapi_krb5.so.2
>Reading symbols from /usr/lib/libkrb5.so.3...done.
>Loaded symbols for /usr/lib/libkrb5.so.3
>Reading symbols from /lib/libcom_err.so.2...done.
>Loaded symbols for /lib/libcom_err.so.2
>Reading symbols from /usr/lib/libk5crypto.so.3...done.
>Loaded symbols for /usr/lib/libk5crypto.so.3
>Reading symbols from /usr/lib/libz.so.1...done.
>Loaded symbols for /usr/lib/libz.so.1
>Reading symbols from
>/product/opensips/lib/opensips/modules/db_mysql.so...done.
>Loaded symbols for
> /product/opensips//lib/opensips/modules/db_mysql.so
>Reading symbols from
> /usr/lib/mysql/libmysqlclient.so.14...done.
>Loaded symbols for /usr/lib/mysql/libmysqlclient.so.14
>Reading symbols from /lib/libcrypt.so.1...done.
>Loaded symbols for /lib/libcrypt.so.1
>Reading symbols from /lib/libnsl.so.1...done.
>Loaded symbols for /lib/libnsl.so.1
>Reading symbols from /lib/tls/libm.so.6...done.
>Loaded symbols for /lib/tls/libm.so.6
>Reading symbols from
>/product/opensips/lib/opensips/modules/sl.so...done.
>Loaded symbols for
> /product/opensips//lib/opensips/modules/sl.so
>Reading symbols from
>/product/opensips/lib/opensips/modules/tm.so...done.
>Loaded symbols for
> /product/opensips//lib/opensips/modules/tm.so
>Reading symbols from
>/product/open

Re: [OpenSIPS-Users] Max No Of Registered users

2009-01-16 Thread Bogdan-Andrei Iancu
Hi  Zen,

even 64M should be enough for 3K of registrationsAn this is not 
related to CPU.

Regards,
Bogdan

Zen Kato wrote:
>>> Dear All
>>>
>>> Is there a limitation of the number of users that can register to the server
>>>   
>> Doing some tests I've registered more than 5000 users. AFAIK there is
>> no limit (depending on the memory of course).
>> 
>
> How much memory did you set for 5,000 users? And which CPU did you use?
>
> Regards,
> Zen
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>   


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Contact Header Crash

2009-01-16 Thread Bogdan-Andrei Iancu
Hi Antonio,

Thanks for trouble shooting - you are correct, the module should be 
proofed to such issues (like insufficient buffer) and not crash. I will 
fwd this to the people working on this module.

regards,
Bogdan

Antonio Frongillo wrote:
> Hi Bogdan,
>
> I went deeper in the analysis and I find out that the problem was that 
> the SIP message is too long and makes Seas crash.
>
> I found the parameter ENCODED_MSG_SIZE in "seas.h" that is set to 3200 
> by default.
> Setting this parameter to a larger value it seems that all is going fine.
>
> What do you think about this issue? It seems not a good behavior that 
> the OpenSips server crash with this kind of messages.
> Is it possible to release a patch that fix this or for example makes 
> the maximum size of the payload configurable from the opensips 
> configuration file?
>
> Thanks in advance,
> Antonio
>
> 2009/1/15 Antonio Frongillo  >
>
> Hi Bogdan,
> I made a deeper analysis on the problem and I think that the error
> (the seg fault on SEAS module) is caused by incoming messages with
> a BIG Content.
>
> Both 200 OK with big payload and NOTIFY makes OpenSips seas module
> to crash in different points (seeing the core generated) and
> randomly (it doesn't crash for each message, also identical
> messages some times works and other times crashes).
>
> Could it be that when Seas try to read the BIG Content it wrongly
> manages the memory and write in an illegal memory address (so
> sometimes works and other times go in seg fault) 
>
> Below you can find the logs of OpenSips and a couple of core dump.
>
> Jan 15 17:31:31 [31065] DBG:core:tcp_send: tcp connection found
> (0xb614d6a0), acquiring fd
> Jan 15 17:31:31 [31065] DBG:core:tcp_send: c= 0xb614d6a0, n=8
> Jan 15 17:31:31 [31061] DBG:core:handle_ser_child: read response=
> b614d6a0, 1, fd -1 from 1 (31042)
> Jan 15 17:31:31 [31065] DBG:core:tcp_send: after receive_fd: c=
> 0xb614d6a0 n=4 fd=13
> Jan 15 17:31:31 [31065] DBG:core:tcp_send: sending...
> Jan 15 17:31:31 [31065] DBG:core:tcp_send: after write: c=
> 0xb614d6a0 n=1915 fd=13
> Jan 15 17:31:31 [31065] DBG:core:tcp_send: buf=
> SERVICE sip:max.ambr...@hmcint.local:5060;transport=tcp SIP/2.0
> Via: SIP/2.0/TCP 192.168.5.59;branch=z9hG4bKa21a.c42740c2.0
> To: sip:max.ambr...@hmcint.local:5060;transport=tcp
> From:
> 
> sip:max.ambr...@hmcint.local;transport=tcp;tag=AB62C6E82E8FD0E5FE0D61C590FF8064
> CSeq: 1 SERVICE
> Call-ID: 2835f715d923d84438cd30bfcb886...@192.168.5.59
> 
> Content-Length: 1064
> Max-Forwards: 70
> Contact:
> ;methods="INVITE,
> MESSAGE, INFO, OPTIONS, BYE, CANCEL, NOTIFY, ACK,
> 
> REFER";proxy=replace;+sip.instance=""
> Proxy-Authorization: NTLM qop="auth",realm="SIP Communications
> 
> Service",opaque="23E04879",crand="94867859",cnum="25",targetname="HMCINTOCS.HMCINT.LOCAL",response="01006A61B6F3C230F2DF"
> Content-Type: application/msrtc-category-publish+xml
>
>  
> xmlns="http://schemas.microsoft.com/2006/09/sip/rich-presence";> uri="sip:max.ambr...@hmcint.local"> categoryName="state" instance="603979776" container="3"
> version="0" expireType="time" expires="0"/> categoryName="state" instance="603979776" container="2"
> version="0" expireType="time" expires="0"/> categoryName="state" instance="536870912" container="3"
> version="141" expireType="static"> xmlns="http://schemas.microsoft.com/2006/09/sip/state";
> manual="true"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> 
> xsi:type="userState">3500 categoryName="state" instance="536870912" container="2"
> version="141" expireType="static"> xmlns="http://schemas.microsoft.com/2006/09/sip/state";
> manual="true"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> 
> xsi:type="userState">3500
> Jan 15 17:31:31 [31065] DBG:tm:set_timer: relative timeout is 30
> Jan 15 17:31:31 [31065] DBG:tm:insert_timer_unsafe: [0]:
> 0xb6160ed0 (230)
> Jan 15 17:31:31 [31065] DBG:seas:process_input: (Action
> dispatched,buffer.len=0)
> Jan 15 17:31:31 [31053] DBG:core:tcp_read_req: content-length= 3935
> Jan 15 17:31:31 [31053] DBG:core:parse_msg: SIP Reply  (status):
> Jan 15 17:31:31 [31053] DBG:core:parse_msg:  version: 
> Jan 15 17:31:31 [31053] DBG:core:parse_msg:  status:  <200>
> Jan 15 17:31:31 [31053] DBG:core:parse_msg:  reason:  
> Jan 15 17:31:31 [31053] DBG:core:parse_headers: flags=2
> Jan 15 17:31:31 [31053] DBG:core:get_hdr_field: content_length=3935
> Jan 15 17:31:31 [31053] DBG:core:parse_to_param: transport=tcp
> Jan 15 17:31:31 [31053] DBG:core:parse_to_param:
> tag=F38CBA48BA483432B3C92CFD2033D7D1
> Jan 15 17:31:31 [31053] DBG:core:parse_to: end of he

Re: [OpenSIPS-Users] Strange retrasmission of bye messages

2009-01-16 Thread Bogdan-Andrei Iancu
Hi


See line 876:

Jan 14 16:32:44 [9934] DBG:tm:t_reply_matching: hash 19218 label 925515934 
branch 0
Jan 14 16:32:44 [9934] DBG:tm:t_reply_matching: no matching transaction exists
Jan 14 16:32:44 [9934] DBG:tm:t_reply_matching: failure to match a transaction
Jan 14 16:32:44 [9934] DBG:tm:t_check: end=(nil)

It looks like the 200 reply for the BYE does not match the BYE 
transactionthat's why the TM keep retransmitting.

Regards,
Bogdan

Giuseppe Roberti wrote:
> Hi,
> maybe its my misconfiguration (or misunderstood), it resend the BYE for
> every 200 Ok reply from the gateway.
> I have tried to send again 200 Ok from the gateway for every received
> BYE so it look like:
>
> 1) UAC => BYE => OPENSIPS
> 2) OPENSIPS => BYE => GW
> 3) GW => 200 => OPENSIPS
> 4) OPENSIPS => BYE => GW
> 5) GW => 200 => OPENSIPS
> 6) OPENSIPS => BYE => GW
> 7) GW => 200 => OPENSIPS
> .. and so on ..
>
> The full log can be found on http://rafb.net/p/ltV7wd57.html
>
> Thanks.
>
> Bogdan-Andrei Iancu wrote:
>   
>> Hi,
>>
>> if it is a single one, it may be delayed reply to the BYE request and to
>> have a race between firing the first retransmission and receiving the
>> reply (as maybe both events are very close in time).
>>
>> Do you have a trace with timestamps also?
>>
>> Regards,
>> Bogdan
>>
>> Giuseppe Roberti wrote:
>> 
>>> It happen also to me sometimes, and its a one time retransmission, but i
>>> dont know why :P
>>>
>>> Bogdan-Andrei Iancu wrote:
>>>  
>>>   
 Hi Matteo,

 is the retransmission on time event - I mean a single retransmission
 ? or it keeps going?

 Regards,
 Bogdan

 mmarzu...@interfree.it wrote:

 
> Hi all. Sniffing the traffic I realized that sometimes the signaling
> of BYE transaction contains replicated messages BYE.
> This is an example:
>
> #
> U 10.10.45.78:5060 -> 10.10.45.158:5060
> BYE sip:1...@10.10.45.102:5060 SIP/2.0.
> Via: SIP/2.0/UDP
> 10.10.45.78:5060;rport;branch=z9hG4bK08DFC9CC7C9059DAE6CC8D4AE1FD5BB0.
> From: ;tag=597156156.
> To: "Sjphone laptop_User"
> ;tag=31316689311285800150.
> Contact: .
> Route: .
> Call-ID: 8fa5a2ba-1dd2-11b2-8843-df179ccf6...@10.10.45.102.
> CSeq: 25008 BYE.
> Max-Forwards: 70.
> User-Agent: X-Lite release 1105d.
> Content-Length: 0.
> .
>
> #
> U 10.10.45.158:5060 -> 10.10.45.102:5060
> BYE sip:1...@10.10.45.102:5060 SIP/2.0.
> Via: SIP/2.0/UDP 10.10.45.158;branch=z9hG4bKc2e9.5af153d5.0.
> Via: SIP/2.0/UDP
> 10.10.45.78:5060;received=10.10.45.78;rport=5060;branch=z9hG4bK08DFC9CC7C9059DAE6CC8D4AE1FD5BB0.
>
> From: ;tag=597156156.
> To: "Sjphone laptop_User"
> ;tag=31316689311285800150.
> Contact: .
> Call-ID: 8fa5a2ba-1dd2-11b2-8843-df179ccf6...@10.10.45.102.
> CSeq: 25008 BYE.
> Max-Forwards: 69.
> User-Agent: X-Lite release 1105d.
> Content-Length: 0.
> .
>
> #
> U 10.10.45.102:5060 -> 10.10.45.158:5060
> SIP/2.0 200 OK.
> Via: SIP/2.0/UDP
> 10.10.45.158;branch=z9hG4bKc2e9.5af153d5.0,SIP/2.0/UDP
> 10.10.45.78:5060;rport=5060;received=10.10.45.78;branch=z9hG4bK08DFC9CC7C9059DAE6CC8D4AE1FD5BB0.
>
> Content-Length: 0.
> Call-ID: 8fa5a2ba-1dd2-11b2-8843-df179ccf6...@10.10.45.102.
> CSeq: 25008 BYE.
> From: ;tag=597156156.
> Server: SJphone/1.60.299a/L (SJ Labs).
> To: "Sjphone laptop_User";tag=31316689311285800150.
> .
>
> #
> U 10.10.45.158:5060 -> 10.10.45.78:5060
> SIP/2.0 200 OK.
> Via: SIP/2.0/UDP
> 10.10.45.78:5060;rport=5060;received=10.10.45.78;branch=z9hG4bK08DFC9CC7C9059DAE6CC8D4AE1FD5BB0.
>
> Content-Length: 0.
> Call-ID: 8fa5a2ba-1dd2-11b2-8843-df179ccf6...@10.10.45.102.
> CSeq: 25008 BYE.
> From: ;tag=597156156.
> Server: SJphone/1.60.299a/L (SJ Labs).
> To: "Sjphone laptop_User";tag=31316689311285800150.
> .
>
> #
> U 10.10.45.158:5060 -> 10.10.45.102:5060
> BYE sip:1...@10.10.45.102:5060 SIP/2.0.
> Via: SIP/2.0/UDP 10.10.45.158;branch=z9hG4bKc2e9.5af153d5.0.
> Via: SIP/2.0/UDP
> 10.10.45.78:5060;received=10.10.45.78;rport=5060;branch=z9hG4bK08DFC9CC7C9059DAE6CC8D4AE1FD5BB0.
>
> From: ;tag=597156156.
> To: "Sjphone laptop_User"
> ;tag=31316689311285800150.
> Contact: .
> Call-ID: 8fa5a2ba-1dd2-11b2-8843-df179ccf6...@10.10.45.102.
> CSeq: 25008 BYE.
> Max-Forwards: 69.
> User-Agent: X-Lite release 1105d.
> Content-Length: 0.
> .
>
> #
> U 10.10.45.102:5060 -> 10.10.45.158:5060
> SIP/2.0 200 OK.
> Via: SIP/2.0/UDP
> 10.10.45.158;branch=z9hG4bKc2e9.5af153d5.0,SIP/2.0/UDP
> 10.10.45.78:5060;rport=5060;received=10.10.45.78;branch=z9hG4bK08DFC9CC7C9059DAE6CC8D4AE1FD5BB0.
>
> Content-Length: 0.
> Call-ID: 8fa5a2ba-1dd2-11b2-8843-df179ccf6...@10.10.45.102.
> CSeq: 25008 BYE.
> From: ;tag=597156156.
>>>

Re: [OpenSIPS-Users] IP authentication

2009-01-16 Thread Bogdan-Andrei Iancu
Hi Michel,

I still see in your cfg that you set the first param to 1:

allow_address("*1*", "$si", "$sp")

But this must be set to 0 as in order to match the "grp" field from your 
table - this is by default 0!.

Regards,
Bogdan

michel freiha wrote:
> Dear Sir,
>
> Kindly check the Whole configuration file:
>
> http://pastebin.com/d16fe5f36
>
> Please let me know if there is something wrong...I'm not be able to 
> make a call and when dialing 00 from a registered or non registered 
> endpoint OpenSIPS run inside the function if(!allow_address("1", 
> "$si", "$sp")){
>
>
> Regards
>
> On Thu, Jan 15, 2009 at 10:07 PM, Brett Nemeroff  > wrote:
>
> What are you using for a mask? Bogdan, what's the format for that
> field? Is it typical slash notation? ie: 24 for a class c
> (255.255.255.0).
>
>
>
> On Thu, Jan 15, 2009 at 9:52 AM, michel freiha  > wrote:
>
> Dear Bogdan,
>
> I did the following:
>
> if(!allow_address("0", "$si", "$sp")){
>
> sl_send_reply("403", "Forbidden");
> 
> xlog("K");
> exit;
> }
>
> When making a call, the system is not matching the condition
> in all cases...which means if my IP reside on the address
> table or not
>
> Regards
>
>
> On Thu, Jan 15, 2009 at 5:24 PM, Bogdan-Andrei Iancu
> mailto:bog...@voice-system.ro>> wrote:
>
> Hi Michel,
>
> seams allow_address() has mandatory params, replace with:
>   allow_address("0", "$si", "$sp")
>
>
> Regards,
> Bogdan
>
>
> michel freiha wrote:
>
> Dear Bogdan,
>
> I have created the address table as you asked me in
> the previous email then I added the following to the
> opensips.cfg file:
>
> route{
>
> if (!allow_address()) {
> sl_send_reply("403", "Forbidden");
> xlog("$si");
> 
> xlog("K");
> };
>
> I added only IP address to the address table...When
> trying to restart OpenSIps I got the below error:
>
>
> Thanks for the help
>
> Regards
>
>
>
> On Thu, Jan 15, 2009 at 11:51 AM, Bogdan-Andrei Iancu
>  
>  >> wrote:
>
>Hi Michel,
>
>So, the table must look like:
>
>CREATE TABLE address (
>  id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY
> NOT NULL,
>  grp SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL,
>  ip_addr VARCHAR(15) NOT NULL,
>  mask TINYINT DEFAULT 32 NOT NULL,
>  port SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL
>) ENGINE=MyISAM;
>
>
>so, mask is integer after all :). What you should
> put in db (to
>test) is:
>  insert into address (ip_addr) values
> ("xxx.xxx.xxx.xxx");
>
>and check the allow_address() then.
>
>Let me know if there are errors at startup or at
> runtime.
>
>
>Regards,
>Bogdan
>
>michel freiha wrote:
>
>Dear Bogdan,
>
>I tried allow_address() and it returns an error
> when
>restarting OpenSIPS..Even I tried to change the
> mask field
>type from tinit to varchar but if I put a value
> inside it like
>26 and restart OpenSIPS I even get an error
>
>Regards
>
>Regards
>
>On Thu, Jan 15, 2009 at 11:20 AM, Bogdan-Andrei
> Iancu
> 
>  >
> 
> 
>   Hi Michel,
>
>   Have you tried to use the simple format of
> the command ?
>
>   Like  allow_address() ?
>
>   Also not that after filling in the table,
>  

Re: [OpenSIPS-Users] IP authentication

2009-01-16 Thread Bogdan-Andrei Iancu
The mask field is integer and it is a number between 0 and 32, 
representing the active bits in the mask.

Regards,
Bogdan

michel freiha wrote:
> I'm using 24 and not 255.255.
>
> Regards
>
> On Thu, Jan 15, 2009 at 10:07 PM, Brett Nemeroff  > wrote:
>
> What are you using for a mask? Bogdan, what's the format for that
> field? Is it typical slash notation? ie: 24 for a class c
> (255.255.255.0).
>
>
>
> On Thu, Jan 15, 2009 at 9:52 AM, michel freiha  > wrote:
>
> Dear Bogdan,
>
> I did the following:
>
> if(!allow_address("0", "$si", "$sp")){
>
> sl_send_reply("403", "Forbidden");
> 
> xlog("K");
> exit;
> }
>
> When making a call, the system is not matching the condition
> in all cases...which means if my IP reside on the address
> table or not
>
> Regards
>
>
> On Thu, Jan 15, 2009 at 5:24 PM, Bogdan-Andrei Iancu
> mailto:bog...@voice-system.ro>> wrote:
>
> Hi Michel,
>
> seams allow_address() has mandatory params, replace with:
>   allow_address("0", "$si", "$sp")
>
>
> Regards,
> Bogdan
>
>
> michel freiha wrote:
>
> Dear Bogdan,
>
> I have created the address table as you asked me in
> the previous email then I added the following to the
> opensips.cfg file:
>
> route{
>
> if (!allow_address()) {
> sl_send_reply("403", "Forbidden");
> xlog("$si");
> 
> xlog("K");
> };
>
> I added only IP address to the address table...When
> trying to restart OpenSIps I got the below error:
>
>
> Thanks for the help
>
> Regards
>
>
>
> On Thu, Jan 15, 2009 at 11:51 AM, Bogdan-Andrei Iancu
>  
>  >> wrote:
>
>Hi Michel,
>
>So, the table must look like:
>
>CREATE TABLE address (
>  id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY
> NOT NULL,
>  grp SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL,
>  ip_addr VARCHAR(15) NOT NULL,
>  mask TINYINT DEFAULT 32 NOT NULL,
>  port SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL
>) ENGINE=MyISAM;
>
>
>so, mask is integer after all :). What you should
> put in db (to
>test) is:
>  insert into address (ip_addr) values
> ("xxx.xxx.xxx.xxx");
>
>and check the allow_address() then.
>
>Let me know if there are errors at startup or at
> runtime.
>
>
>Regards,
>Bogdan
>
>michel freiha wrote:
>
>Dear Bogdan,
>
>I tried allow_address() and it returns an error
> when
>restarting OpenSIPS..Even I tried to change the
> mask field
>type from tinit to varchar but if I put a value
> inside it like
>26 and restart OpenSIPS I even get an error
>
>Regards
>
>Regards
>
>On Thu, Jan 15, 2009 at 11:20 AM, Bogdan-Andrei
> Iancu
> 
>  >
> 
> 
>   Hi Michel,
>
>   Have you tried to use the simple format of
> the command ?
>
>   Like  allow_address() ?
>
>   Also not that after filling in the table,
> you have either to
>   restart, either to issue the
> "address_reload" MI command.
>
>   Regards,
>   Bogdan
>
>   michel freiha wrote:
>
>   Dear Sir,
>   I'm trying to authenticate users based
> on their IP
>   

Re: [OpenSIPS-Users] Cant connect remote DB using new opensips 1.4.4

2009-01-16 Thread Bogdan-Andrei Iancu
Hi Rafael,

between 1.4.3 and 1.4.4, nothing was changed at DB level, so there is 
not reason to act differently. Based on the logs, it looks like you 
opensips simply cannot connect to DB server.

have you took a look with tcpdump to see if the there is any attempt 
(and where) to connect to DB?

Regards,
Bogdan

Rafael Risco Gonzales-Vigil wrote:
> Hi
> I've downloaded opensips 1.4.4 to upgrade my system from 1.4.3, it 
> compiled ok but with this version opensips can not connect to the 
> remote DB so I had to go back to 1.4.3, please see the error logs below.
>
> Sometimes this problem appears when run 1.4.3 but opensips load in 
> second try, so most of the time I have to run 
> '/etc/init.d/opensips.init opensipsstart' twice.. but with this 
> version 1.4.4 do not load properly.
>
> Another detail: I am using a VIEW from mya2billing.cc_card as a 
> subscriber table to load 7 subscribers in this way:
>
> CREATE VIEW opensips.subscriber_v1 AS 
> SELECT id AS id,
> useralias AS username,
> '192.168.12.254' AS domain,
> userpass AS password,
> email AS email_address,
> md5(concat(useralias,' : ','192.168.12.254',' : ',userpass)) AS ha1,
> md5(concat(useralias,'@','192.168.12.254',' : ','192.168.12.254',' : 
> ',userpass)) AS ha1b,
> useralias AS rpid from mya2billing.cc_card WHERE tariff=2;
>
> INSERT INTO version (table_name,table_version) VALUES 
> ('subscriber_v1','6');
>
>
> ->
> LOGS when trying opensips 1.4.4
> .
> ..
> ...
> 
> Jan 15 16:05:08 [23335] INFO:nathelper:rtpp_test: rtp proxy 
>  found, support for it enabled
> Register authentication failed - F=sip:64820...@192.168.12.254 
>  IP=10.254.52.120 UA=CM5K-TA1S  
> (712280)
> Registration successful - F=sip:64820...@192.168.12.254 
>  IP=192.168.83.107 UA=CM5K  
> (611220)
>
> Jan 15 16:05:08 [23323] INFO:nathelper:rtpp_test: rtp proxy 
>  found, support for it enabled
> Jan 15 16:05:08 [23329] INFO:nathelper:rtpp_test: rtp proxy 
>  found, support for it enabled
> Registration successful - F=sip:64820...@192.168.12.254 
>  IP=10.254.52.120 UA=CM5K-TA1S  
> (712280)
>
> Jan 15 16:05:08 [23336] INFO:nathelper:rtpp_test: rtp proxy 
>  found, support for it enabled
> Jan 15 16:05:08 [23338] INFO:nathelper:rtpp_test: rtp proxy 
>  found, support for it enabled
> Jan 15 16:05:08 [23340] ERROR:db_mysql:db_mysql_new_connection: driver 
> error: Can't connect to MySQL server on '192.168.1.29' (4)
> Jan 15 16:05:08 [23340] ERROR:core:db_do_init: could not add 
> connection to the poolJan 15 16:05:08 [23340] ERROR:usrloc:child_init: 
> child(27): failed to connect to database
> Jan 15 16:05:08 [23340] ERROR:core:init_mod_child: failed to 
> initializing module usrloc, rank 27
> Jan 15 16:05:08 [23340] ERROR:core:tcp_init_children: init_children failed
> Jan 15 16:05:08 [23339] ERROR:db_mysql:db_mysql_new_connection: driver 
> error: Can't connect to MySQL server on '192.168.1.29' (4)
> Jan 15 16:05:08 [23339] ERROR:core:db_do_init: could not add 
> connection to the poolJan 15 16:05:08 [23339] ERROR:usrloc:child_init: 
> child(26): failed to connect to database
> Jan 15 16:05:08 [23339] ERROR:core:init_mod_child: failed to 
> initializing module usrloc, rank 26
> Jan 15 16:05:08 [23339] ERROR:core:tcp_init_children: init_children failed
> Jan 15 16:05:08 [23341] ERROR:db_mysql:db_mysql_new_connection: driver 
> error: Can't connect to MySQL server on '192.168.1.29' (4)
> Jan 15 16:05:08 [23341] ERROR:core:db_do_init: could not add 
> connection to the poolJan 15 16:05:08 [23341] ERROR:usrloc:child_init: 
> child(28): failed to connect to database
> Jan 15 16:05:08 [23341] ERROR:core:init_mod_child: failed to 
> initializing module usrloc, rank 28
> Jan 15 16:05:08 [23341] ERROR:core:tcp_init_children: init_children failed
> Jan 15 16:05:08 [23310] ERROR:db_mysql:db_mysql_new_connection: driver 
> error: Can't connect to MySQL server on '192.168.1.29' (4)
> Jan 15 16:05:08 [23310] ERROR:core:db_do_init: could not add 
> connection to the poolJan 15 16:05:08 [23310] ERROR:usrloc:child_init: 
> child(0): failed to connect to database
> Jan 15 16:05:08 [23310] ERROR:core:init_mod_child: failed to 
> initializing module usrloc, rank 0
> Jan 15 16:05:08 [23310] ERROR:core:main_loop: error in init_child for 
> PROC_MAIN
> Jan 15 16:05:08 [23335] INFO:core:sig_usr: signal 15 received
> Jan 15 16:05:08 [23334] INFO:core:sig_usr: signal 15 received
> Jan 15 16:05:08 [2] INFO:core:sig_usr: signal 15 received
> Jan 15 16:05:08 [23332] INFO:core:sig_usr: signal 15 received
> Jan 15 16:05:08 [23331] INFO:core:sig_usr: signal 15 received
> 
> ..
> ..
> .
>
> any idea?
> rafo
>
> 
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>   


_

Re: [OpenSIPS-Users] IP authentication

2009-01-16 Thread michel freiha
Dear Sir,

Kindly check the Whole configuration file:

http://pastebin.com/d16fe5f36

Please let me know if there is something wrong...I'm not be able to make a
call and when dialing 00 from a registered or non registered endpoint
OpenSIPS run inside the function if(!allow_address("1", "$si", "$sp")){


Regards

On Thu, Jan 15, 2009 at 11:22 AM, michel freiha  wrote:

> Dear Bogdan,
>
> I tried allow_address() and it returns an error when restarting
> OpenSIPS..Even I tried to change the mask field type from tinit to varchar
> but if I put a value inside it like 26 and restart OpenSIPS I even get an
> error
>
> Regards
>
> Regards
>
>
> On Thu, Jan 15, 2009 at 11:20 AM, Bogdan-Andrei Iancu <
> bog...@voice-system.ro> wrote:
>
>> Hi Michel,
>>
>> Have you tried to use the simple format of the command ?
>>
>> Like  allow_address() ?
>>
>> Also not that after filling in the table, you have either to restart,
>> either to issue the "address_reload" MI command.
>>
>> Regards,
>> Bogdan
>>
>> michel freiha wrote:
>>
>>> Dear Sir,
>>> I'm trying to authenticate users based on their IP addresses and not
>>> based on username and password...I did the following in the config file:
>>>
>>> 1- I added loadmodule "permissions.so"
>>> 2- modparam("permissions", "db_url",
>>> "mysql://opensips:123...@mysql_database_ip/Database_name")
>>> 3- I added the below function in route function
>>>
>>> if (!allow_address("1", "$si", "$sp")) {
>>>sl_send_reply("403", "Forbidden");
>>>
>>> xlog("K");
>>> };
>>> 4- on the database side I have created the address table then add an
>>> entry with the below values:
>>>
>>> grp=1   ip_address=My Softphone IP address  mask=24Port=0
>>>
>>> The problem is that I'm getting Forbidden in case my IP exist in address
>>> table or not...
>>> Does someone has any idea about what could be the issue here?
>>>
>>> Thanks a lot for the help
>>>
>>> Regards
>>> 
>>>
>>> ___
>>> Users mailing list
>>> Users@lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>
>>>
>>
>>
>
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] IP authentication

2009-01-16 Thread michel freiha
Dear Sir,

Kindly check the Whole configuration file:

http://pastebin.com/d16fe5f36

Please let me know if there is something wrong...I'm not be able to make a
call and when dialing 00 from a registered or non registered endpoint
OpenSIPS run inside the function if(!allow_address("1", "$si", "$sp")){


Regards

On Thu, Jan 15, 2009 at 10:07 PM, Brett Nemeroff  wrote:

> What are you using for a mask? Bogdan, what's the format for that field? Is
> it typical slash notation? ie: 24 for a class c (255.255.255.0).
>
>
> On Thu, Jan 15, 2009 at 9:52 AM, michel freiha  wrote:
>
>> Dear Bogdan,
>>
>> I did the following:
>>
>> if(!allow_address("0", "$si", "$sp")){
>> sl_send_reply("403", "Forbidden");
>>
>> xlog("K");
>> exit;
>> }
>>
>> When making a call, the system is not matching the condition in all
>> cases...which means if my IP reside on the address table or not
>>
>> Regards
>>
>>
>> On Thu, Jan 15, 2009 at 5:24 PM, Bogdan-Andrei Iancu <
>> bog...@voice-system.ro> wrote:
>>
>>> Hi Michel,
>>>
>>> seams allow_address() has mandatory params, replace with:
>>>   allow_address("0", "$si", "$sp")
>>>
>>> Regards,
>>> Bogdan
>>>
>>>
>>> michel freiha wrote:
>>>
 Dear Bogdan,
 I have created the address table as you asked me in the previous email
 then I added the following to the opensips.cfg file:

 route{

 if (!allow_address()) {
 sl_send_reply("403", "Forbidden");
 xlog("$si");

 xlog("K");
 };

 I added only IP address to the address table...When trying to restart
 OpenSIps I got the below error:


 Thanks for the help

 Regards



 On Thu, Jan 15, 2009 at 11:51 AM, Bogdan-Andrei Iancu <
 bog...@voice-system.ro > wrote:

Hi Michel,

So, the table must look like:

CREATE TABLE address (
  id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
  grp SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL,
  ip_addr VARCHAR(15) NOT NULL,
  mask TINYINT DEFAULT 32 NOT NULL,
  port SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL
) ENGINE=MyISAM;


so, mask is integer after all :). What you should put in db (to
test) is:
  insert into address (ip_addr) values ("xxx.xxx.xxx.xxx");

and check the allow_address() then.

Let me know if there are errors at startup or at runtime.


Regards,
Bogdan

michel freiha wrote:

Dear Bogdan,

I tried allow_address() and it returns an error when
restarting OpenSIPS..Even I tried to change the mask field
type from tinit to varchar but if I put a value inside it like
26 and restart OpenSIPS I even get an error

Regards

Regards

On Thu, Jan 15, 2009 at 11:20 AM, Bogdan-Andrei Iancu
mailto:bog...@voice-system.ro>
>> wrote:

   Hi Michel,

   Have you tried to use the simple format of the command ?

   Like  allow_address() ?

   Also not that after filling in the table, you have either to
   restart, either to issue the "address_reload" MI command.

   Regards,
   Bogdan

   michel freiha wrote:

   Dear Sir,
   I'm trying to authenticate users based on their IP
addresses
   and not based on username and password...I did the
following
   in the config file:

   1- I added loadmodule "permissions.so"
   2- modparam("permissions", "db_url",
   "mysql://opensips:123...@mysql_database_ip
 /Database_name")
   3- I added the below function in route function

   if (!allow_address("1", "$si", "$sp")) {
  sl_send_reply("403", "Forbidden");

 xlog("K");
   };
   4- on the database side I have created the address
table then
   add an entry with the below values:

   grp=1   ip_address=My Softphone IP address  mask=24
 Port=0

   The problem is that I'm getting Forbidden in case my IP
exist
   in address table or not...
   Does someone has any idea about what could be the issue
here?

   Thanks a lot for the help

   Regards

 ---

Re: [OpenSIPS-Users] IP authentication

2009-01-16 Thread michel freiha
Dear Sir,

I'm using the following:

if($rU =~ "^00.*")
{
if(!allow_address("1", "$si", "$sp")){
sl_send_reply("403", "Forbidden");
xlog("K");
exit;
}
else
{

xlog("MICHOO");
route(8);
exit;
}
}

When I make a call I got Forbidden in all cases...Registered or Non
Registered user

Regards

On Thu, Jan 15, 2009 at 10:07 PM, Brett Nemeroff  wrote:

> What are you using for a mask? Bogdan, what's the format for that field? Is
> it typical slash notation? ie: 24 for a class c (255.255.255.0).
>
>
> On Thu, Jan 15, 2009 at 9:52 AM, michel freiha  wrote:
>
>> Dear Bogdan,
>>
>> I did the following:
>>
>> if(!allow_address("0", "$si", "$sp")){
>> sl_send_reply("403", "Forbidden");
>>
>> xlog("K");
>> exit;
>> }
>>
>> When making a call, the system is not matching the condition in all
>> cases...which means if my IP reside on the address table or not
>>
>> Regards
>>
>>
>> On Thu, Jan 15, 2009 at 5:24 PM, Bogdan-Andrei Iancu <
>> bog...@voice-system.ro> wrote:
>>
>>> Hi Michel,
>>>
>>> seams allow_address() has mandatory params, replace with:
>>>   allow_address("0", "$si", "$sp")
>>>
>>> Regards,
>>> Bogdan
>>>
>>>
>>> michel freiha wrote:
>>>
 Dear Bogdan,
 I have created the address table as you asked me in the previous email
 then I added the following to the opensips.cfg file:

 route{

 if (!allow_address()) {
 sl_send_reply("403", "Forbidden");
 xlog("$si");

 xlog("K");
 };

 I added only IP address to the address table...When trying to restart
 OpenSIps I got the below error:


 Thanks for the help

 Regards



 On Thu, Jan 15, 2009 at 11:51 AM, Bogdan-Andrei Iancu <
 bog...@voice-system.ro > wrote:

Hi Michel,

So, the table must look like:

CREATE TABLE address (
  id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
  grp SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL,
  ip_addr VARCHAR(15) NOT NULL,
  mask TINYINT DEFAULT 32 NOT NULL,
  port SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL
) ENGINE=MyISAM;


so, mask is integer after all :). What you should put in db (to
test) is:
  insert into address (ip_addr) values ("xxx.xxx.xxx.xxx");

and check the allow_address() then.

Let me know if there are errors at startup or at runtime.


Regards,
Bogdan

michel freiha wrote:

Dear Bogdan,

I tried allow_address() and it returns an error when
restarting OpenSIPS..Even I tried to change the mask field
type from tinit to varchar but if I put a value inside it like
26 and restart OpenSIPS I even get an error

Regards

Regards

On Thu, Jan 15, 2009 at 11:20 AM, Bogdan-Andrei Iancu
mailto:bog...@voice-system.ro>
>> wrote:

   Hi Michel,

   Have you tried to use the simple format of the command ?

   Like  allow_address() ?

   Also not that after filling in the table, you have either to
   restart, either to issue the "address_reload" MI command.

   Regards,
   Bogdan

   michel freiha wrote:

   Dear Sir,
   I'm trying to authenticate users based on their IP
addresses
   and not based on username and password...I did the
following
   in the config file:

   1- I added loadmodule "permissions.so"
   2- modparam("permissions", "db_url",
   "mysql://opensips:123...@mysql_database_ip
 /Database_name")
   3- I added the below function in route function

   if (!allow_address("1", "$si", "$sp")) {
  sl_send_reply("403", "Forbidden");

 xlog("K");
   };
   4- on the database side I have created the address
table then
   add an entry with the below values:

   grp=1   ip_address=My Softphone IP address  mask=24
 Port=0

   The problem is that I'm getting Forbidden in case my IP
exist
   in address table or not...
   Does some

Re: [OpenSIPS-Users] IP authentication

2009-01-16 Thread michel freiha
I'm using 24 and not 255.255.

Regards

On Thu, Jan 15, 2009 at 10:07 PM, Brett Nemeroff  wrote:

> What are you using for a mask? Bogdan, what's the format for that field? Is
> it typical slash notation? ie: 24 for a class c (255.255.255.0).
>
>
> On Thu, Jan 15, 2009 at 9:52 AM, michel freiha  wrote:
>
>> Dear Bogdan,
>>
>> I did the following:
>>
>> if(!allow_address("0", "$si", "$sp")){
>> sl_send_reply("403", "Forbidden");
>>
>> xlog("K");
>> exit;
>> }
>>
>> When making a call, the system is not matching the condition in all
>> cases...which means if my IP reside on the address table or not
>>
>> Regards
>>
>>
>> On Thu, Jan 15, 2009 at 5:24 PM, Bogdan-Andrei Iancu <
>> bog...@voice-system.ro> wrote:
>>
>>> Hi Michel,
>>>
>>> seams allow_address() has mandatory params, replace with:
>>>   allow_address("0", "$si", "$sp")
>>>
>>> Regards,
>>> Bogdan
>>>
>>>
>>> michel freiha wrote:
>>>
 Dear Bogdan,
 I have created the address table as you asked me in the previous email
 then I added the following to the opensips.cfg file:

 route{

 if (!allow_address()) {
 sl_send_reply("403", "Forbidden");
 xlog("$si");

 xlog("K");
 };

 I added only IP address to the address table...When trying to restart
 OpenSIps I got the below error:


 Thanks for the help

 Regards



 On Thu, Jan 15, 2009 at 11:51 AM, Bogdan-Andrei Iancu <
 bog...@voice-system.ro > wrote:

Hi Michel,

So, the table must look like:

CREATE TABLE address (
  id INT(10) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
  grp SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL,
  ip_addr VARCHAR(15) NOT NULL,
  mask TINYINT DEFAULT 32 NOT NULL,
  port SMALLINT(5) UNSIGNED DEFAULT 0 NOT NULL
) ENGINE=MyISAM;


so, mask is integer after all :). What you should put in db (to
test) is:
  insert into address (ip_addr) values ("xxx.xxx.xxx.xxx");

and check the allow_address() then.

Let me know if there are errors at startup or at runtime.


Regards,
Bogdan

michel freiha wrote:

Dear Bogdan,

I tried allow_address() and it returns an error when
restarting OpenSIPS..Even I tried to change the mask field
type from tinit to varchar but if I put a value inside it like
26 and restart OpenSIPS I even get an error

Regards

Regards

On Thu, Jan 15, 2009 at 11:20 AM, Bogdan-Andrei Iancu
mailto:bog...@voice-system.ro>
>> wrote:

   Hi Michel,

   Have you tried to use the simple format of the command ?

   Like  allow_address() ?

   Also not that after filling in the table, you have either to
   restart, either to issue the "address_reload" MI command.

   Regards,
   Bogdan

   michel freiha wrote:

   Dear Sir,
   I'm trying to authenticate users based on their IP
addresses
   and not based on username and password...I did the
following
   in the config file:

   1- I added loadmodule "permissions.so"
   2- modparam("permissions", "db_url",
   "mysql://opensips:123...@mysql_database_ip
 /Database_name")
   3- I added the below function in route function

   if (!allow_address("1", "$si", "$sp")) {
  sl_send_reply("403", "Forbidden");

 xlog("K");
   };
   4- on the database side I have created the address
table then
   add an entry with the below values:

   grp=1   ip_address=My Softphone IP address  mask=24
 Port=0

   The problem is that I'm getting Forbidden in case my IP
exist
   in address table or not...
   Does someone has any idea about what could be the issue
here?

   Thanks a lot for the help

   Regards

 

   ___
   Users mailing list
   Users@lists.opensips.org