[SR-Users] is_subscriber function
Daniel W. Graham
dan at cmsinter.net
Thu Aug 15 05:44:48 CEST 2013
Yep, load_credential was empty. Just tested with your work around and it is working now.
Thanks for looking into this and offering a work around, much appreciated.
Thanks!
From: sr-users-bounces at lists.sip-router.org [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Daniel-Constantin Mierla
Sent: Wednesday, August 14, 2013 5:36 PM
To: Kamailio (SER) - Users Mailing List
Subject: Re: [SR-Users] is_subscriber function
Hello,
just to confirm my finding, is your load_credential parameter for auth_db module empty?
If yes, try to set it to something like "id" for a quick workaround (provided that you don't use $avp(id) anywhere).
I will come up with a fix for this case in the near future.
Cheers,
Daniel
On 8/14/13 9:01 PM, Daniel-Constantin Mierla wrote:
Hello,
thanks for troubleshooting further - it looks like an issue, I am going to check the sources.
Cheers,
Daniel
On 8/14/13 8:55 PM, Daniel W. Graham wrote:
Here is the debug output:
Aug 14 14:47:36 SIP01 /usr/local/sbin/kamailio[30423]: INFO: <script>: Location route
Aug 14 14:47:36 SIP01 /usr/local/sbin/kamailio[30423]: ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=506 a=16 n=if
Aug 14 14:47:36 SIP01 /usr/local/sbin/kamailio[30423]: ERROR: *** cfgtrace: c=[/usr/local/etc/kamailio/kamailio.cfg] l=501 a=27 n=is_subscriber
Aug 14 14:47:36 SIP01 /usr/local/sbin/kamailio[30423]: DEBUG: auth_db [authdb_mod.c:291]: w_is_subscriber(): uri [sip:user2 at domain.com] table [sip_accounts] flags [1]
Aug 14 14:47:36 SIP01 /usr/local/sbin/kamailio[30423]: ERROR: <core> [db_ut.c:280]: db_print_columns(): Invalid parameter value
Aug 14 14:47:36 SIP01 /usr/local/sbin/kamailio[30423]: ERROR: auth_db [authorize.c:97]: fetch_credentials(): failed to query database
From: sr-users-bounces at lists.sip-router.org<mailto:sr-users-bounces at lists.sip-router.org> [mailto:sr-users-bounces at lists.sip-router.org] On Behalf Of Daniel W. Graham
Sent: Wednesday, August 14, 2013 1:06 PM
To: sr-users at lists.sip-router.org<mailto:sr-users at lists.sip-router.org>
Subject: [SR-Users] is_subscriber function
I am having an issue with the is_subscriber function provided by auth_db module. What I want to accomplish is: if the call is not to a local subscriber then route via LCR. If the call is to a local subscriber then route via LOCATION.
My subscriber table is called sip_accounts and I am using multidomain so domain is populated in subscriber definitions.
Here is my routing block-
if (!is_subscriber("$ru", "sip_accounts", "1")){
route(LCR);
exit;
} else {
route(LOCATION);
exit;
}
Call always routes via LCR despite calling a local subscriber.
INVITE is correct:
INVITE sip:user2 at domain.com SIP/2.0.
From: user1 <sip:user1 at domain.com>;tag=520c9f9ade1e7026o0.
To: <sip:user2 at domain.com>.
Any ideas or direction where my issue could be?
-dan
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users at lists.sip-router.org<mailto:sr-users at lists.sip-router.org>
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda<http://twitter.com/#%21/miconda> - http://www.linkedin.com/in/miconda
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130814/3b7c11e1/attachment-0001.html>
More information about the sr-users
mailing list