is_subscriber in auth_db module was exactly what I was looking for. However it doesn’t look like my version has it, I’m on 3.3.x branch-
0(7535) ERROR: <core> [cfg.y:3455]: cfg. parser: failed to find command is_subscriber
0(7535) : <core> [cfg.y:3594]: parse error in config file /usr/local/etc/kamailio/kamailio.cfg, line 386, column 48: unknown command, missing loadmodule?
Is this only available on 4.x?
Thanks for the info on sqlops, I will keep that in mind.
-dan
From: sr-users-bounces@lists.sip-router.org [mailto:sr-users-bounces@lists.sip-router.org] On Behalf Of Daniel-Constantin Mierla
Sent: Wednesday, June 19, 2013 6:29 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] Local subscriber lookup / usrloc
Hello,
On 6/19/13 9:29 PM, Daniel W. Graham wrote:
My kamailio implementation sits in front of a group of asterisk servers, when a call comes into kamailio it does a series of checks on the location of the src and dst to determine if the call is allowed. If the src is PSTN and called user is found in the location table the call is passed to an asterisk server for further processing of call forwarding options / voicemail / ring time setting etc. However if the called account is not found (not currently registered) the call is then discarded and voicemail etc can never be accessed.
I can add a avp_db_query to fetch user from the subscriber table vs location table lookup. Just wondering if there are any built in functions or other efficient ways to handle this that others are doing.
sqlops is recommended for sql queries if you are not tied to some avp operations.
If you just want to check if the subscriber exists, there is a function in auth_db module:
- http://kamailio.org/docs/modules/stable/modules/auth_db.html#idp42920
Another one should be in uri_db, available in older versions but not that much flexible as the above one.
Cheers,
Daniel
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio Advanced Training, San Francisco, USA - June 24-27, 2013
* http://asipto.com/u/katu *