[SR-Users] is_subscriber function

Daniel W. Graham dan at cmsinter.net
Wed Aug 14 19:06:08 CEST 2013


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130814/a220e9a0/attachment.html>


More information about the sr-users mailing list