[OpenSIPS-Users] [RFC] Default value of db_url in OpenSIPS

Bogdan-Andrei Iancu bogdan at opensips.org
Thu Apr 14 17:04:35 CEST 2011

On 04/14/2011 05:56 PM, Ovidiu Sas wrote:
> On Thu, Apr 14, 2011 at 10:35 AM, Bogdan-Andrei Iancu
> <bogdan at opensips.org>  wrote:
>> On 04/14/2011 05:25 PM, Ovidiu Sas wrote:
>>> On Thu, Apr 14, 2011 at 10:18 AM, Bogdan-Andrei Iancu
>>> <bogdan at opensips.org>    wrote:
>>>> On 04/14/2011 03:15 PM, Saúl Ibarra Corretgé wrote:
>>>>> On 14/4/11 1:02 PM, Bogdan-Andrei Iancu wrote:
>>>>>> Hi all,
>>>>>> Following some discussions on the value of db_url, we end up with the
>>>>>> idea of chancing the way of definition the db_url in opensips.
>>>>>> The problem with the current approach (having builtin - hidden- default
>>>>>> values) is confusing as, if you do no explicitly set a db_url, the
>>>>>> modules will try do connect to the default db_url, without you even
>>>>>> knowing that.
>>>>>> So the idea is to remove the builtin default value and to have a new
>>>>>> global parameter in opensips cfg to define the default value for
>>>>>> db_urls.
>>>>>> This will allow:
>>>>>>      - to have single default db_url for simple default scripts (as we
>>>>>> have now)
>>>>>>      - to see (no mote hidden) the default value for db_url in your cfg
>>>>>>      - to change the default db_url without re-compilling
>>>>>>      - still be able to individually change the db_urls for each
>>>>>> module...
>>>>>> Already there are three +votes for this, but I would like to see other
>>>>>> opinions on that....pro or against :)
>>>>> +1
>>>>> Would this global db_url be overridable with the per-module one, or are
>>>>> they mutually exclusive?
>>>> per module (if defined in script) will override the global one (for that
>>>> module).
>>> And if there's no per-module defined and no global defined, then the
>>> init will fail with proper error message, right?
>> If the module really requires a db, then it will fail to start.
>>> Also, we may want to have two global urls:
>>>   - one r/w for modules that require writing to the db;
>>>   - one r/o for modules that require only reading from db.
>> Does it make sense to keep this separation between RW and RO ? personally I
>> never used it...somehow is non-sense (as security) for a single application
>> to connect in the same time, to the same DB with RW and RO (for different
>> modules).....my 2 cents..
> I have no objections in using a single url.  But in this case, we
> should get rid of the second one (r/o) from the opensipsctl script (to
> keep consistency).

OK, let's keep a single DB URL in both opensips and opensipsctl.


Bogdan-Andrei Iancu
OpenSIPS eBootcamp - 2nd of May 2011
OpenSIPS solutions and "know-how"

More information about the Users mailing list