[OpenSIPS-Users] can realm change before calling check_from() /check_to() with uri table ?

Pasan Meemaduma pasandev at ymail.com
Sat Mar 10 14:08:13 CET 2012


Hi Bogdan,
 
Thanks a lot for the tip , so I'll straigt away do a avp_query instead of calling check_from / check_to() ? , yea I saw the query in the debug,
 
Just wondering if it'll be hitting db badly. Anyway I'll go with this approach and come back with my performance stats. 
 
Thanks again ! :)


________________________________
From: Bogdan-Andrei Iancu <bogdan at opensips.org>
To: Pasan Meemaduma <pasandev at ymail.com>; OpenSIPS users mailling list <users at lists.opensips.org> 
Sent: Friday, 9 March 2012, 23:03
Subject: Re: [OpenSIPS-Users] can realm change before calling check_from() /check_to() with uri table ?


Hi Pasan,

There is no way to disable the domain checking when using this function. A simpler approach will be to perform a raw query directly from the script (anyway the module is doing one) :
    avp_db_query("select username from uri where username=$au and uri_user=$fu", "$avp(uri) );
    if ($rc<0) {  does not exist }

Regards,
Bogdan

On 03/08/2012 01:17 PM, Pasan Meemaduma wrote: 
Hi Guys,
>
>
>
>
>I'm just stuck in with something with uri table. 
>
>
>
>
>
>I have different DNS entries and people use server IP as well therefore I have to have duplicate entries in uri table if I need
>to alias `From` user. This increase db load . 
>
>
>
>Is there way that we can turn off realm checking in check_from () when modparam("uri_db", "use_uri_table", 1) ?
>
>
>Or else is there a way I can replace realm part of a Digest Header to a common string so that I can have single entry in uri table ?
>
>
>
>If I don't have both entires as below , If the Customer uses IP or DNS the check_from check_to fail :(
>
>+----+----------+---------------+----------+---------------------+
>
>| id | username | domain        | uri_user | last_modified       |
>+----+----------+---------------+----------+---------------------+
>|  1 | 1001     | 192.168.102.5 | 1001     | 2012-01-09 17:21:42 |
>|  4 | 1001     | voip.somewhere.com | 1001     | 2012-01-09 17:36:32 |
>+----+----------+---------------+----------+---------------------+
>
>
>
>I tried using replace_all(re,txt) but it didn't work.
>
>
>
>
>any suggestions would be appreciated
>
>
>
>
>
>
>Regards,
>Pasan
>
>
_______________________________________________
Users mailing list Users at lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users 


-- 
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer http://www.opensips-solutions.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120310/1011404b/attachment.htm>


More information about the Users mailing list