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
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:
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:
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:
On 01/16/2009 04:47 PM, Bogdan-Andrei Iancu wrote:
Alex, you are right...The link was not correct:
heheheee!!! Maybe you want to say as well: next link didn't exist in this form 20 minutes ago...
However, what you wanted to suggest was possible even before adding the new parameter to registered() function, also with older versions of openser. Check: http://lists.kamailio.org/pipermail/users/2009-January/021447.html
Daniel
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
modparam("registrar", "aor_avp", "$avp(i:3223)") $avp(i:3223) = $fu; if(registered()) { ... }
Cheers, Daniel
Daniel-Constantin Mierla wrote:
I like you logic here :)..you are funny man :)...
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
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:
On 01/16/2009 05:17 PM, Bogdan-Andrei Iancu wrote:
:-)) ... now you are a good subject to make funny of....
You rushed and did a quick commit and then came back providing a link to a feature that didn't existed few minutes ago ... and yes it is funny, because the similar behavior could be achieved already (so initial link with few more details could get it done).
The newer being better (how much better, have you tested?!?!) or not is another topic. Don't forget to remove the old, lazy one, you can do it in 30sec... (or, ahhh, you may want to preserve backward compatibility, sorry...)
You mean: opensips got it when replicated the source repository, as Kamailio is the same project with OpenSER, you may want to check the source tree repository: http://openser.svn.sourceforge.net/viewvc/openser/
So nothing to get from openser to kamailio, the are the same and only one project.
Then start moving module parameters specifying avps to be get as input for functions to parameters of the functions (e.g., you can begin with tm) -- you know that also from openser, opensips got support for config functions with more than two parameters.
Daniel
Daniel,
You are rude and over the limit. I clearly see that the project is your play ground and place to show your frustration.....just a huge lack of respect for other people here....
Technically speaking, I will not comment your aberrations ....
Regards, Bogdan
PS: you know, do try to lie yourself and accept that openser split in 2 parts....whatever you like it or not.....if you think a SVN repo defines a project, well....good luck....
Daniel-Constantin Mierla wrote:
Bogdan,
On 01/16/2009 06:22 PM, Bogdan-Andrei Iancu wrote:
Daniel,
You are rude and over the limit.
unfortunately you started ... I haven't said statements like "you are a funny man", you started, I replied.
so check your behavior first before speaking about the others.
I clearly see that the project is your play ground and place to show your frustration...
It is not my playground, openser/kamailio is (was all the time) governed by a management board, it is not one man project at is is yours: http://www.kamailio.org/mos/view/Management/
Some developers left, that is ok, all the time happens. But the project is the same. You lie yourself and try to create confusion. Website and sourceforge project are the same, with the content from the moment openser project was started. https://sourceforge.net/projects/openser/ http://openser.sf.net
I have nothing against new projects based on openser, it shows it is reliable and good project. But stop creating confusion. You can reply about your project on your mailing lists, and don't say that it is the continuation of openser.
When I started with openser, I admitted I do a fork and focused on making a better project. Didn't try to say it is continuation of SER or so. What you do is pathetic, just make your project better and people will use it, do not use dirty tricks.
Daniel
PS. If you know you are saying the true, do not drop addresses from cc list, it is nothing to hide.
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 bogdan@voice-system.ro wrote:
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:
Hello,
On 01/16/2009 03:31 PM, michel freiha wrote:
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
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:
On 01/16/2009 03:53 PM, Alex Balashov wrote:
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
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 04:03 PM, Alex Balashov wrote:
Do you care if it's online, as long as it answers the challenge successfully with the same credentials it provides when it registers?
Have you checked about SIP Digest Access Authentication Relay? Some care in such case ...
Also, with prepaid systems, where only one phone is allowed to be registered (see the rest of enhancements in kamailio 1.5.0 registrar module - e.g., save() with flags 0x4) and call, then you have to check as well.
Cheers, Daniel