[OpenSIPS-Users] Separated registrar and proxy
Bogdan-Andrei Iancu
bogdan at opensips.org
Wed Aug 2 10:01:32 EDT 2017
Ho Igor,
Normally, in usrloc, the main data storage in the memory; the DB is used
only for flushing the memory, for restart persistence. So, at runtime,
OpenSIPS does not read from DB. The only db_mode where OpenSIPS read
from DB is 3 (DB_ONLY) where the memory caching is disabled.
Regards,
Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com
OpenSIPS Bootcamp 2017, Houston, US
http://opensips.org/training/OpenSIPS_Bootcamp_2017.html
On 07/31/2017 07:32 AM, Igor Pavlov wrote:
>
> Hi, all.
>
> I'm trying to separate registrar and proxy functions between several
> hosts. Registrations successfully saves at registrar, but sip proxy
> could not find record when trying to lookup at "location" table on
> INVITE. I can't see any querys to my DB from proxy.
>
> *registrar conf:*
>
> loadmodule "usrloc.so"
> modparam("usrloc", "db_url",
> "mysql://opensips:open_sips@db1.example.com/opensips")
> modparam("usrloc", "db_mode", 2)
>
> if (!save("location","f"))
> sl_reply_error(); //
>
> *proxy conf:*
>
> loadmodule "usrloc.so"
> modparam("usrloc", "db_url",
> "mysql://opensips:open_sips@db1.example.com/opensips")
> modparam("usrloc", "db_mode", 2)
>
> route[location] {
> xlog("L_INFO","Lookup for $ru");
> lookup("location");
> switch($retcode) {
> case -1:
>
> case -3:
> sl_send_reply("404","Not found");
>
> exit;
>
> case -2:
>
> sl_send_reply("405","Not found");
>
> exit;
>
> };
>
> } //
>
> --
> ____________
> Best regards,
> Igor Pavlov
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20170802/7f7b0613/attachment.html>
More information about the Users
mailing list