[SR-Users] Massive uploading of aliases through a dbtext

Daniel-Constantin Mierla miconda at gmail.com
Fri Jan 14 16:34:26 CET 2022


Yes, you have to set non-caching mode for db_text.

You can also look at db_sqlite, maybe suits better your needs.

Cheers,
Daniel

On 13.01.22 13:22, Denys Pozniak wrote:
>
> Do I understand correctly that if db_text is in caching mode (
> db_mode=0 ), then changes in the dbtext/domain file are not updated by
> the *kamcmd domain.reload* command?
>
>
> чт, 13 янв. 2022 г. в 12:17, Denys Pozniak <denys.pozniak at gmail.com>:
>
>     Thanks! Now it works!
>
>     чт, 13 янв. 2022 г. в 11:55, Daniel-Constantin Mierla
>     <miconda at gmail.com>:
>
>         Hello,
>
>         alias_db is for user aliases, not for host aliases. For
>         multi-domain support with database storage, use domain module
>         and set register myself mod param.
>
>         Anyhow, the domains won't show up in core.aliases_list rpc
>         response, that's only for host aliases set in config file, but
>         domain module has also rpc command for listing its records.
>
>         Cheers,
>         Daniel
>
>         On 13.01.22 10:49, Denys Pozniak wrote:
>>         Hello!
>>
>>         I need help uploading a list of aliases through a dbtext to
>>         use them via myself.
>>         It is likely that there is some configuration problem:
>>
>>         /loadmodule "db_text.so"/
>>         /modparam("db_text", "db_mode", 1)
>>         modparam("db_text", "emptystring", 1)
>>         /
>>         /
>>         /
>>         /loadmodule "alias_db.so"
>>         modparam("alias_db", "db_url", "text:///etc/kamailio/dbtext")
>>         /
>>         /
>>         /
>>         /[root at kamailio]$ cat dbtext/dbaliases
>>         id(int,auto) alias_username(string) alias_domain(string)
>>         username(string) domain(string)
>>         1::sip.test.local::
>>
>>         /
>>         /[root at kamailio]$ kamcmd core.aliases_list
>>         {
>>                 myself_callbacks: yes
>>                 aliases: {
>>                 }
>>         }
>>         /
>>
>>         If done through a script (alias=sip.test.local), then
>>         everything works fine:
>>
>>         /[root at kamailio]$ kamcmd core.aliases_list
>>         {
>>                 myself_callbacks: yes
>>                 aliases: {
>>                         alias: {
>>                                 proto: *
>>                                 address: sip.test.local
>>                                 port: *
>>                         }
>>                 }
>>         }
>>         /
>>
>>
>>         -- 
>>
>>         BR,
>>         Denys Pozniak
>>
>>
>>
>>         __________________________________________________________
>>         Kamailio - Users Mailing List - Non Commercial Discussions
>>           * sr-users at lists.kamailio.org
>>         Important: keep the mailing list in the recipients, do not reply only to the sender!
>>         Edit mailing list options or unsubscribe:
>>           * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
>         -- 
>         Daniel-Constantin Mierla -- www.asipto.com <http://www.asipto.com>
>         www.twitter.com/miconda <http://www.twitter.com/miconda> -- www.linkedin.com/in/miconda <http://www.linkedin.com/in/miconda>
>         Kamailio Advanced Training - Online
>           Feb 21-24, 2022 (America Timezone)
>           * https://www.asipto.com/sw/kamailio-advanced-training-online/
>
>
>
>     -- 
>
>     BR,
>     Denys Pozniak
>
>
>
>
> -- 
>
> BR,
> Denys Pozniak
>
>
-- 
Daniel-Constantin Mierla -- www.asipto.com
www.twitter.com/miconda -- www.linkedin.com/in/miconda
Kamailio Advanced Training - Online
  Feb 21-24, 2022 (America Timezone)
  * https://www.asipto.com/sw/kamailio-advanced-training-online/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20220114/14f06553/attachment.htm>


More information about the sr-users mailing list